A <- matrix(c(10, 10, 10,
11, 11, 11),
nrow = 2, byrow = TRUE)
x <- rvec(list(c(1, 2),
c(3, 4),
c(5, 6)))
A %*% x
## matrix multiplication with an
## ordinary R matrix produces
## a row or column vector
y <- c(1, 3, 5)
A %*% y
Run the code above in your browser using DataLab