Adding and Subtracting Matrices

In this lesson, I have prepared seven (7) worked examples to illustrate the basic approach on how to easily add or subtract matrices.

If you know how to add and subtract real numbers, this topic should really be a breeze. The only thing required in order to “legally” perform the operations of addition or subtraction in the “world” of matrices is to make sure that the given matrices must have the same size or dimension.

What does it mean for a given matrix to have the same size or dimension?

Suppose we’re given matrices A and B. They have the same size or dimension because their number of rows and columns are the same.

Examples of two matrices with same dimension. Matrix A and matrix B has 2 rows and 3 columns but they have different elements.

We can describe the size or dimension of a matrix using the following standard format:

number of rows x number of columns

Let me show you some examples…

A two-column table showing different sizes or dimensions of matrices with examples such 2x3 matrix, 3x2 matrix, 5x5 matrix which is a square matrix

The last matrix with a dimension of 5 x 5 is also considered to be a “square matrix” because the number of rows and the number of columns are equal. It is important to know that for any given matrix to have an inverse, it must be a square matrix. I am not saying that all square matrices have inverses but the first requirement for a matrix to have an inverse is that it must be a square matrix first.

Check out my separate tutorial on how to find the inverse of a 2×2 matrix.

I must emphasize that in order to add or subtract two given matrices, they should have the same size or dimension. Otherwise, we conclude that the sum (addition) or difference (subtraction) of two matrices having different sizes or dimensions is undefined!

Now let’s take a look at the general rule on how to add and subtract matrices which sizes or dimensions are the same.


Rules on Adding and Subtracting Matrices with the Same Size or Dimension

Suppose matrices A and B both have two rows and two columns (2×2) with some arbitrary elements or entries…

Matrix A is a 2x2 matrix with elements a1 and a2 on the first row, and elements a3 and a4 on the second row.
Matrix B is a 2x2 matrix with elements b1 and b2 on the first row, and elements b3 and b4 on the second row.

The “formulas” to add and subtract matrices are shown below…

  • Add matrices by adding their corresponding entries
A formula showing how to add matrix A and matrix B, that is matrix A plus matrix B.
  • Subtract matrices by subtracting their corresponding entries
A formula showing how to subtract matrices A and B, that is matrix A minus matrix B.

Let’s work on some problems.


Examples of How to Add and Subtract Matrices

Example 1: Perform the indicated operation for A + C.

Notice that matrices A and C have the same “size” or “dimension” because their number of rows and column are the same. Both can be described as a 3 x 3 matrix. This tells me that it is okay to find their sum.

Matrix A has elements -5, 2 and 0 on its first row, elements 7, -3, 4 on its second row, and elements -1, 3, 2 on its third row. It can also be written as [-5,2,0;7,-3,4;-1,3,2].
Matrix C has elements 0, -1 and 8 on its first row, elements 6, -14, 2 on its second row, and elements 9, 5, 1 on its third row. It can also be written as [0,-1,8;6,-14,2,9,5,1].

I will add their corresponding entries and simplify.

The sum of matrices A and B has elements -5, 1, and 8 on its first row; 13, -17, and 6 pn its second row; 8, 8, and 3 on its third row. In other words A + C = [-5, 1, 8; 13, -17, 6; 8, 8, 3].

That’s how simple it is!


Example 2: Perform the indicated operation for B + F.

Observe that matrix B has a dimension of 2×3 while matrix F has a dimension of 2×2.

Matrix B has elements 8, 1, and 2 on its first row; -5, 6, and 7 on its second row. Matrix B can also be written as .
Matrix F has elements 1 and -2 on its first row; -3 and 4 on its second row. Therefore, matrix F = .

Since the number of rows and columns don’t match, then the sum of matrices B and F doesn’t exist or undefined. I will stop here. That’s our answer believe it or not.


Example 3: Perform the indicated operation for E − B.

The last two examples showed you how to add matrices. This time, we’ll talk about the subtraction of matrices. Remember that the process involved in both adding and subtracting matrices are extremely similar. Review the “formula” above in case you forgot.

In this example, we need to find the difference between matrix E and matrix B.

However, it appears that it is not possible since they have different sizes or dimensions. Matrix E is a 3×2 while matrix B is 2×3.

Matrix E contains the elements -5 and 1 on the first row, 0 and 2 on the second row, and -11 and 7 on the third row. This matrix can alternatively be written in the form E = .
Matrix B contains the elements 8, 1, and 2 on the first row; -5, 6 and 7 on the second row. This matrix can alternatively be written as B = .

Since I can’t subtract entry-wise, due to the entries of the two matrices having no direct correspondence, I must claim that it is NOT possible to find their difference. Therefore, our answer is undefined.

This is not a trick question. Teachers sometimes “throw” this in the mix to test if you understand the concept that only matrices with the same sizes or dimensions can be added or subtracted. Don’t feel bad, I myself fell into this “trap”. Hopefully now that you know, you’ll be careful the next time you come across a problem like this.


Example 4: Perform the indicated operation for F − D.

By quick inspection, I can see that it is possible to find the difference between matrices F and D because both have the same number of rows and columns. Great!

Matrix F has elements 1 and -2 on its first row and elements -3 and 4 on the second row. Alternatively, it can we written as F = .
Matrix D has elements 6 and -2 on its first row and elements 3 and 7 on the second row. Alternatively, it can we written as D = .

To start, I will subtract the corresponding entries of F and D. My only word of caution is be very careful when subtracting real numbers. This is usually where common errors occur. Remember that two adjacent negative signs turns out to be positive.

Subtracting matrix D from F we get F - D = [1, -2; -3, 4] - [6, -2; 3, 7] = [-5, 0; -6, -3]. In other words the difference of matrices F and D is a matrix with elements -5 and 0 on the first row, and -6 and -3 on the second row.

Not bad, right?


Example 5: Perform the indicated operation for C − A.

The two given matrices C and A have the same sizes or dimensions (both 3×3 matrices). This allows us to be able to perform the subtraction operation .

Matrix C has elements 0, -1 and 8 on the first row; elements 6, -14, and 2 on the second row; and elements 9, 5, and 1 on the third row. Alternatively, matrix C = [0,-1,8;6,-14,2;9,5,1].
Matrix A has elements -5, 2 and 0 on the first row; elements 7, -3, and 4 on the second row; and elements -1, 3, and 2 on the third row which can be written as matrix A = [-5,2,0;7,-3,4;-1,3,2].

Subtracting entry-wise, I got…

The difference of matrices C and A is a matrix with 5, -3, and 8 on the first row; -1, -11 and -2 on the second row; and finally 10, 2 and -1 on the third row. This can be expressed also as C minus A = [5,-3,8;-1,-11,-1;10,2,-1].

Example 6: Perform the indicated operation for A + ) + ( C − ).

This is a great example of a “multi-step” problem that involves addition and subtraction of matrices. The goal is to perform the indicated operation on each parenthesis, and then ADD them together.

To skip some steps, review how we solved for A + C in Example 1 and C − A in Example 5.

We have these partial answers so far…

The sum of matrices A and C is a matrix with elements -5, 1, and 8 on the first row; elements 13, -17, and 6 on the second row; and elements 8, 8, and 3 on the third row. This can also be expressed as A + C = [-5,1,8;13,-17,6;8,8,3].
The difference of matrices C and A is a matrix with elements 5, -3, and 8 on the first row; -1, -11, and -2 on the second row; and elements 10, 2, and -1 on the third row. You may write this matrix as C minus A equals [5,-1,8;-1,-11,-2;10,2,-1].

So then, the final step is to add them together to obtain the required answer.

The sum of the sum of matrices A and C, and the difference of matrices C and A is a 3 by 3 matrix with elements 0, -2, and 16 on the first row; elements 12, -28, and 4 on the second row; and elements 18, 10 and 2 on the third row. Alternative, (A+C) + (C-A)=[0,-2,16;12,-28,4;18,10,2].

As you see, addition and subtraction of matrices are really easy. I hope that you gained some confidence and knowledge on how to work this out.


Example 7: Perform the indicated operation for ( A + C ) + ( C − A ).

This is the same problem as Example 6. But I want to solve this a little bit differently to demonstrate the fact that there are other ways to approach a certain problem. Although the method applied in Example 6 is perfectly acceptable, this “alternative” approach makes a lot more sense because it is very straightforward.

Here we go…

If you consider the expression ( A + C ) + ( C − Aas combining like or similar terms type problem, then it makes sense that we can quickly simplify the original problem without even dealing with the addition and subtraction of matrices.

Notice that I can combined the C-terms as 2C.

The sum of (A+C) and (C-A) equals A+2C-A.

Now, the A-terms should cancel out because they have opposite signs.

(A+C)+(C-A)= A + C + C - A = C + C = 2C

Our original problem is reduced to 2C which is twice or double of matrix C.

This means that I am going to multiply each entry of matrix C by 2. This is actually the subject of my other algebra tutorial on Scalar Multiplication of Matrix.

Since

Matrix A is a 3 by 3 matrix with elements 0, -1, and 8 on the first row, elements 6, -14, and 2 on the second row, and elements 9, 5, and 1 on the third row. We can also write this matric as C =[0,-1,8;6,-14,2;9,5,1].

then 2C is solved by…

2C = 2 times [0,-1,8;6,-14,2;9,5,1] = [0,-2,16;12,-28,4;18,10,2].

The final answer obtained using this method is exactly the same as in Example 6. Easy, right?


Practice with Worksheets

You might also be interested in:

Scalar Multiplication

Matrix Multiplication