About the Matrix Subtraction Calculator
Subtract one matrix from another element by element (A − B) for matrices of equal size.
Also known as: subtract matrices, matrix difference.
How to use this calculator
- Enter matrix a (rows on new lines), matrix b.
- The result updates instantly as you type — press Calculate (or Enter) at any time.
- Review the breakdown shown under the main result.
- Use Copy result or Share to save the answer or send a link with your inputs.
Formula
(A − B)ᵢⱼ = Aᵢⱼ − Bᵢⱼ
Worked example
Using the values pre-filled in the calculator above:
- Matrix A (rows on new lines): 1 2 3 0 1 4 5 6 0
- Matrix B: 2 0 1 1 3 2 1 1 1
the calculator returns:
- A − B: [ -1 2 2 ] [ -1 -2 2 ] [ 4 5 -1 ]