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 are given the matrices [latex]A[/latex] and [latex]B[/latex]. They have the same size or dimension because their number of rows and columns are the same.

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…

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 whose sizes or dimensions are the same.
Rules on Adding and Subtracting Matrices with the Same Size or Dimension
Suppose matrices [latex]A[/latex] and [latex]B[/latex] both have two rows and two columns (2×2) with some arbitrary elements or entries.


The “formulas” to add and subtract matrices are shown below.
- Add matrices by adding their corresponding entries

- Subtract matrices by subtracting their corresponding entries

Let’s work on some problems.
Examples of How to Add and Subtract Matrices
Example 1: Perform the indicated operation for [latex]A+C[/latex].
Notice that matrices [latex]A[/latex] and [latex]C[/latex] have the same “size” or “dimension” because their number of rows and columns 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].](https://www.chilimath.com/wp-content/uploads/2017/07/mat1.gif)
![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].](https://www.chilimath.com/wp-content/uploads/2017/07/mat3.gif)
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].](https://www.chilimath.com/wp-content/uploads/2017/07/ex1_sol-1.gif)
That’s how simple it is!
Example 2: Perform the indicated operation for [latex]B+F[/latex].
Observe that matrix [latex]B[/latex] has a dimension of 2×3 while matrix [latex]F[/latex] has a dimension of 2×2.


Since the number of rows and columns don’t match, then the sum of matrices B and F doesn’t exist or is undefined. I will stop here. That’s our answer believe it or not.
Example 3: Perform the indicated operation for [latex]E-B[/latex].
The last two examples showed you how to add matrices. This time, we’ll talk about the subtraction of matrices. Remember that the processes 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 [latex]E[/latex] and matrix [latex]B[/latex].
However, it appears that it is not possible since they have different sizes or dimensions. Matrix [latex]E[/latex] is a 3×2 while matrix [latex]B[/latex] is 2×3.


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 [latex]F-D[/latex].
By quick inspection, I can see that it is possible to find the difference between matrices [latex]F[/latex] and [latex]D[/latex] because both have the same number of rows and columns. Great!


To start, I will subtract the corresponding entries of [latex]F[/latex] and [latex]D[/latex]. 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 turn 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.](https://www.chilimath.com/wp-content/uploads/2017/07/ex4_sol.gif)
Not bad, right?
Example 5: Perform the indicated operation for [latex]C-A[/latex].
The two given matrices [latex]C[/latex] and [latex]A[/latex] 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].](https://www.chilimath.com/wp-content/uploads/2017/07/mat3-1.gif)
![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].](https://www.chilimath.com/wp-content/uploads/2017/07/mat1-1.gif)
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].](https://www.chilimath.com/wp-content/uploads/2017/07/ex5_sol.gif)
Example 6: Perform the indicated operation for [latex](A+C)+(C-A)[/latex].
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 [latex](A+C)[/latex] in Example 1 and [latex]C-A[/latex] 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].](https://www.chilimath.com/wp-content/uploads/2017/07/aplusc.gif)
![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].](https://www.chilimath.com/wp-content/uploads/2017/07/cminusa.gif)
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].](https://www.chilimath.com/wp-content/uploads/2017/07/ex6_solp1.gif)
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 [latex](A+C)+(C-A)[/latex].
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 [latex](A+C)+(C-A)[/latex] as 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 combine the [latex]C[/latex]-terms as [latex]2C[/latex].

Now, the [latex]A[/latex]-terms should cancel out because they have opposite signs.

Our original problem is reduced to[latex]2C[/latex] which is twice or double of matrix C.
This means that I am going to multiply each entry of matrix [latex]C[/latex] by [latex]2[/latex]. 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].](https://www.chilimath.com/wp-content/uploads/2017/07/mat3-2.gif)
then [latex]2C[/latex] is solved by…
![2C = 2 times [0,-1,8;6,-14,2;9,5,1] = [0,-2,16;12,-28,4;18,10,2].](https://www.chilimath.com/wp-content/uploads/2017/07/2timesc_ans.gif)
The final answer obtained using this method is exactly the same as in Example 6. Easy, right?
You may also be interested in these related math lessons or tutorials: