Matrix Subtraction Calculator
Work out matrix subtraction instantly with clear inputs, formula shown and shareable results.
About Matrix Subtraction Calculator
Matrix subtraction works entry by entry, so both matrices must have identical dimensions. Unlike multiplication it is straightforward and commutes up to sign: A − B = −(B − A).
Formula
Matrix subtraction
(A − B)ᵢⱼ = Aᵢⱼ − Bᵢⱼ
Worked example
With the default values below, Matrix Subtraction Calculator returns A − B of [4, 5] [-2, 5]. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Matrix A, row by row
- 5, 8, 2, 7
- Matrix B, row by row
- 1, 3, 4, 2
- Columns per rowaccepts 1–8
- 2
Results
- A − B
- [4, 5] [-2, 5]
- A + B for comparison
- [6, 11] [6, 9]
- Largest entry of A − B
- 5.000000
- Sum of all entries of A − B
- 12.000000
Step by step
- 1Values used
- 2Matrix subtraction
- 3A − B= [4, 5] [-2, 5]
- 4A + B for comparison= [6, 11] [6, 9]
- 5Largest entry of A − B= 5.000000
- 6Sum of all entries of A − B= 12.000000
Assumptions and limits
- The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Subtract [[1,3],[4,2]] from [[5,8],[2,7]].
[[4, 5], [−2, 5]], each entry taken independently.
Can I subtract matrices of different shapes?
No. Entry-by-entry operations require the same number of rows and columns.
Related Calculators
You might also need
- Adjoint Of A Matrix CalculatorAlso in Linear Algebra & Matrices
- Cofactor Matrix CalculatorAlso in Linear Algebra & Matrices
- Identity Matrix CalculatorAlso in Linear Algebra & Matrices
- Matrix Power CalculatorAlso in Linear Algebra & Matrices
- Matrix Transpose CalculatorAlso in Linear Algebra & Matrices
- Vector Subtraction CalculatorAlso in Linear Algebra & Matrices
