Question: Please execute the following R code: set.seed(333) vector1 = sample(1:10,9,replace=TRUE) vector2 = sample(1:10,9,replace=TRUE) m1 = matrix(vector1,3,3) m2 = matrix(vector2,3,3) Now, perform a matrix multiplication m1
Please execute the following R code:
set.seed(333) vector1 = sample(1:10,9,replace=TRUE) vector2 = sample(1:10,9,replace=TRUE) m1 = matrix(vector1,3,3) m2 = matrix(vector2,3,3)
Now, perform a matrix multiplication m1 x m2 and save the result in a new matrix m3.
What is the sum of diagonal elements in the new matrix m3?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
