standarddeviationcalculator.net

Updated Free · runs in your browser

Math

Determinant calculator

Type a square matrix, one row per line, and get its determinant with the working. For 2×2 and 3×3 matrices the calculator expands by cofactors (or by Sarrus's rule if you choose it); for larger ones it row-reduces to triangular form and shows what each row operation does to the determinant.

One row per line; separate entries with spaces or commas. Up to 8×8. Fractions such as 2/3 stay exact.

det(A), 3×3 50
Method shownCofactor expansion along row 1
Invertible?Yes: det ≠ 0
|det| (volume scale factor)50
Cross-check (elimination)50
Show the working, step by step
  1. Expand along row 1: det A = Σ (−1)i+j aij Mij, where Mij is the determinant left after deleting row i and column j.

    A =4321−2531−1
  2. Entry a11 = 4, sign (−1)1+1 = +. Cover row 1 and column 1 for the minor.

    M11 =−251−1

    M11 = (−2)(−1) − (5)(1) = 2 − 5 = −3 term = +4 × (−3) = −12

  3. Entry a12 = 3, sign (−1)1+2 = −. Cover row 1 and column 2 for the minor.

    M12 =153−1

    M12 = (1)(−1) − (5)(3) = −1 − 15 = −16 term = −3 × (−16) = 48

  4. Entry a13 = 2, sign (−1)1+3 = +. Cover row 1 and column 3 for the minor.

    M13 =1−231

    M13 = (1)(1) − (−2)(3) = 1 − (−6) = 7 term = +2 × 7 = 14

  5. Add the terms.

    det A = 4·(−3) − 3·(−16) + 2·7 = 50

Worked in exact fractions.

The formulas

2×2: det [a b; c d] = ad − bc n×n, expanding along row i: det A = Σⱼ (−1)^(i+j) aᵢⱼ Mᵢⱼ (Mᵢⱼ = determinant with row i and column j deleted) Triangular matrix: det = product of the diagonal entries

A worked example: cofactor expansion

The default matrix is

A = [ 4 3 2 1 −2 5 3 1 −1 ]

No row has a zero, so expand along row 1 with the signs + − +:

  1. a₁₁ = 4. Delete row 1 and column 1: M₁₁ = (−2)(−1) − (5)(1) = 2 − 5 = −3. Term: +4 × (−3) = −12.
  2. a₁₂ = 3. Delete row 1 and column 2: M₁₂ = (1)(−1) − (5)(3) = −1 − 15 = −16. Term: −3 × (−16) = +48.
  3. a₁₃ = 2. Delete row 1 and column 3: M₁₃ = (1)(1) − (−2)(3) = 1 + 6 = 7. Term: +2 × 7 = 14.
  4. det A = −12 + 48 + 14 = 50.

When a row or column contains zeros, expand along it instead: every zero entry removes a whole minor from the work. The calculator picks the row with the most zeros automatically.

The same matrix by Sarrus's rule

Copy the first two columns to the right. Add the three products running down to the right: 4(−2)(−1) + 3(5)(3) + 2(1)(1) = 8 + 45 + 2 = 55. Subtract the three running up to the right: 2(−2)(3) + 4(5)(1) + 3(1)(−1) = −12 + 20 − 3 = 5. So det A = 55 − 5 = 50.

The same matrix by row reduction

  1. Swap R1 and R2 to get a pivot of 1. One swap: the sign flips.
  2. R2 → R2 − 4R1 and R3 → R3 − 3R1 give rows [1 −2 5], [0 11 −18], [0 7 −16]. No change.
  3. R3 → R3 − (7/11)R2 makes the last row [0 0 −50/11]. No change.
  4. The matrix is upper triangular. det A = −(1 × 11 × (−50/11)) = 50, the minus coming from the swap.

A 4×4 example

For the matrix with rows 0 2 1 3, 1 1 0 2, 2 0 3 1 and 1 4 2 0, row reduction swaps R1 and R2 (sign flips), clears column 1, then column 2 with R3 → R3 + R2 and R4 → R4 − (3/2)R2, and column 3 with R4 → R4 − (1/8)R3. The diagonal ends up as 1, 2, 4 and −13/2, so det = −(1 × 2 × 4 × (−13/2)) = 52. Choose “Cofactor expansion” to see the same answer from its 3×3 minors (the zero in row 1 removes one of them).

Properties that save work

PropertyEffect on det
Swap two rows (or columns)Changes sign
Multiply one row by kMultiplies det by k
Add a multiple of one row to anotherNo change
Transposedet Aᵀ = det A
Productdet(AB) = det A × det B
Inversedet A⁻¹ = 1 / det A
Scale the whole n×n matrixdet(kA) = kⁿ det A
Triangular matrixProduct of the diagonal

Common mistakes

  • Forgetting the sign pattern. The signs alternate + − + − along row 1 and in a checkerboard everywhere else. A slip on one sign changes the answer completely.
  • Scaling a row without compensating. Dividing a row by 3 to make a pivot of 1 divides the determinant by 3; multiply it back at the end.
  • Assuming det(kA) = k det A. Every one of the n rows is scaled, so it is kⁿ det A: doubling a 3×3 matrix multiplies its determinant by 8.
  • Assuming det(A + B) = det A + det B. The determinant is not additive.

Common questions

How do you find the determinant of a 3×3 matrix?

Expand along a row: multiply each entry by the 2×2 determinant left when its row and column are deleted, attach the signs + − +, and add. For the default matrix, row 1 gives 4(−3) − 3(−16) + 2(7) = −12 + 48 + 14 = 50. The rule of Sarrus gives the same answer by adding three diagonal products and subtracting three others.

What does the determinant tell you?

Whether the matrix is invertible (det ≠ 0) and, geometrically, how it scales area or volume: a 3×3 matrix with determinant 50 turns a unit cube into a solid of volume 50. A negative determinant means the transformation also reverses orientation, like a mirror.

Does the rule of Sarrus work for 4×4 matrices?

No. Sarrus's diagonal pattern is special to 3×3 matrices. A 4×4 determinant has 24 terms, and the diagonals give only 8 of them. For 4×4 and larger use cofactor expansion or row reduction.

How do row operations change the determinant?

Adding a multiple of one row to another leaves it unchanged. Swapping two rows changes its sign. Multiplying a row by k multiplies the determinant by k. Reduce to triangular form using the first two operations and the determinant is the product of the diagonal, with one sign change per swap.

When is a determinant zero?

When the rows (or columns) are linearly dependent. Obvious signs: a row or column of zeros, two equal rows, or one row a multiple of another. The matrix with rows 1 2 3, 4 5 6, 7 8 9 has determinant 0 because row 3 = 2 × row 2 − row 1.

Which is faster for large matrices, cofactor expansion or row reduction?

Row reduction, by a wide margin. Cofactor expansion of an n×n matrix involves about n! products: 40,320 for an 8×8. Row reduction needs roughly n³/3 operations, about 170 for an 8×8. That is why this calculator switches to row reduction above 3×3 unless you ask otherwise.