Matrix Subtraction Calculator
About Matrix Subtraction Calculator
Matrix subtraction works element by element, exactly like addition but with the second matrix subtracted rather than added. The entry in row 2, column 1 of the result is the entry in that position from A minus the entry in that position from B. Both matrices must have identical dimensions, and the calculator checks this before computing. The one thing to be careful about is order. Unlike addition, subtraction is not commutative: A minus B is the negative of B minus A, and they are only equal when both matrices are identical. Getting the order backwards flips every sign in the result, which is an easy mistake to make when transcribing a problem. Subtraction is used constantly in practice, most often for finding the difference between a computed result and an expected one, or for computing residuals when comparing two datasets arranged as matrices. Set both grids to the same size, enter the values, and read the result. For the reverse operation see Matrix Addition Calculator.
How to use Matrix Subtraction Calculator
- Select an operation from the tab bar (Add, Multiply, etc.)
- Set matrix dimensions and enter values in the grid cells
- See the result matrix or scalar instantly
Frequently Asked Questions
- How do you subtract matrices?
- Subtract the entries in matching positions. The value in row i, column j of the result is the value in that position in the first matrix minus the value in that position in the second.
- Does the order matter in matrix subtraction?
- Yes. A minus B is not the same as B minus A; the second is the negative of the first. Only when both matrices are identical do the two give the same result, namely the zero matrix.
- Can I subtract matrices of different sizes?
- No. Both must have exactly the same number of rows and columns, for the same reason as addition. The operation is undefined otherwise.
- What does subtracting a matrix from itself give?
- The zero matrix, with a zero in every position. This is the additive identity, so adding it to any matrix leaves that matrix unchanged.
- Is subtraction the same as adding a negative?
- Yes. A minus B is the same as A plus the matrix formed by negating every entry of B, which is often how it is defined formally.
Related Tools
Also Available As