Matrix Subtraction Calculator

Published on: September 14 2025
Final Answer: Free Full Steps: Plus

This Matrix Subtraction Calculator helps you subtract one matrix from another and shows each step clearly. In Algebra 2, matrix subtraction is a basic matrix operation used when working with systems, transformations, and organized numerical data. It works by subtracting corresponding entries from matrices of the same dimensions to form a new matrix.

Step-by-step method

  1. Check that both matrices have the same number of rows and columns.
  2. Subtract each Matrix B entry from the Matrix A entry in the same position.
  3. Write each difference in the matching position of the result matrix.

Formula:

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

Example 1: Take the values below.

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

Step 1 - Check that both matrices have the same number of rows and columns.

In this problem: Matrix A and Matrix B are both \(2 \times 2\), so they can be subtracted.

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

Step 2 - Subtract each Matrix B entry from the Matrix A entry in the same position.

In this problem: Each Matrix B entry is subtracted from the Matrix A entry in the same row and column.

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

Step 3 - Write each difference in the matching position of the result matrix.

In this problem: Each difference is placed back into the same position in the answer matrix.

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

Final answer:

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

Example 2: Take the values below.

\(\begin{pmatrix} 1000 & -2 & 33 \\ 4 & 15 & 6 \\ 7 & 8 & 9 \end{pmatrix} - \begin{pmatrix} 1 & 2 & 30 \\ 4 & 5 & 6 \\ -7 & 0 & 11 \end{pmatrix}\)

Step 1 - Check that both matrices have the same number of rows and columns.

In this problem: Matrix A and Matrix B are both \(3 \times 3\), so they can be subtracted.

\(\begin{pmatrix} 1000 & -2 & 33 \\ 4 & 15 & 6 \\ 7 & 8 & 9 \end{pmatrix} - \begin{pmatrix} 1 & 2 & 30 \\ 4 & 5 & 6 \\ -7 & 0 & 11 \end{pmatrix}\)

Step 2 - Subtract each Matrix B entry from the Matrix A entry in the same position.

In this problem: Each Matrix B entry is subtracted from the Matrix A entry in the same row and column.

\(\begin{pmatrix} 1000 - 1 & -2 - 2 & 33 - 30 \\ 4 - 4 & 15 - 5 & 6 - 6 \\ 7 - (-7) & 8 - 0 & 9 - 11 \end{pmatrix}\)

Step 3 - Write each difference in the matching position of the result matrix.

In this problem: Each difference is placed back into the same position in the answer matrix.

\(\begin{pmatrix} 1000 - 1 = 999 & -2 - 2 = -4 & 33 - 30 = 3 \\ 4 - 4 = 0 & 15 - 5 = 10 & 6 - 6 = 0 \\ 7 - (-7) = 14 & 8 - 0 = 8 & 9 - 11 = -2 \end{pmatrix} = \begin{pmatrix} 999 & -4 & 3 \\ 0 & 10 & 0 \\ 14 & 8 & -2 \end{pmatrix}\)

Final answer:

\(A - B = \begin{pmatrix} 999 & -4 & 3 \\ 0 & 10 & 0 \\ 14 & 8 & -2 \end{pmatrix}\)
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. Check that both matrices have the same number of rows and columns.
  2. Subtract each Matrix B entry from the Matrix A entry in the same position.
  3. Write each difference in the matching position of the result matrix.

Step 1

Step 1 - Check that both matrices have the same number of rows and columns.

In this problem: Matrix A and Matrix B are both \(2 \times 2\), so they can be subtracted.

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

Step 2

Step 2 - Subtract each Matrix B entry from the Matrix A entry in the same position.

In this problem: Each Matrix B entry is subtracted from the Matrix A entry in the same row and column.

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

Step 3

Step 3 - Write each difference in the matching position of the result matrix.

In this problem: Each difference is placed back into the same position in the answer matrix.

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

Final Answer

\(\)
See Example 2 Hide Example 2

Problem

\(\begin{pmatrix} 1000 & -2 & 33 \\ 4 & 15 & 6 \\ 7 & 8 & 9 \end{pmatrix} - \begin{pmatrix} 1 & 2 & 30 \\ 4 & 5 & 6 \\ -7 & 0 & 11 \end{pmatrix}\)

Approach

Step-by-step method

  1. Check that both matrices have the same number of rows and columns.
  2. Subtract each Matrix B entry from the Matrix A entry in the same position.
  3. Write each difference in the matching position of the result matrix.

Step 1

Step 1 - Check that both matrices have the same number of rows and columns.

In this problem: Matrix A and Matrix B are both \(3 \times 3\), so they can be subtracted.

\(\begin{pmatrix} 1000 & -2 & 33 \\ 4 & 15 & 6 \\ 7 & 8 & 9 \end{pmatrix} - \begin{pmatrix} 1 & 2 & 30 \\ 4 & 5 & 6 \\ -7 & 0 & 11 \end{pmatrix}\)

Step 2

Step 2 - Subtract each Matrix B entry from the Matrix A entry in the same position.

In this problem: Each Matrix B entry is subtracted from the Matrix A entry in the same row and column.

\(\begin{pmatrix} 1000 - 1 & -2 - 2 & 33 - 30 \\ 4 - 4 & 15 - 5 & 6 - 6 \\ 7 - (-7) & 8 - 0 & 9 - 11 \end{pmatrix}\)

Step 3

Step 3 - Write each difference in the matching position of the result matrix.

In this problem: Each difference is placed back into the same position in the answer matrix.

\(\begin{pmatrix} 1000 - 1 = 999 & -2 - 2 = -4 & 33 - 30 = 3 \\ 4 - 4 = 0 & 15 - 5 = 10 & 6 - 6 = 0 \\ 7 - (-7) = 14 & 8 - 0 = 8 & 9 - 11 = -2 \end{pmatrix} = \begin{pmatrix} 999 & -4 & 3 \\ 0 & 10 & 0 \\ 14 & 8 & -2 \end{pmatrix}\)

Final Answer

\(\)
Matrix A
Matrix B