Matrix Subtraction — Definition, Formula & Examples
Key Formula
If A=[aij] and B=[bij], then A−B=[aij−bij]
Where:
- aij = The entry in row i, column j of matrix A
- bij = 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.
A−B=[8−23−45−110−6]
Step 3: Compute each difference to get the resulting matrix.
A−B=[6−144]
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
- Matrix — The fundamental object being subtracted
- Matrix Addition — The analogous operation using addition
- Matrix Multiplication — Another core matrix operation
- Scalar Multiplication of a Matrix — Multiplying every entry by a constant

![Matrix subtraction: [1,2,3; 4,5,6] - [2,-5,1; 7,10,-1] = [-1,7,2; -3,-5,7]](/m/m_assets/m17.gif)