What is the determinant of my matrix?
Type a square matrix. The determinant calculator shows the determinant as an exact fraction and a decimal, whether the matrix has an inverse, and every row operation.
- Determinant det(A)
- 49
The determinant of the matrix is 49.
- Determinant in decimals
- 49
- Does A have an inverse?
- Yes
- Elimination
- R2 → R2 − R1; R3 → R3 − 1/2 × R1; R3 → R3 − 11/6 × R2; Upper triangular: [2, -3, 1; 0, 3, -2; 0, 0, 49/6]; det = 2 × 3 × 49/6 = 49
Determinant det(A): 49. The determinant of the matrix is 49.
How is the determinant found?
How to calculate
Finds the determinant of a square matrix from 1 × 1 to 6 × 6 by Gaussian elimination in exact fractions, with every row operation and whether the matrix is invertible.
Example with the default inputs (Matrix A [2, -3, 1; 2, 0, -1; 1, 4, 5]): The determinant of the matrix is 49.
Method: Gaussian elimination to upper triangular form; det(A) = (−1)^(row swaps) × the product of the diagonal. For 2 × 2, det = ad − bc.
- Every cell is read as an exact fraction (1/3 is 1/3, 0.1 is 1/10), so the determinant has no rounding error.
- The pivot for each column is the first row, from the diagonal down, with a non-zero entry.
- The matrix is square, 1 × 1 to 6 × 6.
Worked examples
Each example is checked against the calculator on every build.
- Matrix A 2, -3, 1; 2, 0, -1; 1, 4, 5 gives Determinant det(A) 49, Determinant in decimals 49, Does A have an inverse? yes, Elimination R2 → R2 − R1; R3 → R3 − 1/2 × R1; R3 → R3 − 11/6 × R2; Upper triangular: [2, -3, 1; 0, 3, -2; 0, 0, 49/6]; det = 2 × 3 × 49/6 = 49.Source: OpenStax, Precalculus 2e, §9.8, 3 × 3 determinants (https://openstax.org/books/precalculus-2e/pages/9-8-solving-systems-with-cramers-rule)
- Matrix A 4, 7; 2, 6 gives Determinant det(A) 10, Does A have an inverse? yes.
- Matrix A 0, 1; 1, 0 gives Determinant det(A) -1, Elimination R1 ↔ R2; Upper triangular: [1, 0; 0, 1]; det = (-1)^1 × 1 × 1 = -1.
- Matrix A 1, 2, 3; 4, 5, 6; 7, 8, 9 gives Determinant det(A) 0, Does A have an inverse? no.
- Matrix A 0.5, 0.333333; 0.25, 1 gives Determinant det(A) 5/12, Determinant in decimals 0.4166666667.
- Matrix A -7 gives Determinant det(A) -7, Elimination Upper triangular: [-7]; det = -7.
How it works
The calculator reduces the matrix to upper triangular form (zeros below the diagonal) by Gaussian elimination, in exact fractions:
- For each column in turn, find the first row from the diagonal down whose entry in that column is not 0. If it is not the diagonal row, swap the two rows (each swap multiplies the determinant by −1).
- Below the diagonal, subtract the right multiple of the diagonal row from each row with a non-zero entry, to make that entry 0 (this does not change the determinant).
- If a column has no non-zero entry on or below the diagonal, the determinant is 0.
Then det(A) = (−1)^(number of swaps) × the product of the diagonal entries. For a 2 × 2 matrix this equals ad − bc, and for a 3 × 3 matrix it equals the cofactor expansion.
The page also shows whether A has an inverse: Yes when det(A) ≠ 0, No when it is 0.
Exact fractions
Each cell is read as an exact fraction: the fraction nearest to its number with a bottom of at most 1,000,000, when that fraction rounds to the same 64-bit float (so 1/3 is exactly 1/3, as in Python's Fraction(x).limit_denominator(10**6)); otherwise its shortest decimal, exactly (0.1234567 is 1234567/10000000).
How the answer is written
- Determinant: a fraction in lowest terms with the minus sign in front, such as
-7/10, or a whole number, such as49. - In decimals: the determinant rounded half up (away from zero) to 10 significant figures from its exact value, trailing zeros dropped, written like a JavaScript number: plain from 0.000001 up to below 10²¹, else e notation such as
1.5e-7. - Elimination steps, in order and separated by
;:- each row operation, rows counted from 1: a swap as
R1 ↔ R2, and "subtract m times row j from row i" asRi → Ri − m × Rj(or+for a negative m), with m a fraction in lowest terms and left out when it is 1:R2 → R2 − R1,R3 → R3 − 1/2 × R1. At most 30 operations are listed, thenand N more. Upper triangular: [a, b; 0, d], the triangular matrix written like the result (entries by,, rows by;).det = d1 × d2 × … = <det>, with(-1)^k ×in front after k swaps and negative factors in brackets, such asdet = (-1)^1 × 1 × 1 = -1. A 1 × 1 matrix with no swap showsdet = <det>.- When a column has no pivot, the last step is
Column c has no non-zero entry on or below the diagonal, so det = 0, and there is no triangular matrix.
- each row operation, rows counted from 1: a swap as
Worked examples by hand
[2, −3, 1; 2, 0, −1; 1, 4, 5]. R2 → R2 − R1 gives [0, 3, −2]. R3 → R3 − ½R1 gives [0, 11/2, 9/2]. R3 → R3 − (11/6)R2 gives [0, 0, 9/2 + 11/3] = [0, 0, 49/6]. The diagonal is 2, 3, 49/6 and there were no swaps, so det = 2 × 3 × 49/6 = 49. Check by cofactors: 2(0 × 5 − (−1) × 4) + 3(2 × 5 − (−1) × 1) + 1(2 × 4 − 0) = 8 + 33 + 8 = 49.
[4, 7; 2, 6]. det = 4 × 6 − 7 × 2 = 10, so the matrix has an inverse.
[0, 1; 1, 0]. Column 1 has 0 on the diagonal, so swap R1 and R2 to get [1, 0; 0, 1]. The diagonal product is 1, and one swap flips the sign: det = −1.
[1, 2, 3; 4, 5, 6; 7, 8, 9]. Row 3 − row 2 = [3, 3, 3] = row 2 − row 1, so the rows are dependent and det = 0: no inverse.
[1/2, 1/3; 1/4, 1]. det = 1/2 × 1 − 1/3 × 1/4 = 1/2 − 1/12 = 5/12 = 0.4166666667.
[−7]. A 1 × 1 matrix's determinant is its one entry: −7.
Other questions people ask
How do I find the determinant of a 2 × 2 matrix?
For [a, b; c, d], det = ad − bc. For [4, 7; 2, 6], det = 4 × 6 − 7 × 2 = 24 − 14 = 10.
How do I find the determinant of a 3 × 3 matrix?
Expand along the first row: det = a(ei − fh) − b(di − fg) + c(dh − eg) for [a, b, c; d, e, f; g, h, i]. For [2, −3, 1; 2, 0, −1; 1, 4, 5]: 2 × 4 − (−3) × 11 + 1 × 8 = 49. The calculator uses row elimination instead, which gives the same answer and works for larger matrices.
What does a determinant of 0 mean?
The matrix is singular: its rows (and columns) are dependent, it has no inverse, and a system of equations with it has either no solution or infinitely many. [1, 2, 3; 4, 5, 6; 7, 8, 9] has determinant 0 because row 3 − row 2 equals row 2 − row 1.
How do row operations change the determinant?
Swapping two rows flips its sign. Adding a multiple of one row to another leaves it unchanged. Multiplying a row by k multiplies it by k. The calculator only swaps rows and adds multiples, so the determinant of the triangular result, times −1 for each swap, is the answer.
What does the determinant tell me?
Its size is how much the matrix scales area (2 × 2) or volume (3 × 3), and its sign tells whether it flips orientation. A determinant of −1 (as for [0, 1; 1, 0]) keeps areas the same size but mirrors them.
Can I use fractions or decimals?
Yes. Type 1/3 or 0.25 in any cell. The calculator reads 1/3 as exactly one third and 0.1 as one tenth, and works in exact fractions, so the determinant has no rounding error. [1/2, 1/3; 1/4, 1] has determinant 5/12.