How to use the determinant calculator
- Enter the matrix in the field labeled
Square matrix (2×2 to 5×5). Put each row on its own line, or separate rows with semicolons. Separate the entries within a row with spaces, tabs, or commas. - Read the result. In Simple mode the calculator shows the
Exact determinant, the matrix status (SingularorInvertible), and a picture of your matrix. - Follow the work (optional). Choose
Show worked stepsto switch to Advanced mode. UsePreviousandNextto move through the numbered steps. The picture highlights the entries involved in each step. - Copy or print.
Copyincludes your entered matrix, the determinant, and the status. In Advanced mode it also includes the full worked calculation.Printopens your browser's print dialog, and in Advanced mode the worked calculation is included in the printout.
The calculator infers the size from the rows and columns you enter, so there is no size selector. Simple and Advanced modes use the same matrix field and the same exact calculation. The only difference is how much of the work is displayed.
The default matrix is 2 1; 3 4 in Simple mode. The Examples menu replaces the field with a preset that you can then edit. Once you change the matrix, the selection switches to Custom matrix and the result updates. Reset restores the opening 2×2 matrix and returns to Simple mode.
Matrix entry rules
| Rule | Details |
|---|---|
| Sizes | 2×2, 3×3, 4×4, or 5×5 only. The matrix must be square. |
| Row separators | Line breaks or semicolons |
| Entry separators | Spaces, tabs, or commas |
| Accepted entries | Signed integers, finite base-10 decimals, and fractions with integer numerators and denominators |
| Accepted examples | -2, .25, 0.25, 3/7, 3/-7 |
| Decimal point | A period. A comma is only a separator, never a decimal point or thousands separator. |
| Fractions | Keep them together with no spaces around the slash. The denominator must be nonzero. |
| Digit limit | Up to 18 typed digits per integer or decimal entry, not counting the sign or decimal point. For a fraction, the cap applies separately to the numerator and the denominator. |
| Total length | The whole input is limited to 1,200 characters. |
Blank input, rectangular matrices, unsupported sizes, missing entries, malformed tokens, and values over the limits all produce an error. Where it applies, the error names the row and column. While the input is invalid, the result fields show em dashes and Copy is disabled.
Scientific notation (such as 1e3), arithmetic expressions (such as 2+3), symbolic variables, and complex numbers are not supported. Convert them to plain numbers first.
What the determinant tells you
The determinant is a single number computed from a square matrix. Its most practical meaning is a test for invertibility:
- If , the matrix is invertible.
- If , the matrix is singular and has no inverse.
The calculator applies this test exactly, with no near-zero tolerance. It reports Singular only when the exact determinant is zero, and Invertible for every other value.
For a singular matrix, the calculator also explains that the matrix has no inverse. For a linear system , a zero determinant means you need the augmented matrix to tell whether the system has no solution or infinitely many. The calculator itself computes the determinant and reports invertibility. It does not compute the inverse, solve the system, or analyze measurement uncertainty.
How the calculator picks a method
The matrix size selects the method automatically. This matters if you searched for a specific technique, so here is exactly what each size uses.
| Matrix size | Method shown | Method name in the calculator |
|---|---|---|
| 2×2 | Diagonal formula | 2×2 diagonal formula |
| 3×3 | Cofactor expansion along the first row | First-row cofactor expansion |
| 4×4 and 5×5 | Row reduction to an upper triangular matrix | Row reduction |
In other words, cofactor expansion is used for 3×3 matrices, and row reduction is used for 4×4 and 5×5 matrices. The calculator does not offer a choice of method for a given size.
2×2 determinant: the diagonal formula
For
multiply the main-diagonal entries and subtract the product of the other diagonal:
The calculator shows this as three worked steps: the two products, then their difference. For the default matrix :
3×3 determinant: first-row cofactor expansion
Write for the entry in row , column . Let be the 2×2 submatrix you get by deleting row 1 and column . The determinant of that submatrix is the minor value. Expanding along the first row uses the sign pattern :
The calculator reports each minor and each signed term, then adds the terms.
Worked example. Take the 3×3 · Cofactors preset:
The three minors are:
- Delete row 1 and column 1:
- Delete row 1 and column 2:
- Delete row 1 and column 3:
Applying the signs and multiplying by the first-row entries gives the signed terms:
Adding them:
4×4 and 5×5 determinants: row reduction
For larger matrices, the calculator reduces the matrix to an upper triangular form. The determinant then comes from the diagonal. The procedure works left to right through the pivot columns:
- Find a pivot. For column , use the first row whose entry in that column is nonzero.
- Swap if needed. If that row is not row , swap it into row . Each row swap reverses the sign of the determinant.
- Clear below the pivot. For each row with a nonzero entry in column , replace the row. With the current entry to clear and the current pivot:
This operation does not change the determinant. The calculator does not scale pivot rows to make the pivots equal to 1, because scaling a row would change the determinant.
- Stop early if there is no pivot. If no nonzero entry exists at or below the current diagonal position, the determinant is and the algorithm stops.
- Multiply the diagonal. Otherwise, if is the final upper triangular matrix and is the number of row swaps:
Worked example (4×4). Take the 4×4 · Row swap preset:
The first column has a zero in the top position, so the first nonzero entry at or below it is in row 2. Swap rows 1 and 2 (one swap, ):
Clear the 2 in row 3 with :
In column 2 the pivot is . Clear the 1 below it with :
In column 3 the pivot is . Clear the 1 below it with :
The diagonal is , so
Worked example (5×5 with fractions). The 5×5 · Fractions preset is
It also needs one row swap to bring the in row 2 to the top. After the swap, the remaining eliminations use multipliers , , and . For example, clearing the in row 3 uses . The final diagonal is , so
The Advanced view lets you step through every one of these row operations. After each operation, the picture shows the matrix as it stands.
Built-in examples
The Examples menu contains four presets. Semicolons below stand for row breaks.
| Preset label | Matrix input | Exact determinant |
|---|---|---|
2×2 · Diagonal products |
2 1; 3 4 |
5 |
3×3 · Cofactors |
1 2 3; 0 4 5; 1 0 6 |
22 |
4×4 · Row swap |
0 2 0 0; 1 1 0 0; 2 3 3 0; 0 0 1 4 |
−24 |
5×5 · Fractions |
0 1/2 0 0 0; 1 1 0 0 0; 0 2 3 0 0; 0 0 1 4 0; 0 0 0 1 5 |
−30 |
Loading a preset restarts the step sequence, and you can edit the preset to try your own variations.
Exact results: integers and reduced fractions
Every accepted entry is treated as an exact rational number. A decimal with digits after the point is read as a signed integer over and then reduced, so 0.25 is exactly . All arithmetic uses arbitrary-precision integer numerators and denominators and simplifies fractions exactly, so there is no floating-point rounding.
The Exact determinant is shown as an integer or as a reduced fraction with a positive denominator. For example, the matrix 0.5 0; 0 1/3 gives
and the calculator displays 1/6.
Exactness is relative to the numbers you type. A rounded decimal is a different number from the fraction it approximates. For instance, 0.3333 is exactly , not . Compare these two matrices:
0.3333 0; 0 3has determinant (shown as9999/10000).1/3 0; 0 3has determinant .
If you want the determinant of a matrix that contains one-third, enter 1/3.
Long values may be abbreviated inside the matrix picture. The full value is available in the cell's tooltip, and the determinant itself always keeps its full exact value.
Singular matrices: a quick example
The matrix
has first-row minors , , and . The signed terms are , , and , which add to . The calculator therefore reports Singular, meaning the matrix has no inverse. Because the arithmetic is exact, the zero is a true zero and not a rounding artifact.
Why row operations give the right determinant
Three facts explain the row-reduction method:
- Replacing a row with itself minus a multiple of another row leaves the determinant unchanged. This is the only elimination operation the calculator uses.
- Swapping two rows multiplies the determinant by . The calculator counts the swaps as and applies at the end.
- For an upper triangular matrix, the determinant is the product of the diagonal entries.
The calculator never rescales a pivot row. That is why the final diagonal in the 5×5 example contains rather than .
Frequently asked questions
How do I calculate a 3×3 determinant with this calculator?
Enter nine numbers on three rows, such as 1 2 3; 0 4 5; 1 0 6. The calculator uses first-row cofactor expansion, reports each minor and signed term, and adds them. Select Show worked steps to see them in order.
Does the calculator show a 4×4 or 5×5 determinant with steps?
Yes. For these sizes it uses row reduction and shows each row swap and row replacement in Advanced mode, one numbered step at a time, with the matrix pictured after each operation.
Can I choose between cofactor expansion and row reduction?
No. The method is selected by matrix size: the diagonal formula for 2×2, first-row cofactor expansion for 3×3, and row reduction for 4×4 and 5×5.
Can I enter fractions and decimals?
Yes. Enter fractions like 3/7 with no spaces around the slash. Decimals use a period, such as .25 or 0.25. A comma only separates entries, so 0,25 is read as two entries, not as one decimal number.
Why does the calculator show an error?
The input must be one numeric square matrix from 2×2 to 5×5, within 1,200 characters. Common causes of errors are a missing entry, a rectangular matrix, a zero denominator, spaces inside a fraction, scientific notation, or an entry with more than 18 digits. The message identifies the row and column when applicable.
What does Singular mean?
It means the exact determinant is zero, so the matrix has no inverse. Any nonzero determinant gives the status Invertible.
Can it find the inverse of the matrix or solve a system of equations?
No. This calculator computes the determinant and reports whether the matrix is singular or invertible. It does not compute the inverse, solve , or analyze measurement uncertainty.
What does Copy include?
Copy includes your entered matrix, the exact determinant, and the status. In Advanced mode it also includes the full worked calculation. If the input is invalid, Copy is disabled.
Read the formula definitions, supported input ranges, and limitations before using this estimate.