The entrywise rule
Every entry keeps its row and column address. Subtraction is defined only when both matrices have exactly the same number of rows and columns.
Let A = [aij] and B = [bij].
A, B ∈ ℝm × n(A − B)ij = aij − bij
A worked example
Select an entry in any matrix to trace the same position through the complete subtraction.
Select any entry to trace its calculation
Subtraction is addition of an inverse
Matrix subtraction introduces no separate arithmetic machinery. Negate every entry of the second matrix, then use matrix addition.
The additive inverse −B has the same dimensions as B, with every entry multiplied by −1. Adding it to A produces the same entrywise difference.
Key properties
Subtraction is related to addition, but its order and grouping matter. These rules prevent the most common algebraic mistakes.
Not commutative. Reversing the matrices negates the result: B − A = −(A − B).
Not associative. Parentheses determine which entries are negated before they are combined.
Self-cancellation. Each entry minus itself is zero, producing the zero matrix of the same dimensions.
Zero on the right. Subtracting the matching zero matrix leaves every entry unchanged.
Dimensions must match
Subtraction pairs entries by address, so every position in the first matrix must have a corresponding position in the second.
(3 × 2) − (3 × 2)
Both matrices contain the same six row-column positions.
(3 × 2) − (2 × 3)
The shapes differ, so the entries cannot be paired position by position.