I am going to solve Exercise C10 in Chapter M.
A = matrix(c(1, 4, -3, 6, 3, 0), nrow=2, ncol=3, byrow = TRUE)
B = matrix(c(3, 2, 1, -2, -6, 5), nrow=2, ncol=3, byrow = TRUE)
C = matrix(c(2, 4, 4, 0, -2, 2), nrow=3, ncol=2, byrow = TRUE)
alpha = 4
beta = 0.5
A+B
## [,1] [,2] [,3]
## [1,] 4 6 -2
## [2,] 4 -3 5
A+C cannot be calculated - they are non-conformable arrays.
t(B)+C
## [,1] [,2]
## [1,] 5 2
## [2,] 6 -6
## [3,] -1 7
A+Bt cannot be calculated - they are non-conformable arrays.
beta*C
## [,1] [,2]
## [1,] 1 2
## [2,] 2 0
## [3,] -1 1
4*A - 3*B
## [,1] [,2] [,3]
## [1,] -5 10 -15
## [2,] 30 30 -15
t(A)+alpha*C
## [,1] [,2]
## [1,] 9 22
## [2,] 20 3
## [3,] -11 8
A+B-t(C)
## [,1] [,2] [,3]
## [1,] 2 2 0
## [2,] 0 -3 3
4*A+2*B-5*t(C)
## [,1] [,2] [,3]
## [1,] 0 0 0
## [2,] 0 0 0