Mathwords logoMathwords

Matrix Subtraction — Definition, Formula & Examples

Matrix Subtraction

Matrices are subtracted term-by-term as shown below.

 

Matrix subtraction: [1,2,3; 4,5,6] - [2,-5,1; 7,10,-1] = [-1,7,2; -3,-5,7]

Key Formula

If A=[aij] and B=[bij], then AB=[aijbij]\text{If } A = [a_{ij}] \text{ and } B = [b_{ij}], \text{ then } A - B = [a_{ij} - b_{ij}]
Where:
  • aija_{ij} = The entry in row i, column j of matrix A
  • bijb_{ij} = The entry in row i, column j of matrix B

Worked Example

Problem: Subtract matrix B from matrix A, where A = [[8, 5], [3, 10]] and B = [[2, 1], [4, 6]].
Step 1: Confirm both matrices have the same dimensions. A is 2×2 and B is 2×2, so subtraction is defined.
Step 2: Subtract each corresponding entry: top-left, top-right, bottom-left, bottom-right.
AB=[825134106]A - B = \begin{bmatrix} 8-2 & 5-1 \\ 3-4 & 10-6 \end{bmatrix}
Step 3: Compute each difference to get the resulting matrix.
AB=[6414]A - B = \begin{bmatrix} 6 & 4 \\ -1 & 4 \end{bmatrix}
Answer: A − B = [[6, 4], [−1, 4]]

Why It Matters

Matrix subtraction is used throughout science and engineering to find differences between data sets, compute residuals in regression models, and update values in iterative algorithms. In computer graphics, subtracting matrices can represent changes in transformations applied to objects on screen.

Common Mistakes

Mistake: Trying to subtract matrices with different dimensions, such as a 2×3 matrix minus a 3×2 matrix.
Correction: Matrix subtraction is only defined when both matrices have exactly the same number of rows and the same number of columns.

Related Terms