Stat Trek

Teach yourself statistics

Stat Trek

Teach yourself statistics


Matrix Addition and Matrix Subtraction

Just like ordinary algebra, matrix algebra has operations like addition and subtraction.

How to Add and Subtract Matrices

Two matrices may be added or subtracted only if they have the same dimension; that is, they must have the same number of rows and columns.

Addition or subtraction is accomplished by adding or subtracting corresponding elements. For example, consider matrix A and matrix B.

A =    
1 2 3
7 8 9
B =    
5 6 7
3 4 5

Both matrices have the same number of rows and columns (2 rows and 3 columns), so they can be added and subtracted. Thus,

A + B =    
1 + 5 2 + 6 3 + 7
7 + 3 8 + 4 9 + 5

A + B =    
6 8 10
10 12 14

And,

A - B =    
1 - 5 2 - 6 3 - 7
7 - 3 8 - 4 9 - 5

A - B =    
-4 -4 -4
4 4 4

And finally, note that the order in which matrices are added is not important; thus, A + B = B + A.

Test Your Understanding

Problem 1

Consider the matrices shown below - A, B, C, and D

A =    
1
2
B =    
3 5
4 6

C =    
4 5
6 6
D =    
-1 0
-2 0

Which of the following statements are true?

I.   A + B = C
II.  B + C = D
III. B - C = D

(A) I only
(B) II only
(C) III only
(D) I and II
(E) I and III

Solution

The correct answer is (C), as shown below.

B - C   =    
3 - 4 5 - 5
4 - 6 6 - 6

B - C   =    
-1 0
-2 0
    =    D

Note that Matrices A and B cannot be added, because B has more columns than A. Matrices may be added or subtracted only if they have the same number of rows and the same number of columns.