Skip to the page
Home Campus
Start free

Adding and Subtracting Matrices

How to add and subtract matrices of the same order, element by element; the zero matrix; finding unknown elements and an unknown matrix; and what a sum or a difference means in a setting.

Before you start

In lesson 4.1 you wrote information as a matrix and gave its order, rows × columns: the food stall's matrix S, with a row for each of 2 days and a column for each of 3 dishes, is 2×32 \times 3.

Two matrices are equal when they have the same order and their corresponding elements, the elements in the same position, are equal.

You will also need Secondary 1's rules for negative numbers: (−2)+5=3(-2) + 5 = 3, 5+(−1)=45 + (-1) = 4, 4−(−1)=54 - (-1) = 5.

Adding and Subtracting, Element by Element

Adding and subtracting matrices

Two matrices can be added or subtracted only when they have the same order.

To add them, add their corresponding elements. To subtract, subtract each element of the second from the corresponding element of the first.

The answer is a matrix of the same order.

It helps to write the working inside the brackets, one element at a time, and then work out each element. Put a negative number in brackets when it comes after a sign: 5+(−1)5 + (-1), 5−(−1)5 - (-1).

Example 1: A Sum and Two Differences

Find A + B, A − B and B − A.

A=
3−2
50
B=
46
−17

Solution

Both are 2×22 \times 2, so they can be added and subtracted. Add corresponding elements:

A+B=
3 + 4−2 + 6
5 + (−1)0 + 7
=
74
47

Subtract each element of B from the element of A in the same position. Mind the signs: 5−(−1)=5+1=6.5 - (-1) = 5 + 1 = 6\text{.}

A−B=
3 − 4−2 − 6
5 − (−1)0 − 7
=
−1−8
6−7

Now the other way round:

B−A=
4 − 36 − (−2)
−1 − 57 − 0
=
18
−67

B − A has every element of A − B with its sign changed.

A+B=
74
47
A−B=
−1−8
6−7
B−A=
18
−67

Which comes first?

For addition it does not matter which matrix comes first: A + B = B + A, because 3+43 + 4 and 4+34 + 3 are the same, element by element.

For subtraction it does: A − B and B − A have the same elements with every sign changed (a 0 stays 0). Always subtract the matrices as the question writes them, the first minus the second.

Same Order Only

If two matrices have different orders, some elements have no partner in the other matrix, so the sum and the difference cannot be found. Do not fill the gaps with zeros.

Example 2: Which Can Be Added?

With A from Example 1 and the matrices C and D below, find C + D and C − D, and say whether A + C can be found.

C=
4−30
17−5
D=
−256
3−42

Solution

C and D are both 2×32 \times 3:

C+D=
4 + (−2)−3 + 50 + 6
1 + 37 + (−4)−5 + 2
=
226
43−3
C−D=
4 − (−2)−3 − 50 − 6
1 − 37 − (−4)−5 − 2
=
6−8−6
−211−7
A+Ccannot be found: the orders 2 × 2 and 2 × 3 are different.

A + C cannot be found, as the orders are different.

C+D=
226
43−3
C−D=
6−8−6
−211−7

The Zero Matrix

The zero matrix

A matrix whose elements are all 0 is a zero matrix, written O (it is also called the null matrix). There is one of each order.

Adding O changes nothing: A + O = A.

A matrix minus itself is the zero matrix of its order: A − A = O.

O=
00
00
A+O=
3−2
50
=A
A−A=
3 − 3−2 − (−2)
5 − 50 − 0
=
00
00
=O

Unknown Elements and Unknown Matrices

When a sum or a difference contains unknowns, work out each element of the left-hand side and equate it to the corresponding element of the right-hand side, as for equal matrices in 4.1.

When a whole matrix X is unknown, as in P + X = Q, take P from both sides, as you would with numbers: X = Q − P.

Example 3: Unknowns in a Sum

(a) Find xx and yy. (b) Find the matrix X for which P + X = Q.

(a)

2x5
−34
+
3y
1−2
=
131
−22

(b)

P=
34
−26
Q=
5−1
28

Solution

(a) Add the left-hand side element by element:

2x5
−34
+
3y
1−2
=
2x + 35 + y
−3 + 14 + (−2)
=
2x + 3y + 5
−22
=
131
−22

Row 1, column 1: 2x+3=132x + 3 = 13, so 2x=102x = 10 and x=5x = 5. Row 1, column 2: y+5=1y + 5 = 1, so y=−4y = -4.

Check the other two elements: −3+1=−2-3 + 1 = -2 and 4+(−2)=24 + (-2) = 2. They agree.

(b) X = Q − P:

X=Q−P=
5 − 3−1 − 4
2 − (−2)8 − 6
=
2−5
42
P+X=
34
−26
+
2−5
42
=
5−1
28
=Q

The last line is the check: P + X gives Q.

(a) x=5x = 5, y=−4y = -4 (b)

X=
2−5
42

What a Sum or a Difference Means

When two matrices hold the same kind of information with the same labels, their sum is the total for each position, and their difference is how many more (or, if negative, how many fewer) there are in the first than in the second.

Example 4: Two Days' Sales

A bubble tea shop has outlets at Bugis and Serangoon. The matrices A and B show the cups of each size sold at each outlet on Saturday and on Sunday. (a) Find A + B and say what it shows. How many large cups did the Serangoon outlet sell over the weekend? (b) Find how many more cups of each size each outlet sold on Sunday than on Saturday.

A=
cups sold on Saturday
smallmediumlarge
Bugis528035
Serangoon476641
B=
cups sold on Sunday
smallmediumlarge
Bugis619540
Serangoon587250

Solution

(a) Both are 2×32 \times 3 with the same labels:

A+B=
52 + 6180 + 9535 + 40
47 + 5866 + 7241 + 50
A+B=
cups sold over the weekend
smallmediumlarge
Bugis11317575
Serangoon10513891

Each element is the number of cups of one size sold at one outlet over the two days. The element in row 2, column 3 is 91: the Serangoon outlet sold 91 large cups over the weekend.

(b) "How many more on Sunday than on Saturday" is Sunday's sales minus Saturday's, B − A (not A − B):

B−A=
61 − 5295 − 8040 − 35
58 − 4772 − 6650 − 41
B−A=
more cups sold on Sunday
smallmediumlarge
Bugis9155
Serangoon1169

Every element is positive, so each outlet sold more cups of every size on Sunday. For example, the Bugis outlet sold 15 more medium cups.

(a) A + B is below: the cups of each size sold at each outlet over the weekend; 91 large cups at Serangoon. (b) B − A is below: every element is positive.

(a)

A+B=
11317575
10513891

(b)

B−A=
9155
1169

Common Mistakes

  • Adding or subtracting matrices of different orders, often by filling the missing places with 0. A 2×22 \times 2 and a 2×32 \times 3 matrix cannot be added.
  • Signs in subtraction: 5−(−1)=65 - (-1) = 6, not 44; 0−7=−70 - 7 = -7.
  • Adding all the elements into one number. The sum of two matrices is a matrix of the same order.
  • Working out A − B when the question asks how many more there are in B than in A: that is B − A.

Practice

Try each question before you open its solution. Questions 8 and 10 are word problems.

Question 1

Find P + Q and P − Q.

P=
5−3
02
Q=
−14
6−2
ShowHide solution
P+Q=
5 + (−1)−3 + 4
0 + 62 + (−2)
=
41
60
P−Q=
5 − (−1)−3 − 4
0 − 62 − (−2)
=
6−7
−64

P + Q and P − Q:

P+Q=
41
60
P−Q=
6−7
−64

Question 2

Work out each of these.

(a)

2−10
43−5
+
−312
0−45

(b)

7
−2
0
−
3
−5
4

(c)

6−29
−
−149
ShowHide solution

(a)

2−10
43−5
+
−312
0−45
=
2 + (−3)−1 + 10 + 2
4 + 03 + (−4)−5 + 5
=
−102
4−10

(b)

7
−2
0
−
3
−5
4
=
7 − 3
−2 − (−5)
0 − 4
=
4
3
−4

(c)

6−29
−
−149
=
6 − (−1)−2 − 49 − 9
=
7−60

Each answer has the order of the two matrices.

2−10
43−5
+
−312
0−45
=
−102
4−10
7
−2
0
−
3
−5
4
=
4
3
−4
6−29
−
−149
=
7−60

Question 3

Which two of these matrices can be added to each other? Find their sum, and say why no other pair can be added.

E=
10
−23
F=
41−1
025
G=
−32
26
H=
21
0−4
73
ShowHide solution

The orders: E 2×22 \times 2, F 2×32 \times 3, G 2×22 \times 2, H 3×23 \times 2. Only E and G have the same order.

E+G=
1 + (−3)0 + 2
−2 + 23 + 6
=
−22
09

F (2×32 \times 3) and H (3×23 \times 2) hold the same number of elements, but their orders are different, so they cannot be added. No other pair has the same order either.

Only E and G can be added:

E+G=
−22
09

Question 4

Find A + B, B + A, A − B and B − A. What do you notice?

A=
4−1
23
B=
15
−20
ShowHide solution
A+B=
54
03
B+A=
54
03
A−B=
4 − 1−1 − 5
2 − (−2)3 − 0
=
3−6
43
B−A=
1 − 45 − (−1)
−2 − 20 − 3
=
−36
−4−3

A + B = B + A. A − B and B − A are different: each element of one is the other's with its sign changed.

The sums are equal; the differences have opposite signs, element by element.

Question 5

Find the matrix X for which (a) A + X = B, (b) X − A = B.

A=
2−3
14
B=
50
−26
ShowHide solution

(a) Take A from both sides: X = B − A.

X=B−A=
5 − 20 − (−3)
−2 − 16 − 4
=
33
−32
A+X=
2 + 3−3 + 3
1 + (−3)4 + 2
=
50
−26
=B

(b) Add A to both sides: X = B + A.

X=B+A=
5 + 20 + (−3)
−2 + 16 + 4
=
7−3
−110
X−A=
7 − 2−3 − (−3)
−1 − 110 − 4
=
50
−26
=B

In each part the second line is the check.

(a) X = B − A (b) X = B + A

B−A=
33
−32
B+A=
7−3
−110

Question 6

Find the matrix X for which A + X = O.

A=
2−3
14
ShowHide solution

X = O − A: each element of X is 0 minus the element of A, so every sign is changed.

X=O−A=
0 − 20 − (−3)
0 − 10 − 4
=
−23
−1−4
A+X=
00
00
=O

X has every element of A with its sign changed:

X=
−23
−1−4

Question 7

Find xx and yy in (a) and in (b).

(a)

x4
−13
+
2y
5−6
=
7−1
4−3

(b)

3x2
y5
−
4−1
62
=
113
−83
ShowHide solution

(a)

x4
−13
+
2y
5−6
=
x + 2y + 4
4−3
=
7−1
4−3

Row 1, column 1: x+2=7x + 2 = 7, so x=5x = 5. Row 1, column 2: y+4=−1y + 4 = -1, so y=−5y = -5. Check: −1+5=4-1 + 5 = 4 and 3+(−6)=−33 + (-6) = -3.

(b)

3x2
y5
−
4−1
62
=
3x − 42 − (−1)
y − 65 − 2
=
113
−83

Row 1, column 1: 3x−4=113x - 4 = 11, so 3x=153x = 15 and x=5x = 5. Row 2, column 1: y−6=−8y - 6 = -8, so y=−2y = -2. Check: 2−(−1)=32 - (-1) = 3 and 5−2=35 - 2 = 3.

(a) x=5x = 5, y=−5y = -5 (b) x=5x = 5, y=−2y = -2

Question 8

A convenience store has branches at Bedok and Yishun. The matrices show the bottles of water and of juice each branch had at the start of a week (K), the bottles delivered during the week (D) and the bottles sold (S). (a) Find K + D − S. (b) What does the element in row 2, column 2 of your answer mean?

K=
at the start
waterjuice
Bedok3024
Yishun1840
D=
delivered
waterjuice
Bedok2015
Yishun2510
S=
sold
waterjuice
Bedok3528
Yishun3045
ShowHide solution

(a) Work from left to right: first K + D, the bottles each branch had in all, then take away S.

K+D=
30 + 2024 + 15
18 + 2540 + 10
=
5039
4350
K+D−S=
5039
4350
−
3528
3045
=
50 − 3539 − 28
43 − 3050 − 45
=
1511
135

(b) Each element is the number of bottles left at the end of the week. Row 2 is Yishun and column 2 is juice: the Yishun branch had 5 bottles of juice left.

(a) K + D − S is below. (b) The Yishun branch had 5 bottles of juice left at the end of the week.

(a)

K+D−S=
1511
135

Question 9

(a) Siti adds P and Q by writing a 0 in the empty places of P. Explain her mistake. (b) Ravi works out the difference in (b) and gets 4 and 0 in row 1, −4 and 0 in row 2. Find his mistake and correct it.

(a)

P=
12
34
Q=
567
891

(b)

52
0−3
−
−12
4−3
ShowHide solution

(a) P is 2×22 \times 2 and Q is 2×32 \times 3. Matrices of different orders cannot be added, so the sum cannot be found. Writing 0s changes P into a different matrix.

P+Qcannot be found: the orders 2 × 2 and 2 × 3 are different.

(b) Row 1, column 1 should be 5−(−1)=5+1=6,5 - (-1) = 5 + 1 = 6\text{,} not 4: subtracting a negative number adds it.

52
0−3
−
−12
4−3
=
5 − (−1)2 − 2
0 − 4−3 − (−3)
=
60
−40

(a) The orders differ: the sum cannot be found. (b) The first element is 6, not 4.

Question 10

A school canteen has two drinks stalls. The matrices show the hot and cold drinks each stall sold in the first week (F) and the second week (W) of a term. (a) Find the drinks of each kind each stall sold in the two weeks together. (b) Find how many more drinks of each kind each stall sold in the second week than in the first. What does the negative element mean?

F=
drinks sold, week 1
hotcold
Stall 112085
Stall 264150
W=
drinks sold, week 2
hotcold
Stall 113580
Stall 270172
ShowHide solution

(a) The total is the sum:

F+W=
120 + 13585 + 80
64 + 70150 + 172
=
255165
134322

(b) How many more in the second week than in the first is W − F:

W−F=
135 − 12080 − 85
70 − 64172 − 150
=
15−5
622

The element −5 is in row 1, column 2: Stall 1 sold 5 fewer cold drinks in the second week than in the first.

(a) F + W and (b) W − F are below. In (b), −5 means Stall 1 sold 5 fewer cold drinks in week 2 than in week 1.

(a)

F+W=
255165
134322

(b)

W−F=
15−5
622

Key Points

  • Only matrices of the same order can be added or subtracted; otherwise the sum or difference cannot be found.
  • Add or subtract corresponding elements. The answer has the same order.
  • A + B = B + A, but A − B and B − A are in general different: each element of one is the other's with its sign changed.
  • The zero matrix O has every element 0: A + O = A and A − A = O.
  • Find unknown elements by equating corresponding elements; find an unknown matrix as with numbers: if P + X = Q, then X = Q − P.
  • In a setting, a sum is a total and a difference is how many more (a negative element: how many fewer).

Previous lesson4.1 Matrices and the Information They Hold Next lesson4.3 Multiplying a Matrix by a Number

All Secondary 4 (Grade 10) lessons

Home Campus has lessons for Primary 3 to Secondary 4, and practice questions with worked solutions and worksheets for Primary 3 to Secondary 2. Register free to practise and keep track of progress.

This lesson follows the Singapore Secondary 4 syllabus and was checked question by question before it was published. Spotted a mistake? Tell us.