Matrix Calculator
Result
How Matrix Operations Are Calculated
Addition and subtraction combine two matrices of identical dimensions entry by entry: each result cell is simply the sum or difference of the corresponding cells in A and B. Multiplication is different — for A x B, the entry in row i, column j of the result is the dot product of row i of A and column j of B, which is only defined when the number of columns in A equals the number of rows in B. The determinant is computed here by cofactor expansion along the first row (for 2x2, it's the classic ad - bc). The inverse uses the adjugate method: A-1 = (1 / det(A)) x adj(A), where adj(A) is the transpose of the cofactor matrix — this only exists when det(A) is nonzero, which is why a singular matrix has no inverse.
A Common Mix-Up: Matrix Multiplication Is Not Commutative
Unlike ordinary number multiplication, A x B usually does not equal B x A for matrices — the order matters, and swapping it can even change whether the multiplication is defined at all. If you're working through a system of linear equations or a transformation pipeline, always keep track of which matrix is applied first. If your underlying task is really about solving equations rather than matrix algebra itself, the quadratic formula calculator may be a faster route for a single unknown.
When the Determinant Is Zero
A determinant of zero means the matrix is "singular" — it has no inverse, and geometrically it means the transformation collapses space into a lower dimension (a 3x3 matrix with a zero determinant flattens 3D space onto a plane or line). If you need a single scalar count or ratio result rather than full matrix output, the scientific calculator handles the underlying arithmetic for one-off computations.
Frequently Asked Questions
Why does my matrix have no inverse?
A matrix only has an inverse if its determinant is nonzero. If the determinant equals zero, the matrix is called singular, and no inverse exists no matter how you rearrange the entries - this calculator will tell you explicitly when that happens instead of showing a meaningless result.
Why can't I multiply any two matrices together?
Matrix multiplication A x B is only defined when the number of columns in A equals the number of rows in B, because each result entry is a dot product between a row of A and a column of B of matching length. This calculator keeps both matrices at the same size you select (2x2 or 3x3) so multiplication is always valid.