Add and Subtract Matrices

Recommended for You

Not sure where to start? These are the lessons and games we recommend most to students, parents and teachers on Basic-mathematics.com. Each lesson explains the topic in plain language, walks you through worked examples step by step, and ends with practice so you can check your understanding. Pick one below, or use the menu to find lessons on fractions, algebra, geometry, statistics and more.

It is easy to add and subtract matrices. If you know how to add and subtract integers, this lesson will be a piece of cake. First, study the figure below carefully to see how it is done for a 2 × 2 matrix.

Add and subtract matrices

Based on the example in the figure above, to add or subtract matrices, we add or subtract their corresponding elements. For example, we add 8 and 9 to get 17.

Given two m × n matrices A = [ aij ] and B = [ bij ], with aij and bij located in row i and column j.

The sum is A + B = [ aij ] + [ bij ]

The difference is A − B = [ aij ] − [ bij ]

Using two 2 × 2 matrices,

  • the elements in the first row and first column are a11 and b11
  • the elements in the first row and second column are a12 and b12
  • the elements in the second row and first column are a21 and b21
  • the elements in the second row and second column are a22 and b22

Notice how we get the sum of the corresponding elements in the following addition of matrices:

Notice also how we get the difference of the corresponding elements in the following subtraction of matrices:

The important rule to know is that when adding and subtracting matrices, first make sure the matrices have the same dimensions. Suppose you are adding two matrices.

Then, this means that the number of rows in the first matrix must be equal to the number of rows in the second matrix. Similarly, the number of columns in the first matrix must be equal to the number of columns in the second matrix.

In other words, you can add or subtract a 2 × 3 with a 2 × 3 or a 3 × 3 with a 3 × 3. However, you cannot add a 3 × 2 with a 2 × 3 or a 2 × 2 with a 3 × 3.

More examples showing how to add and subtract matrices

Matrix addition

Add the two matrices shown below:

1−408−16032 + 937−805−329

Rule to follow in order to add and subtract matrices

You can add elements in the same position or elements in the same row and same column. We show these elements with the same color to make this crystal clear.

1−408−16032 + 937−805−329
= 1 + 9−4 + 30 + 78 + (−8)−1 + 06 + 50 + (−3)3 + 22 + 9
= 10−170−111−3511

Matrix subtraction

Matrix subtraction is similar to matrix addition with the exception that you are subtracting elements in the same row and same column.

Subtract the two matrices below:

971−2048−53 − 618−309−121
= 9 − 67 − 11 − 8−2 − (−3)0 − 04 − 98 − (−1)−5 − 23 − 1
= 36−710−59−72

Real-world connection

You have a business selling shirts and pants. The matrices below represent the number of shirts and pants that you sold in two weeks. The matrix on the left is week #1 and the matrix on the right is week #2.

Row #1 represents the number of pants that you sold and row #2 represents the number of shirts that you sold from Monday to Friday.

For example, you sold 40 pants on Wednesday (week 1).

You sold 28 shirts on Friday (week 2).

How many pants and shirts have you sold in two weeks?

Just perform matrix addition!

50254080103090601245Week #1 + 20307065805535751428Week #2
= 50 + 2025 + 3040 + 7080 + 6510 + 8030 + 5590 + 3560 + 7512 + 1445 + 28
= 705511014590851251352673