CUNY MSDS 605 - Week 1

Nicholas Schettini

August 29, 2018

C21. Compute the product AB of the two matrices below using both the definition of the matrix-vector product (Definition MVP) and the definition of matrix multiplication (Definition MM)

a <- matrix(c(1, 3, 2, -1, 2, 1, 0, 1, 0), ncol = 3, byrow = T)
b <- matrix(c(4, 1, 2, 1, 0, 1, 3, 1, 5), ncol = 3, byrow = T)


a%*%b
##      [,1] [,2] [,3]
## [1,]   13    3   15
## [2,]    1    0    5
## [3,]    1    0    1