Games
Problems
Go Pro!

# Adding Matrices and Subtracting Matrices

Reference > Mathematics > Algebra > Matrices

Suppose you have the following matrices: A =
1
5
2
6
; B =
3
7
4
8
. These two matrices can be added to produce a new matrix C. We would write A + B = C. But what is C? You probably could guess without too much difficulty: C =
4
12
6
14
. How did we obtain that matrix? Simple!  We just added the corresponding elements of A and B, and put the sum in the corresponding position of C. To put it a more fancy way:

ay,x + by,x = cy,x

From this, it should be fairly clear that you can only add two matrices if they have the same dimensions (otherwise, there will be elements in one matrix that don't have a corresponding element in the other matrix!) and the resulting matrix will have the same dimensions as the two matrices being added.

How do we subtract matrices? The same way - except that instead of adding corresponding elements, we subtract them. As with adding, the two matrices must have the same dimensions, and the result will also have those dimensions.

Just as with addition and subtraction of numbers, matrix addition is commutative, but matrix subtraction is not. In other words, A + B is the same as B + A, but A - B is not the same as B - A.

Example One
Find the sum of
1
2
3
and
2
4
5
.

Solution
Adding each corresponding element, we obtain
3
6
8

Example Two
Find the difference:
5
2
-1
0
-
-3
1
2
3

Solution
Subtract the corresponding elements (watch out for those negatives: 5 - (-3) = 5 + 3 = 8!)

8
1
-3
-3

Example Three
Find the following sum:
1
2
3
4
+
1
2
3
4
5
6

Solution
These do not have matching dimensions, so the operation cannot be performed!

Example Four
Find x if
1
x
3
4
+
3
5
7
9
=
4
12
10
13

Solution
The only part of this that matters to us is the entry in the first row, second column of each matrix:

x + 5 = 12, which leads to x = 7.

Example Five
Find x and y if
x
2x
5
+
2y
y
10
=
20
19
15

Solution
We can obtain two equations from this (which is good - we have two variables, so we should expect to see two equations if we're going to solve this!).

x + 2y = 20
2x + y = 19

If we subtract twice the second equation from the first, we get -3x = -18, or x = 6. Plugging this into either equation gives y = 7.

The solution is x = 6, y = 7.

## Questions

1.
What is the entry in the first row, second column of
1
2
3
4
+
3
-5
-2
1
?
2.
What is the entry in the second row, second column of
4
5
6
7
-
-1
3
-5
-8
?
3.
What is the entry in the first row, first column of
1
2
3
4
+
1
2
3
4
5
6
?
4.
Find x if
x
3
+
3x
5
=
64
8
5.
Find x and y if
x
2x
3x
+
5
7
9
=
10
17
y
.
6.
Find x and y if
x
2y
-
5
x
=
y
-3
Assign this reference page