Matrix Subtraction Notes

Published on: September 29, 2026

This Matrix Subtraction Calculator subtracts one matrix from another and shows the working line by line. The two matrices must have the same number of rows and columns, because each entry needs a partner in the matching position. Order matters here in a way it does not for addition, since \(A - B\) and \(B - A\) differ by a sign in every entry. Following the same pattern every time makes matrix subtraction easy to check and repeat.

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Pair the entries in matching positions.
  4. Subtract each pair and write the difference in its place.

Formula:

\(\text{If } A = [a_{ij}] \text{ and } B = [b_{ij}]\text{, then } A - B = [a_{ij} - b_{ij}]\)
See Example 1 Hide Example 1

Problem

\(\begin{pmatrix} 12 & -3 \\ 40 & 7 \end{pmatrix} - \begin{pmatrix} 5 & 18 \\ -9 & 2 \end{pmatrix}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Pair the entries in matching positions.
  4. Subtract each pair and write the difference in its place.

Step 1

Step 1 - Set up the problem.

In this problem: Matrix A and Matrix B are both \(2 \times 2\), so every entry in one has a partner in the same position in the other.

\(\begin{pmatrix} 12 & -3 \\ 40 & 7 \end{pmatrix} - \begin{pmatrix} 5 & 18 \\ -9 & 2 \end{pmatrix}\)

Step 2

Step 2 - Write the formula.

In this problem: Two matrices of the same size line up entry for entry, so one is taken from the other a position at a time rather than as whole blocks.

\(\text{If } A = [a_{ij}] \text{ and } B = [b_{ij}]\text{, then } A - B = [a_{ij} - b_{ij}]\)

Step 3

Step 3 - Pair the entries in matching positions.

In this problem: Pairing the entries in matching positions gives \(12 - 5\), \(-3 - 18\), \(40 - (-9)\), \(7 - 2\).

\(\begin{pmatrix} 12 - 5 & -3 - 18 \\ 40 - (-9) & 7 - 2 \end{pmatrix}\)

Step 4

Step 4 - Subtract each pair and write the difference in its place.

In this problem: Working each position out: \(12 - 5 = 7\), \(-3 - 18 = -21\), \(40 - (-9) = 49\), \(7 - 2 = 5\).

\(\begin{pmatrix} 12 - 5 & -3 - 18 \\ 40 - (-9) & 7 - 2 \end{pmatrix} = \begin{pmatrix} 7 & -21 \\ 49 & 5 \end{pmatrix}\)

Final Answer

\(A - B = \begin{pmatrix} 7 & -21 \\ 49 & 5 \end{pmatrix}\)
See Example 2 Hide Example 2

Problem

\(\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix} - \begin{pmatrix} 7 & 8 & 9 \\ 1 & 0 & 2 \end{pmatrix}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Pair the entries in matching positions.
  4. Subtract each pair and write the difference in its place.

Step 1

Step 1 - Set up the problem.

In this problem: Matrix A and Matrix B are both \(2 \times 3\), so every entry in one has a partner in the same position in the other.

\(\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix} - \begin{pmatrix} 7 & 8 & 9 \\ 1 & 0 & 2 \end{pmatrix}\)

Step 2

Step 2 - Write the formula.

In this problem: Two matrices of the same size line up entry for entry, so one is taken from the other a position at a time rather than as whole blocks.

\(\text{If } A = [a_{ij}] \text{ and } B = [b_{ij}]\text{, then } A - B = [a_{ij} - b_{ij}]\)

Step 3

Step 3 - Pair the entries in matching positions.

In this problem: Pairing the entries in matching positions gives \(1 - 7\), \(2 - 8\), \(3 - 9\), \(4 - 1\), \(5 - 0\), \(6 - 2\).

\(\begin{pmatrix} 1 - 7 & 2 - 8 & 3 - 9 \\ 4 - 1 & 5 - 0 & 6 - 2 \end{pmatrix}\)

Step 4

Step 4 - Subtract each pair and write the difference in its place.

In this problem: Working each position out: \(1 - 7 = -6\), \(2 - 8 = -6\), \(3 - 9 = -6\), \(4 - 1 = 3\), \(5 - 0 = 5\), \(6 - 2 = 4\).

\(\begin{pmatrix} 1 - 7 & 2 - 8 & 3 - 9 \\ 4 - 1 & 5 - 0 & 6 - 2 \end{pmatrix} = \begin{pmatrix} -6 & -6 & -6 \\ 3 & 5 & 4 \end{pmatrix}\)

Final Answer

\(A - B = \begin{pmatrix} -6 & -6 & -6 \\ 3 & 5 & 4 \end{pmatrix}\)
See Example 3 Hide Example 3

Problem

\(\begin{pmatrix} 9 & 4 \\ 6 & -3 \end{pmatrix} - \begin{pmatrix} 2 & 7 \\ 1 & 5 \end{pmatrix}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Pair the entries in matching positions.
  4. Subtract each pair and write the difference in its place.

Step 1

Step 1 - Set up the problem.

In this problem: Matrix A and Matrix B are both \(2 \times 2\), so every entry in one has a partner in the same position in the other.

\(\begin{pmatrix} 9 & 4 \\ 6 & -3 \end{pmatrix} - \begin{pmatrix} 2 & 7 \\ 1 & 5 \end{pmatrix}\)

Step 2

Step 2 - Write the formula.

In this problem: Two matrices of the same size line up entry for entry, so one is taken from the other a position at a time rather than as whole blocks.

\(\text{If } A = [a_{ij}] \text{ and } B = [b_{ij}]\text{, then } A - B = [a_{ij} - b_{ij}]\)

Step 3

Step 3 - Pair the entries in matching positions.

In this problem: Pairing the entries in matching positions gives \(9 - 2\), \(4 - 7\), \(6 - 1\), \(-3 - 5\).

\(\begin{pmatrix} 9 - 2 & 4 - 7 \\ 6 - 1 & -3 - 5 \end{pmatrix}\)

Step 4

Step 4 - Subtract each pair and write the difference in its place.

In this problem: Working each position out: \(9 - 2 = 7\), \(4 - 7 = -3\), \(6 - 1 = 5\), \(-3 - 5 = -8\).

\(\begin{pmatrix} 9 - 2 & 4 - 7 \\ 6 - 1 & -3 - 5 \end{pmatrix} = \begin{pmatrix} 7 & -3 \\ 5 & -8 \end{pmatrix}\)

Final Answer

\(A - B = \begin{pmatrix} 7 & -3 \\ 5 & -8 \end{pmatrix}\)
See Example 4 Hide Example 4

Problem

\(\begin{pmatrix} 8 & 3 & 6 \\ 5 & 0 & 7 \end{pmatrix} - \begin{pmatrix} 2 & 5 & 1 \\ 4 & 2 & 3 \end{pmatrix}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Pair the entries in matching positions.
  4. Subtract each pair and write the difference in its place.

Step 1

Step 1 - Set up the problem.

In this problem: Matrix A and Matrix B are both \(2 \times 3\), so every entry in one has a partner in the same position in the other.

\(\begin{pmatrix} 8 & 3 & 6 \\ 5 & 0 & 7 \end{pmatrix} - \begin{pmatrix} 2 & 5 & 1 \\ 4 & 2 & 3 \end{pmatrix}\)

Step 2

Step 2 - Write the formula.

In this problem: Two matrices of the same size line up entry for entry, so one is taken from the other a position at a time rather than as whole blocks.

\(\text{If } A = [a_{ij}] \text{ and } B = [b_{ij}]\text{, then } A - B = [a_{ij} - b_{ij}]\)

Step 3

Step 3 - Pair the entries in matching positions.

In this problem: Pairing the entries in matching positions gives \(8 - 2\), \(3 - 5\), \(6 - 1\), \(5 - 4\), \(0 - 2\), \(7 - 3\).

\(\begin{pmatrix} 8 - 2 & 3 - 5 & 6 - 1 \\ 5 - 4 & 0 - 2 & 7 - 3 \end{pmatrix}\)

Step 4

Step 4 - Subtract each pair and write the difference in its place.

In this problem: Working each position out: \(8 - 2 = 6\), \(3 - 5 = -2\), \(6 - 1 = 5\), \(5 - 4 = 1\), \(0 - 2 = -2\), \(7 - 3 = 4\).

\(\begin{pmatrix} 8 - 2 & 3 - 5 & 6 - 1 \\ 5 - 4 & 0 - 2 & 7 - 3 \end{pmatrix} = \begin{pmatrix} 6 & -2 & 5 \\ 1 & -2 & 4 \end{pmatrix}\)

Final Answer

\(A - B = \begin{pmatrix} 6 & -2 & 5 \\ 1 & -2 & 4 \end{pmatrix}\)