Add, subtract, scale, multiply or transpose matrices up to 3×3, and find the determinant or inverse — with the result laid out as a grid and shaded by magnitude.
Operation
A + B
Result
matrix
Calculator
Result
A + B
Result of A + B.
Result heatmap
6
8
10
12
How the matrix operations work
Addition, subtraction and scalar multiplication work entry by entry. Matrix multiplication takes the dot product of each row of A with each column of B, so the number of columns of A must equal the number of rows of B. The transpose flips the matrix across its main diagonal.
The determinant is found by cofactor expansion and tells you whether a square matrix is invertible — it must be non-zero. The inverse is the adjugate (the transpose of the cofactor matrix) divided by the determinant, and multiplying a matrix by its inverse returns the identity.
Why can’t I multiply these two matrices?
Matrix multiplication is only defined when the number of columns of the first matrix equals the number of rows of the second. A 2×2 times a 2×3 works, but a 2×2 times a 1×3 does not.
What does a zero determinant mean?
A square matrix with a determinant of zero is singular: it has no inverse, and the linear system it represents either has no solution or infinitely many. The calculator reports an error instead of an inverse in that case.
How large a matrix is supported?
Up to 3×3. That covers the determinants and inverses taught in most algebra and intro linear-algebra courses, where the cofactor method is shown step by step.
Results are estimates. Verify with a professional for important decisions.
About this calculator
This calculator performs the most common matrix operations on matrices up to 3×3: addition, subtraction, scalar multiplication, matrix multiplication, transpose, determinant, and inverse. Enter your matrix values, pick an operation, and the result appears instantly alongside a magnitude heatmap that highlights the relative size of each entry.
How to read your results
For scalar operations such as the determinant, the headline number is the result. For matrix operations the result card names the operation, and the heatmap grid below it shows the output matrix — each cell is shaded according to how large its absolute value is relative to the biggest entry, so you can spot dominant entries at a glance. The stat strip at the top of the page confirms the current operation and whether the output is a scalar or a full matrix.
Worked example
Set both matrices to 2×2, choose Multiply, and use A = [[1, 2], [3, 4]] with B = [[5, 6], [7, 8]].
The product A × B is [[19, 22], [43, 50]]. Entry (1,1) = 1×5 + 2×7 = 19; entry (1,2) = 1×6 + 2×8 = 22; and so on — the heatmap shows 50 as the darkest cell because it is the largest value in the result.
Frequently asked questions
When is matrix multiplication defined?
Matrix multiplication A × B is defined only when the number of columns in A equals the number of rows in B. For two square matrices of the same size this is always satisfied, but note that A × B and B × A generally give different results — matrix multiplication is not commutative.
What does the determinant tell you?
The determinant is a single number that summarises a square matrix. A non-zero determinant means the matrix has a unique inverse and the corresponding system of equations has exactly one solution. A determinant of zero means the matrix is singular — its rows are linearly dependent and no inverse exists.
How is the inverse calculated?
The calculator uses the adjugate (classical adjoint) method: it forms the cofactor matrix, transposes it to get the adjugate, then divides every entry by the determinant. For the 2×2 case [[a,b],[c,d]] this gives [[d,−b],[−c,a]] divided by (ad − bc). If the determinant is zero an error is shown instead.
How it's calculated
Addition and subtraction add or subtract corresponding entries. Scalar multiplication multiplies every entry by the constant k. Matrix multiplication follows the dot-product rule: entry (i, j) of the result is the dot product of row i of A and column j of B. The transpose flips a matrix over its main diagonal, exchanging rows and columns. The determinant is computed by cofactor expansion along the first row (Wolfram MathWorld: Determinant). The inverse uses the adjugate divided by the determinant (Wolfram MathWorld: Matrix Inverse); a singular matrix with determinant 0 has no inverse.
Spot a translation issue, a calculation issue, or have a suggestion? Let us know.