Matrix Subtraction – Explanation & Examples

Matrix SubtractionThere are $ 4 $ basic operations we can do on matrices. They are addition, subtraction, scalar multiplication, and matrix multiplication. Matrix Subtraction is one of them, and we are going to look at it in this article.

Note:  Matrix division isn’t a defined operation. We can divide a matrix by only a scalar number. To read more about matrix division, click here.

Let us define matrix subtraction:

Matrix subtraction is the operation of subtracting two matrices of the same dimension by subtracting the corresponding entries.

This article will show what conditions make matrix subtraction possible, subtract matrices, and a few examples showing this process.

When can you subtract matrices?

Can we subtract any matrices?

No!

We can only subtract $ 2 $ matrices when they have the same dimension. That is, if $ 2 $ matrices have the same number of rows and columns, then, and only then, we can subtract the $ 2 $ matrices together.

Recall that the dimension of a matrix is its number of rows and number of columns. If there are $ a $ rows and $ b $ columns of a matrix, we can say that the matrix has dimensions $ a \times b $ (pronounced as $ a $-by-$ b $). To know more about the dimensions of a matrix, check this article out!

Remember, the resulting matrix from the operation of matrix subtraction will be of the same dimension as the matrices that produced it.

How to subtract matrices?

After we have concluded that matrices have the same dimensions, we subtract $ 2 $ matrices by subtracting each other’s corresponding elements. Consider Matrix $ A $ and Matrix $ B $ shown below:

$ A = \begin{bmatrix} { 0 }  & { 4 } \\ { – 3} & { – 3 }  \end {bmatrix} $

$ B = \begin{bmatrix} { – 9 }  & 0 \\ 2 & { – 2 }  \end {bmatrix} $

Both Matrix $ A $ and $ B $ have $ 2 $ rows and $ 2 $ columns. Hence, the matrices’ dimensions are $ 2 \times 2 $, which makes it equal. That means we can subtract the $ 2 $ matrices by subtracting each corresponding entry from each other. The process is shown below:

$ A – B = \begin{bmatrix} { 0 – – 9 }  & { 4 – 0 } \\ { – 3 – 2 } & { – 3 – – 2 }  \end {bmatrix} $

$ A – B = \begin{bmatrix} { 0 + 9 }  & { 4 – 0  } \\ { – 3 – 2 } & { – 3 + 2 }  \end {bmatrix} $

$ A – B = \begin{bmatrix} { 9 }  & { 4  } \\ { – 5 } & { – 1 }  \end {bmatrix} $How to subtract matrices?

Now, let’s consider the two matrices shown below:

$ A = \begin{bmatrix} { 0 }  & { – 1 } \\ 10 & 2  \end {bmatrix} $

$ B = \begin{bmatrix} { – 5 }  & 0 \\ 6 & 0 \\ 3 & 7 \\ 4 & { – 7 }  \end {bmatrix} $

Is $ A – B $ defined?

No.
Matrix $ A $ has dimensions $ 2 \times 2 $. Matrix $ B $ has dimensions $ 4 \times 2 $. Since the dimensions of both the matrices aren’t equal, matrix subtraction isn’t defined! We can’t subtract Matrix $ A $ and $ B $ because there won’t be corresponding entry for each element of Matrix $ A $ and Matrix  $ B $.

Rules of Matrix Subtraction

We can write $ 4 $ rules for matrix subtraction. Shown below:

  1. You can only subtract matrices with the same dimensions (i.e. number of rows of the first matrix must equal the number of rows of the second matrix. Also, the number of columns of the first matrix must be equal to the number of columns of the second matrix.)
  2. The resultant matrix from matrix subtraction will have the same dimension as the original matrices that produced it.
  3. Matrix subtraction is NOT commutative (i.e. $ A – B \neq  B – A $). When you change the order of matrices and subtract, it produces a different answer (just like real numbers).
  4. Matrix subtraction is NOT associative (i.e. $ ( A – B ) – C  \neq  A – ( B – C ) $). 

Let’s look at some examples of Matrix Subtraction.

Example 1

Check whether matrix subtraction between Matrix $ A $ and Matrix $ B $ is defined. If so, subtract them.

$ A = \begin{bmatrix} { 0 }  & { – 5 } \\ { – 5 } & { 0 }  \end {bmatrix} $

$ B = \begin{bmatrix} { 3 }  & { – 4 } \\ { 0 } & { – 5 }  \end {bmatrix} $

Solution

For matrix subtraction to be defined, the dimension of each matrix must be equal.
Matrix $ A $ is a $ 2 \times 2 $ matrix. Matrix $ B $ is also a $ 2 \times 2 $ matrix. Thus, matrix subtraction between Matrix $ A $ and $ B $ is defined. 

Now, let’s subtract the $ 2 $ matrices together by subtracting each corresponding entry of Matrix $ B $ from each corresponding entry of Matrix $ A $. Shown below:

$ A – B = \begin{bmatrix} { 0 – 3 }  & { – 5 – – 4 } \\ { – 5 – 0 } & {  0 – – 5 }  \end {bmatrix} $

$ A – B = \begin{bmatrix} { – 3 }  & { – 5 + 4  } \\ { – 5 } & { 0 + 5 }  \end{bmatrix} $

$ A – B = \begin{bmatrix} { – 3 }  & { – 1  } \\ { – 5 } & { 5 }  \end{bmatrix} $

 

Example 2

For the $ 2 $ matrices shown below, find $ C – D $.

$ C = \begin{bmatrix} { 1 }  & { – 1 } \\ 1 & { – 1 } \\ 7 & { – 7 }  \end {bmatrix} $

$ D = \begin{bmatrix} { 1 }  & { – 2 } & { – 1 } \\ { – 1 } & 0 & { – 1 }   \end {bmatrix} $

Solution

The dimension of Matrix $ C $ is $ 3 \times 2 $. The dimension of Matrix $ D $ is $ 2 \times 3 $. Even though the dimensions are equivalent, we can’t subtract Matrix $ D $ from Matrix $ C $. The order of dimensions are also important. A $ 3 \times 2 $ matrix is not equal to a $ 2 \times 3 $ matrix. Thus, we cannot subtract Matrix $ D $ from Matrix $ C$.

We can solve basic algebraic equations with matrix subtraction as well. Consider the example shown below.

Example 3

Find the values of $ a $ and $ b $ given the following equation:

$ \begin{pmatrix} { 1 }  & { 2 } \\ b & { – 6 }   \end {pmatrix} – \begin{pmatrix} { a }  & { – 1 } \\ 0 & { – 3 }   \end {pmatrix} = \begin{pmatrix} { 7 }  & { 3 } \\ { – 2 } & { – 3 }   \end {pmatrix} $

Solution

We can subtract corresponding entries to solve for $ a $ and $ b $. First, let’s subtract the corresponding elements for $ a $ and solve for the variable:

$ 1 – a = 7 $
$ a = 1 – 7 $
$ a = – 6 $

Now, let’s find the value of $ b $ by subtracting the corresponding entries for $ b $:

$ b – 0 = – 2 $
$ b = – 2 $

Now, you can try some practice questions and see whether you get them correct or not.  Answers are below.

Practice Questions

  1. Consider the following $ 3 $ matrices:
    $ P = \begin{pmatrix} { – 2 }  & { – 2 } \\ 1 & { 1 }   \end {pmatrix} $
    $ Q = \begin{pmatrix} { – 3 }  & { – 3 } \\ { – 3 } & { – 3 }   \end {pmatrix} $
    $ R = \begin{pmatrix} 1  & 1 \\ 7 & { – 2 } \\ 3 & { – 7 }   \end {pmatrix} $
    Find:
    1. $ P – Q $
    2. $ Q  –  R $
    3. $ Q – P $
  2. Find the values of $ a $, $ b $, and $ c $ given the following equation:

    $ \begin{pmatrix} { 3 }  & { 2 } & 0 \\ b & { – 2 } & 3 \\ 11 & a & -2   \end {pmatrix} – \begin{pmatrix} { 3 }  & { 2 } & c \\ 5 & { – 5 } & 3 \\ { – 4 } & { 6 } & 10   \end {pmatrix} = \begin{pmatrix} { 0 }  & { 0 } & -9 \\ 12 & { 3 } & 0 \\ 15 & -3 & { – 12 }   \end {pmatrix} $

  1.  


Answers

  1. All the $ 3 $ problems are matrix subtraction. Note that since matrix subtraction is not commutative, the answer to Part $ A $ and Part $ C $ would be different. The answers are shown below.
    1. Both Matrices $ P $ and $ Q $ are $ 2 \times 2 $ matrices. Thus, we subtract the $ 2 $ matrices by subtracting the corresponding entries. Shown below:
      $ P – Q = \begin{pmatrix} { – 2 – – 3 }  & { – 2 – – 3 } \\ { 1 – – 3 } & { 1 – – 3 }  \end {pmatrix} $
      $ P – Q = \begin{pmatrix} { – 2 + 3 }  & { – 2 + 3 } \\ { 1 + 3 } & { 1 + 3 }  \end {pmatrix} $
      $ P – Q = \begin{pmatrix} { 1 }  & { 1 } \\ { 4 } & { 4 }  \end {pmatrix} $
    2. We can’t subtract Matrix $R$ from Matrix $Q$ because their dimensions aren’t the same. Matrix $Q$ is a $ 2 \times 2$ matrix and Matrix $R$ is a $3 \times 2$ matrix.
    3. The answer to this part of the question will be different from Part $ A $ since matrix subtraction isn’t commutative. Let’s subtract Matrix $ P $ from Matrix $ Q $.
      $ Q – P = \begin{pmatrix} { – 3 – – 2 }  & { – 3 – – 2 } \\ { – 3 – 1 } & { – 3 – 1 }  \end {pmatrix} $
      $ Q – P = \begin{pmatrix} { – 3 + 2 }  & { – 3 + 2 } \\ { – 4 } & {  – 4 }  \end {pmatrix} $
      $ Q – P = \begin{pmatrix} { – 1 }  & {  – 1 } \\ { – 4 } & { – 4 }  \end {pmatrix} $
  2. We can subtract corresponding entries to solve for $ a $, $ b $, and $ c $. First, let’s subtract the corresponding elements for $ a $ and solve for the variable:

    $ a – 6 = -3 $
    $ a = – 3 + 6 $
    $ a = 3 $

    Now, let’s find the value of $ b $ by subtracting the corresponding entries for $ b $:

    $ b – 5 = 12 $
    $ b = 12 + 5 $
    $ b = 17 $

    Lastly, let’s find the value of $ c $ by subtracting the corresponding entries for $ c $:

    $ 0 – c = -9 $
    $ c = 0 – – 9 $
    $ c = 0 + 9 $
    $ c = 9 $

Previous Lesson | Main Page | Next Lesson