Adding and subtracting matrices

On this post we explain how to do the matrix addition and subtraction. In addition, you will see examples of addition and subtraction of matrices. Also, you will find problems to practice these matrix operations. And, finally, we will show you all the properties of the matrix addition.

How to add and subtract matrices?

To add (or subtract) two matrices, add (or subtract) the elements that are in the same position. Thus, two matrices can only be added or subtracted if they both have the same dimension.

Examples of adding and subtracting matrices

Let A and B be two square 2×2 matrices, the addition and the subtraction of them are calculated as follows:

addition and subtraction of matrices examples

So the rules of adding and subtracting matrices are simple: we simply have to add or subtract the corresponding entries and place the result of the operation in the same position.

Moreover, to add or subtract two matrices both of them must have the same dimension. For example, the following matrices cannot be added because they are of different sizes: the first one is a 2×2 dimension matrix and the second one is a 3×2 dimension matrix.

 \displaystyle \begin{pmatrix} 1 & 3 \\[1.1ex] 0 & 2 \end{pmatrix} + \begin{pmatrix} 5 & 6 \\[1.1ex] -2 & 4 \\[1.1ex] 7 & 1 \end{pmatrix} \ \longleftarrow \ \color{red} \bm{\times}}

As a curiosity, there is another type of matrix addition called Kronecker sum, although it very rare and it is not used much in linear algebra.

Practice addition and subtraction of matrices

Problem 1

Add the following 2×2 dimension matrices:

example of a 2x2 matrix addition

To add the two square matrices of order 2 we have to add the corresponding entries:

 \displaystyle \begin{pmatrix} 2 & 3 \\[1.1ex] 4 & 1  \end{pmatrix} + \begin{pmatrix} 2 & 1 \\[1.1ex] 3 & -1  \end{pmatrix} =  \begin{pmatrix} 2+2 & 3+1 \\[1.1ex] 4+3 & 1+(-1)  \end{pmatrix} = \begin{pmatrix} \bm{4} & \bm{4} \\[1.1ex] \bm{7} & \bm{0}  \end{pmatrix}

 

Problem 2

Subtract the following 3×2 matrices:

example of a 3x2 matrix subtraction

Even though the matrices are not square, we can subtract them because they have the same dimension:

 \displaystyle \begin{pmatrix} 5 & 2  \\[1.1ex] 1 & 6 \\[1.1ex] -3 & 0  \end{pmatrix} - \begin{pmatrix} 4 & 6 \\[1.1ex] -3 & 1 \\[1.1ex]-2 & 5 \end{pmatrix} =  \begin{pmatrix} 5-4 & 2-6  \\[1.1ex] 1-(-3) & 6-1 \\[1.1ex] -3-(-2) & 0-5  \end{pmatrix}  = \begin{pmatrix} \bm{1}&  \bm{-4} \\[1.1ex] \bm{4} & \bm{5} \\[1.1ex] \bm{-1} & \bm{-5} \end{pmatrix}

 

Problem 3

Find the following 3×3 matrix addition:

3x3 matrix addition example

To calculate the matrix sum we have to add the elements that are in the same position:

\displaystyle \begin{pmatrix} 4 & 1 & -2 \\[1.1ex] 0 & 3 & 2 \\[1.1ex] 5 & 1 & 6 \end{pmatrix} + \begin{pmatrix} 2 & 0 & 5 \\[1.1ex] -3 & 4 & 1 \\[1.1ex] 1 & 7 & 8 \end{pmatrix} =  \begin{pmatrix} 4+2 & 1+0 & -2+5 \\[1.1ex] 0+(-3) & 3+4 & 2+1 \\[1.1ex] 5+1 & 1+7 & 6+8 \end{pmatrix} = \begin{pmatrix} \bm{6}&  \bm{1} & \bm{3} \\[1.1ex] \bm{-3} & \bm{7} & \bm{3} \\[1.1ex] \bm{6} & \bm{8} & \bm{14} \end{pmatrix}

 

Problem 4

Calculate the following additions and subtractions of 2×2 matrices:

additions and subtractions of 2x2 matrices

In this case we have an addition and a subtraction of matrices. So we add the matrices on the left first:

 \displaystyle \begin{pmatrix} 11 & -1 \\[1.1ex] 1 & -1  \end{pmatrix}  -\begin{pmatrix} -3 & 4 \\[1.1ex] 1 & -2  \end{pmatrix}

And then we subtract the matrices:

\displaystyle \begin{pmatrix} \bm{14} & \bm{-5} \\[1.1ex] \bm{0} & \bm{1}  \end{pmatrix}

 

Problem 5

Add and subtract the following 3×3 dimension matrices:

adding and subtracting 3x3 matrices example

First, we solve the matrix subtraction:

\displaystyle \begin{pmatrix}2 & 1 & -7 \\[1.1ex] 7 & -9 & -2 \\[1.1ex] 0 & -1 & 1 \end{pmatrix}+\begin{pmatrix}2 & -1 & 5 \\[1.1ex] -3 & 1 & 4 \\[1.1ex] 6 & 0 & 3 \end{pmatrix}

And finally we do the sum of matrices:

\displaystyle \begin{pmatrix} \bm{4} & \bm{0} & \bm{-2} \\[1.1ex] \bm{4} & \bm{-8} & \bm{2}  \\[1.1ex] \bm{6} & \bm{-1} & \bm{4} \end{pmatrix}

 

Now that you know how to add and subtract matrices, you should see 2×2 matrix multiplication.

Properties of matrix addition

Matrix addition satisfies the following characteristics:

  • The matrix addition has the commutative property:

 \displaystyle A +B = B + A

Therefore, the order in which we add the matrices is indifferent. To prove this property we are going to add two matrices changing their order, you will see that the result is the same.

So we proceed to add two matrices:

\displaystyle \begin{pmatrix} 1 & 3 \\[1.1ex] 2 & -1 \end{pmatrix} + \begin{pmatrix} 4 & 1 \\[1.1ex] 5 & 2 \end{pmatrix}= \begin{pmatrix} \bm{5} & \bm{4} \\[1.1ex] \bm{7} & \bm{1} \end{pmatrix}

Note that if we reverse the order in which the matrices have been added, the result of the sum remains the same:

\displaystyle \begin{pmatrix} 4 & 1 \\[1.1ex] 5 & 2 \end{pmatrix} + \begin{pmatrix} 1 & 3 \\[1.1ex] 2 & -1 \end{pmatrix}= \begin{pmatrix} \bm{5} & \bm{4} \\[1.1ex] \bm{7} & \bm{1} \end{pmatrix}

 
  • Another property of the matrix addition is the opposite element:

\displaystyle A + (-A) =0

That is, if we add a matrix plus the same matrix but with all its elements changed sign, the result will be the null matrix. For example:

\displaystyle \begin{pmatrix} 4 & 1 & -3 \\[1.1ex] 2 & 0 & 9 \end{pmatrix} + \begin{pmatrix} -4 & -1 & 3 \\[1.1ex] -2 & 0 & -9 \end{pmatrix} = \begin{pmatrix} \bm{0} & \bm{0} & \bm{0} \\[1.1ex] \bm{0} & \bm{0} & \bm{0} \end{pmatrix}

 
  • The matrix addition also has the property of the neutral element:

 \displaystyle A + 0 =A

This property is the most obvious one, and it means that any matrix plus a matrix full of zeros results in the same matrix:

\displaystyle \begin{pmatrix} 2 & 1 & 5 \\[1.1ex] -3 & 4 & 9 \\[1.1ex] 1 & 12 & 6 \end{pmatrix} + \begin{pmatrix} 0 & 0 & 0 \\[1.1ex] 0 & 0 & 0 \\[1.1ex] 0 & 0 & 0 \end{pmatrix} = \begin{pmatrix} \bm{2} & \bm{1} & \bm{5} \\[1.1ex] \bm{-3} & \bm{4} & \bm{9} \\[1.1ex] \bm{1} & \bm{12} & \bm{6} \end{pmatrix}

 
  • The matrix addition has the associative property:

 \displaystyle\left( A + B \right) + C =A + \left( B + C \right)

Therefore, the order in which we add matrices is indifferent. Take a look at the following example, where we add 3 matrices with a different order and the result is the same:

\displaystyle A =  \begin{pmatrix} 2  \\[1.1ex] 1 \end{pmatrix}  \qquad B = \begin{pmatrix} 4  \\[1.1ex] -1  \end{pmatrix} \qquad C = \begin{pmatrix} 3  \\[1.1ex] 0 \end{pmatrix}

 \begin{aligned}\left( A + B \right) + C & =\left(  \begin{pmatrix} 2  \\[1.1ex] 1  \end{pmatrix}   +  \begin{pmatrix} 4  \\[1.1ex] -1  \end{pmatrix} \right) + \begin{pmatrix} 3  \\[1.1ex] 0  \end{pmatrix}  \\[2ex] & =   \begin{pmatrix} 6  \\[1.1ex] 0  \end{pmatrix} + \begin{pmatrix} 3  \\[1.1ex] 0 \end{pmatrix} \\[2ex] & =\begin{pmatrix} \bm{9}  \\[1.1ex] \bm{0} \end{pmatrix} \end{aligned}

\begin{aligned} A +  \left(  B + C \right) & = \begin{pmatrix} 2  \\[1.1ex] 1  \end{pmatrix}  + \left( \begin{pmatrix} 4  \\[1.1ex] -1  \end{pmatrix}  +\begin{pmatrix} 3  \\[1.1ex] 0  \end{pmatrix} \right) \\[2ex] & =  \begin{pmatrix} 2  \\[1.1ex] 1  \end{pmatrix} + \begin{pmatrix} 7  \\[1.1ex] -1  \end{pmatrix} \\[2ex] & = \begin{pmatrix}  \bm{9}  \\[1.1ex] \bm{0}\end{pmatrix} \end{aligned}


Leave a Comment

Your email address will not be published. Required fields are marked *