Elina Azrilyan

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
Calculation 1: A + B
A+B
##      [,1] [,2] [,3]
## [1,]    4    6   -2
## [2,]    4   -3    5
Calculation 2: A + C

A+C cannot be calculated - they are non-conformable arrays.

Calculation 3: Bt + C
t(B)+C
##      [,1] [,2]
## [1,]    5    2
## [2,]    6   -6
## [3,]   -1    7
Calculation 4: A + Bt

A+Bt cannot be calculated - they are non-conformable arrays.

Calculation 5: beta * C
beta*C
##      [,1] [,2]
## [1,]    1    2
## [2,]    2    0
## [3,]   -1    1
Calculation 6: 4A - 3B
4*A - 3*B
##      [,1] [,2] [,3]
## [1,]   -5   10  -15
## [2,]   30   30  -15
Calculation 7: At + alpha*C
t(A)+alpha*C
##      [,1] [,2]
## [1,]    9   22
## [2,]   20    3
## [3,]  -11    8
Calculation 8: A + B - Ct
A+B-t(C)
##      [,1] [,2] [,3]
## [1,]    2    2    0
## [2,]    0   -3    3
Calculation 8: 4A + 2B - 5Ct
4*A+2*B-5*t(C)
##      [,1] [,2] [,3]
## [1,]    0    0    0
## [2,]    0    0    0