Matrix Subtraction

Learn how to subtract matrices correctly and understand conformability requirements

Introduction to Matrix Subtraction

Just like matrix addition, matrix subtraction is a fundamental operation in linear algebra. It follows the same conformability rules as addition and operates on corresponding elements in the same way.

Matrix subtraction is closely related to addition and can actually be thought of as adding a negative matrix. This relationship makes it easy to understand and perform.

To maintain consistency with number notation, we use:

  • Lowercase letters for scalars: \(a, b, x, y\)
  • Uppercase letters for matrices: \(A, B, X, Y\)
Key Point:

Like addition, matrices must be conformable (same dimensions) to be subtracted. Subtraction can be viewed as adding the negative of a matrix: \(A - B = A + (-B)\)

Conformability Requirements

The Essential Rule

Conformable Matrices:

Two matrices are conformable for subtraction if and only if they have the same number of rows and the same number of columns.

In other words, both matrices must have identical dimensions: \(p \times q\).

Valid and Invalid Subtractions

Valid Subtraction

A: 2×3 matrix

B: 2×3 matrix

Can be subtracted ✓

Invalid Subtraction

A: 2×3 matrix

B: 2×2 matrix

Cannot be subtracted ✗

Common Mistake:

A 2×3 matrix cannot be subtracted from a 3×2 matrix, even though they contain the same number of elements (6). The dimensions must be identical.

The Matrix Subtraction Rule

How to Subtract Matrices

Subtraction Operation:

To subtract two conformable matrices, subtract corresponding elements (elements in the same position).

If \(C = A - B\), then each element \(c_{ij} = a_{ij} - b_{ij}\)

Matrix Subtraction Formula:
\(\displaystyle \begin{bmatrix}a_{11} & a_{12} & \cdots & a_{1q} \\ a_{21} & a_{22} & \cdots & a_{2q} \\ \vdots & \vdots & \ddots & \vdots \\ a_{p1} & a_{p2} & \cdots & a_{pq}\end{bmatrix} - \begin{bmatrix}b_{11} & b_{12} & \cdots & b_{1q} \\ b_{21} & b_{22} & \cdots & b_{2q} \\ \vdots & \vdots & \ddots & \vdots \\ b_{p1} & b_{p2} & \cdots & b_{pq}\end{bmatrix}\)

\(\displaystyle = \begin{bmatrix}a_{11}-b_{11} & a_{12}-b_{12} & \cdots & a_{1q}-b_{1q} \\ a_{21}-b_{21} & a_{22}-b_{22} & \cdots & a_{2q}-b_{2q} \\ \vdots & \vdots & \ddots & \vdots \\ a_{p1}-b_{p1} & a_{p2}-b_{p2} & \cdots & a_{pq}-b_{pq}\end{bmatrix}\)
Important Property:

The resulting difference matrix has the same dimensions as the two matrices being subtracted.

Relationship Between Subtraction and Addition

Subtraction as Addition

Matrix subtraction can always be rewritten as addition of a negative matrix. This relationship is mathematically elegant and sometimes useful for calculations.

Equivalence Relationship
\(\displaystyle A - B = A + (-B)\)

The negative matrix \(-B\) is obtained by multiplying all elements of \(B\) by \(-1\).

Example: Subtraction as Addition

Convert Subtraction to Addition

Original subtraction:

\(\displaystyle \begin{bmatrix}5 & 3 \\ 1 & 2\end{bmatrix} - \begin{bmatrix}2 & 1 \\ 0 & 1\end{bmatrix}\)

Rewritten as addition:

\(\displaystyle = \begin{bmatrix}5 & 3 \\ 1 & 2\end{bmatrix} + \begin{bmatrix}-2 & -1 \\ 0 & -1\end{bmatrix}\)

Result:

\(\displaystyle = \begin{bmatrix}3 & 2 \\ 1 & 1\end{bmatrix}\)

Practical Examples

Example 1: Generic 2×3 Matrices

Subtract Two 2×3 Matrices with Variables
\(\displaystyle M = \begin{bmatrix}a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23}\end{bmatrix} - \begin{bmatrix}b_{11} & b_{12} & b_{13} \\ b_{21} & b_{22} & b_{23}\end{bmatrix}\)

Result:

\(\displaystyle = \begin{bmatrix}a_{11}-b_{11} & a_{12}-b_{12} & a_{13}-b_{13} \\ a_{21}-b_{21} & a_{22}-b_{22} & a_{23}-b_{23}\end{bmatrix}\)

Example 2: Numerical 2×3 Matrices

Subtract Two 2×3 Matrices with Numbers

Step 1: Verify dimensions

  • First matrix: 2 rows, 3 columns ✓
  • Second matrix: 2 rows, 3 columns ✓
  • Dimensions match → matrices are conformable

Step 2: Subtract corresponding elements

\(\displaystyle \begin{bmatrix}12 & 8 & -3 \\ -14 & 5 & 6\end{bmatrix} - \begin{bmatrix}2 & 4 & 6 \\ 3 & 5 & 4\end{bmatrix}\)

Step 3: Calculate difference

\(\displaystyle = \begin{bmatrix}12-2 & 8-4 & -3-6 \\ -14-3 & 5-5 & 6-4\end{bmatrix} = \begin{bmatrix}10 & 4 & -9 \\ -17 & 0 & 2\end{bmatrix}\)

Result Properties:

  • Difference matrix is also 2×3
  • Each element is the difference of corresponding elements
  • Position (1,1): 12 - 2 = 10
  • Position (2,1): -14 - 3 = -17
  • Position (2,2): 5 - 5 = 0

Properties of Matrix Subtraction

Property Formula Explanation
Not Commutative \(A - B \neq B - A\) Order matters; reversing changes the sign
Associative \((A - B) - C = A - (B + C)\) Grouping affects result with addition
Self-Subtraction \(A - A = O\) Subtracting a matrix from itself gives zero matrix
Zero Element \(A - O = A\) Subtracting zero matrix gives the original matrix
Subtraction = Addition \(A - B = A + (-B)\) Can be converted to addition of negative matrix

Tips for Matrix Subtraction

Before Subtracting: Check Conformability

Always verify that the matrices have identical dimensions before attempting subtraction. This simple check prevents calculation errors.

During Subtraction: Watch Your Signs

  • Pay careful attention to sign changes
  • Subtracting a negative number gives a positive result
  • Double-check calculations involving negative elements

Alternative Approach: Use Addition

  • Convert subtraction to addition: \(A - B = A + (-B)\)
  • This can reduce sign errors
  • Some prefer this method for complex matrices

After Subtraction: Verify Results

  • Check that the difference matrix has correct dimensions
  • Verify by adding the result back: \((A - B) + B = A\)
  • Spot-check a few elements by recalculating

Key Points to Remember

  • Matrices must be conformable (same dimensions) to be subtracted
  • Subtract corresponding elements from each matrix
  • The difference matrix has the same dimensions as the input matrices
  • Matrix subtraction is NOT commutative: \(A - B \neq B - A\)
  • Subtraction can be converted to addition: \(A - B = A + (-B)\
  • Subtracting a matrix from itself gives the zero matrix: \(A - A = O\)
  • Use verification: \((A - B) + B = A\)
  • Use online calculators to verify your results

Practice Your Skills

Test your understanding of matrix subtraction with our interactive calculator:

Matrix Subtraction Calculator →






Is this page helpful?            
Thank you for your feedback!

Sorry about that

How can we improve it?