The short answer
A matrix is a rectangular grid of numbers. Adding or subtracting matrices works entry by entry, but multiplying two matrices combines rows of the first with columns of the second — nothing like regular multiplication. Two matrices can only be multiplied when the first matrix's number of columns matches the second matrix's number of rows.
Key takeaways
- Matrix multiplication is not commutative — A × B usually doesn't equal B × A, and one order might not even be defined.
- A matrix only has an inverse if it's square and its determinant is nonzero; a zero determinant means the matrix is "singular" and can't be inverted.
- Multiplying a matrix by the identity matrix leaves it unchanged — the matrix equivalent of multiplying a number by 1.
- The determinant of a 2×2 matrix [[a,b],[c,d]] is ad − bc — a single number that reveals whether the matrix can be inverted.
2×2 determinant and inverse formulas
det([[a,b],[c,d]]) = ad − bc
inverse = (1/det) × [[d,−b],[−c,a]]
If ad − bc equals 0, the matrix has no inverse — dividing by a determinant of 0 is undefined, just like dividing a number by 0.
Worked example: multiplying two 2×2 matrices
A = [[1,2],[3,4]] and B = [[5,6],[7,8]]:
A × B = [[1×5+2×7, 1×6+2×8], [3×5+4×7, 3×6+4×8]] = [[19,22],[43,50]]
B × A = [[5×1+6×3, 5×2+6×4], [7×1+8×3, 7×2+8×4]] = [[23,34],[31,46]]
A × B and B × A land on completely different matrices — concrete proof that matrix multiplication doesn't commute the way ordinary number multiplication does.
When matrix operations are undefined
| Operation | Requirement |
|---|---|
| Addition / subtraction | Both matrices must have identical dimensions |
| Multiplication (A × B) | A's column count must equal B's row count |
| Inverse | Matrix must be square with a nonzero determinant |
Common mistakes to avoid
- Assuming A × B equals B × A the way it would for ordinary numbers — order changes the result, and sometimes only one order is even defined.
- Trying to add or subtract matrices with different dimensions — both matrices need identical row and column counts.
- Attempting to invert a non-square matrix, or one whose determinant is 0 — both cases have no valid inverse.
- Confusing transpose (flip rows and columns) with inverse (an entirely different operation that undoes multiplication) — they solve different problems.
Related calculators
- Quadratic Formula Calculator — solve equations that matrices can also represent as systems.
- Scientific Calculator — handle the individual arithmetic behind each matrix entry.
- Statistics Calculator — analyze the kind of tabular data matrices are often used to store.
- Basic Calculator — double-check individual multiplication and addition steps by hand.