Matrix Operation Exercises
Xis a matrix in R. Which of the following is not equivalent to
t( t(X) )
X %*% matrix(1,ncol(X) )
Solve the following system of equations using R:
What is the solution for $$c$?
Load the following two matrices into R:
a <- matrix(1:12, nrow=4) b <- matrix(1:15, nrow=3)
Note the dimension of
aand the dimension of
In the question below, we will use the matrix multiplication operator in R,
%*%, to multiply these two matrices.
What is the value in the 3rd row and the 2nd column of the matrix product of
Multiply the 3rd row of
awith the 2nd column of
b, using the element-wise vector multiplication with
What is the sum of the elements in the resulting vector?