Page 150 C24

Compute the product AB of the two matrices below.

A <- c(1,0,1,2,1,1,3,-2,3,-2,-1,1)
A<-matrix(A, nrow = 3, ncol=4)
B <- c(3,4,0,2)
print(A %*% B)
##      [,1]
## [1,]    7
## [2,]    2
## [3,]    9