Answer: For [[4, 7], [2, 6]] the determinant is 4×6 − 7×2 = 10 and the inverse is [[0.6, −0.7], [−0.2, 0.4]]. The 3×3 default [[2, 1, 3], [0, 4, 5], [1, 2, 6]] has determinant 21; a determinant of 0 means no inverse.
Determinant, inverse, transpose, and multiplication for 2×2 through 4×4
For a 2×2 matrix [[a, b], [c, d]]: det = ad − bc, and the inverse is (1/det) × [[d, −b], [−c, a]]. So [[4, 7], [2, 6]] has det = 24 − 14 = 10 and inverse [[0.6, −0.7], [−0.2, 0.4]]. A 3×3 determinant expands along a row: [[2, 1, 3], [0, 4, 5], [1, 2, 6]] gives 2(14) − 1(−5) + 3(−4) = 21. If det = 0 the matrix is singular — no inverse exists.
| Operation | Formula | Works when |
|---|---|---|
| 2×2 determinant | det = ad − bc | Always |
| 2×2 inverse | (1/det) × [[d, −b], [−c, a]] | det ≠ 0 |
| 3×3 determinant | a(ei − fh) − b(di − fg) + c(dh − eg) | Always (expansion along row 1) |
| Transpose | Entry (i, j) moves to (j, i) | Always |
| Multiply A × B | Row of A into column of B; (AB)ᵢⱼ = Σₖ AᵢₖBₖⱼ | Columns of A = rows of B |
| Identity I | 1s on the diagonal, 0s elsewhere; A × I = A | Always |
The calculator computes 4×4 determinants and inverses by Gaussian elimination (row reduction with partial pivoting), which is the same method software libraries use. Results are exact for integer-friendly inputs and rounded to 4 decimals otherwise.
Matrices package a system of linear equations into a grid you can compute with. The determinant tells you whether the system has a unique solution, the inverse undoes the transformation, and multiplication chains transformations together. This calculator handles all four operations on square matrices up to 4×4 and shows the formula behind each answer.
For 2×2, it's ad − bc, the difference of the diagonal products. For 3×3, cofactor expansion along the first row: a(ei − fh) − b(di − fg) + c(dh − eg). The determinant is the signed scale factor of the transformation — det 10 means areas grow 10×, det 0 means space collapses flat.
The inverse undoes a matrix: A × A⁻¹ = I, the identity. For 2×2 it's swap-and-negate over the determinant. For 3×3 and 4×4 the calculator uses Gauss-Jordan elimination, row-reducing [A | I] until the left half becomes I and the right half is A⁻¹. Singular matrices (det = 0) get flagged instead of producing garbage.
Transpose flips rows and columns across the main diagonal. Multiplication takes each row of A into each column of B — element (i, j) of the product is the dot product of row i of A with column j of B. Order matters: AB ≠ BA in general, so enter the matrices in the order the problem gives.
Start with A = [[4, 7], [2, 6]]. Determinant: (4)(6) − (7)(2) = 10. Inverse: (1/10) × [[6, −7], [−2, 4]] = [[0.6, −0.7], [−0.2, 0.4]]. Multiply A × A⁻¹ and you get [[1, 0], [0, 1]] — the identity, which is the definition of an inverse and a free way to check your work.
Now 3×3: [[2, 1, 3], [0, 4, 5], [1, 2, 6]]. Expanding along the first row: 2(4·6 − 5·2) − 1(0·6 − 5·1) + 3(0·2 − 4·1) = 2(14) − 1(−5) + 3(−4) = 28 + 5 − 12 = 21. Nonzero, so an inverse exists. Exactly, it's (1/21) × [[14, 0, −7], [5, 9, −10], [−4, −3, 8]], and the calculator shows it to 4 decimals: [[0.6667, 0, −0.3333], [0.2381, 0.4286, −0.4762], [−0.1905, −0.1429, 0.381]].
Counter-example worth knowing: [[2, 4], [1, 2]] has det = 4 − 4 = 0. The second row is half the first, so the matrix squashes the plane onto a line and no inverse exists.
All the standard ones. We took the page's two 3 × 3 defaults, A = [[2, 1, 3], [0, 4, 5], [1, 2, 6]] and B = [[1, 0, 2], [3, 1, 0], [0, 2, 1]], and ran them through the calculator's own code. det(A) is 21 and det(B) is 13.
| Rule | What it says | Check with A and B below |
|---|---|---|
| Product | det(AB) = det(A) × det(B) | det(AB) = 273 = 21 × 13 |
| Order | det(AB) = det(BA), even though AB ≠ BA | det(BA) = 273 |
| Transpose | det(Aᵀ) = det(A) | 21 |
| Inverse | det(A⁻¹) = 1 / det(A) | 0.0476 (1/21, rounded) |
| Scaling | det(kA) = kⁿ det(A) for an n × n matrix | det(2A) = 168 = 2³ × 21 |
| Row swap | Swapping two rows flips the sign | −21 |
| Row addition | Adding a multiple of one row to another changes nothing | 21 after row 2 + 3 × row 1 |
The product rule is the one that saves the most time on homework. If either matrix has a zero determinant, so does the product, so you can tell AB is singular without multiplying anything out. And the row rules are why elimination works at all: you can clear entries below the diagonal without changing the answer, then just multiply the diagonal.
Write the system as Ax = b, then x = A⁻¹b. Take 4x + 7y = 5 and 2x + 6y = 4. The coefficient matrix is the 2 × 2 default, [[4, 7], [2, 6]], and its inverse is [[0.6, −0.7], [−0.2, 0.4]].
Plug them back in: 4(0.2) + 7(0.6) = 5 and 2(0.2) + 6(0.6) = 4. Both check out. The calculator doesn't take a right-hand side vector, so do that last step by hand or put b in the first column of a square B matrix and use A × B. For anything bigger than 3 × 3, elimination on the augmented matrix is usually faster than finding the full inverse, but the inverse is handy when you have to solve the same system for several b vectors.
Because cofactor expansion blows up. The full expansion of an n × n determinant has n! terms, while row reduction takes roughly n³/3 multiplications.
| Matrix size | Terms in the full cofactor expansion (n!) | Rough multiplications by elimination (n³/3) |
|---|---|---|
| 2 × 2 | 2 | 3 |
| 3 × 3 | 6 | 9 |
| 4 × 4 | 24 | 21 |
| 5 × 5 | 120 | 42 |
| 10 × 10 | 3,628,800 | 333 |
| 20 × 20 | 2,432,902,008,176,640,000 | 2,667 |
At 4 × 4 the gap is small, 24 terms against about 21 steps. By 10 × 10 it's millions against a few hundred, and that's why linear algebra libraries factor matrices instead of expanding them. The page uses the explicit formula for 2 × 2 and 3 × 3 determinants and elimination with partial pivoting for 4 × 4. Every inverse, at any size, comes from Gauss-Jordan elimination on [A | I].
The 4 × 4 default, [[1, 2, 0, 1], [0, 1, 3, 0], [2, 0, 1, 1], [1, 1, 1, 1]], has determinant 4. Its inverse is [[0.75, 0.25, 1, −1.75], [0.75, 0.25, 0, −0.75], [−0.25, 0.25, 0, 0.25], [−1.25, −0.75, −1, 3.25]]. Every entry is a multiple of 0.25, which fits: dividing by a determinant of 4 tends to leave quarters.
No, and it's a good example of how different they can be. With the 3 × 3 defaults, AB = [[5, 7, 7], [12, 14, 5], [7, 14, 8]], while BA = [[4, 5, 15], [6, 7, 14], [1, 10, 16]]. Not a single entry matches, yet both have determinant 273. If you get a product that looks wrong, the order is the first thing to check. The page multiplies A × B, so put the left-hand matrix in the A grid.
That means the determinant is tiny, not zero. The display rounds to 4 decimal places. Try [[1, 1], [1, 1.0000001]]: the true determinant is 0.0000001, which shows as 0, but the inverse comes back with entries around 10,000,000. A matrix like that is nearly singular. Small rounding in your inputs can swing the answer a lot, so treat results with huge entries as a warning sign rather than a clean answer. A truly singular matrix, such as one with a row that's twice another, gets flagged as singular on the inverse screen.
For a slower, step-by-step walk through cofactor expansion, see our guide on how to calculate a matrix determinant. If your problem ends in a quadratic, the quadratic equation solver finishes the job, and the scientific calculator handles the arithmetic for checking an answer by hand.
Multiply the main diagonal, multiply the anti-diagonal, subtract: det = ad − bc. For [[4, 7], [2, 6]] that's (4)(6) − (7)(2) = 24 − 14 = 10. If the result is 0, the matrix is singular and has no inverse.
Swap the diagonal entries, negate the off-diagonal entries, and divide everything by the determinant: inverse = (1/det) × [[d, −b], [−c, a]]. For [[4, 7], [2, 6]], det = 10, so the inverse is [[6/10, −7/10], [−2/10, 4/10]] = [[0.6, −0.7], [−0.2, 0.4]]. Check it: A × A⁻¹ should give the identity matrix.
Cofactor expansion along the first row. For [[2, 1, 3], [0, 4, 5], [1, 2, 6]]: det = 2(4·6 − 5·2) − 1(0·6 − 5·1) + 3(0·2 − 4·1) = 2(14) − 1(−5) + 3(−4) = 28 + 5 − 12 = 21. Expand along whichever row or column has the most zeros — the zeros make minors vanish.
When its determinant is 0 — a singular matrix. Geometrically, the transformation squashes space flat (all of 2D onto a line, or 3D onto a plane), and information is lost that no matrix can recover. Algebraically, some system Ax = b under it has no solution or infinitely many. Rows that are multiples of each other, like [[2, 4], [1, 2]], always produce det = 0.
Yes. AB and BA are usually different matrices, and sometimes only one of them is even defined when the shapes differ. For [[1, 2], [3, 4]] × [[5, 6], [7, 8]] the product is [[19, 22], [43, 50]], but reversing the order gives [[23, 34], [31, 46]]. Multiply row-into-column in the order the problem states.
The matrix with rows and columns swapped: entry (i, j) moves to (j, i). The transpose of [[1, 2, 3], [4, 5, 6]] is [[1, 4], [2, 5], [3, 6]]. A symmetric matrix equals its own transpose, and (AB)ᵀ = BᵀAᵀ — the order flips.
The transformation flips orientation, like a mirror image, while scaling area or volume by the absolute value. Swapping two rows of a matrix flips the sign, so the 3 by 3 default with det 21 gives -21 after a row swap.
No. It works on square matrices of the same size, 2 by 2, 3 by 3 or 4 by 4, for both A and B. To multiply a 2 by 3 by a 3 by 2, pad both to 3 by 3 with zeros and ignore the extra row and column of the result.