5. Matrix-vector multiplication. The matrix, X
, and vector, Y
, have been defined for you. You can
check the dimensions of a matrix or vector in R
with the dim()
function.
In order to perform matrix-vector multiplication, the number of columns of the first matrix (or vector) must be equal to the number of rows of
the second. Multiply the X
and Y
in the order that makes it a conformable operation using
the %*%
operation.