Matrix Determinant Calculator
- Expanding along the first row: det = a(ei − fh) − b(di − fg) + c(dh − eg) = 1(-24) − 2(-20) + 3(-5) = 1.
- For a 3×3 matrix |det| is the volume-scaling factor of the transformation, here 1×.
A matrix determinant calculator gives you the determinant of any square matrix you enter, instantly and accurately. The determinant is a single number that reveals essential properties of the matrix and the linear transformation it represents. For a 2x2 matrix, the determinant is calculated as ad - bc. For a 3x3 matrix, the standard approach is cofactor expansion along the first row: det = a(ei - fh) - b(di - fg) + c(dh - eg). Alongside the determinant, the trace (sum of the diagonal) is shown as the other basic invariant of a matrix. Geometrically, the absolute value of the determinant is the area scaling factor in 2D or the volume scaling factor in 3D of the linear transformation. A determinant of zero means the space is squashed flat.
Cofactor expansion is the accepted standard method for computing determinants by hand because it systematically breaks a larger matrix into smaller, manageable pieces, reducing any square matrix down to 2x2 calculations. This method is mathematically rigorous and universally taught, making it the reliable foundation for determinant computation. This page shows the formula, step-by-step workings, worked examples, and sources so you can verify every result yourself. For instance, the matrix [[4, 3], [6, 3]] has determinant -6; the negative sign means the transformation flips orientation, and areas scale by 6. The matrix with rows (1,2,3), (0,1,4), (5,6,0) has determinant 1, meaning volume is preserved exactly. Conversely, rows (1,2,3), (4,5,6), (7,8,9) have determinant 0: the rows are linearly dependent, the matrix is singular and has no inverse.
Worked examples
A 2×2 determinant: [[4, 3], [6, 3]]
ad − bc = 12 − 18 = −6. The negative sign means the transformation flips orientation; areas scale by 6×. (2 × 2 · 4 · 3 · 6 · 3 · 0 · 0 · 0 · 0 · 0)
| Determinant | -6 |
| Trace (a + d) | 7 |
| Invertible? | Yes — an inverse matrix exists |
A 3×3 determinant by cofactor expansion
1×(0 − 24) − 2×(0 − 20) + 3×(0 − 5) = 1. A determinant of exactly 1 means volume is preserved. (3 × 3 · 1 · 2 · 3 · 0 · 1 · 4 · 5 · 6 · 0)
| Determinant | 1 |
| Trace (a + e + i) | 2 |
| Invertible? | Yes — an inverse matrix exists |
The famous singular 3×3
Rows 1-2-3, 4-5-6, 7-8-9 give determinant 0 — the rows are linearly dependent, the matrix has no inverse, and its system has no unique solution. (3 × 3 · 1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9)
| Determinant | 0 |
| Trace (a + e + i) | 15 |
| Invertible? | No — the matrix is singular |
The 2x2 formula: ad - bc
For a 2x2 matrix the determinant is ad - bc, where a, b, c, and d are the four entries read left to right, top to bottom. The calculation follows a simple cross-multiplication pattern: multiply the two entries on the main diagonal (a times d), then subtract the product of the two entries on the other diagonal (b times c). This compact formula is the one a matrix determinant calculator uses for every 2x2 input, and it is the foundation for understanding how determinants behave on larger matrices.
To see the formula in action, consider the matrix [[4, 3], [6, 3]]. The determinant is 4 x 3 - 3 x 6 = 12 - 18 = -6. The absolute value, 6, tells you that the linear transformation represented by this matrix scales all areas by a factor of 6. The negative sign carries geometric meaning as well: it indicates that the transformation flips orientation. If you think of the original basis vectors as defining a coordinate grid, a positive determinant preserves the handedness of that grid while a negative determinant reverses it, much like a mirror image.
Geometrically, |det| is the area scaling factor of the linear transformation in two dimensions. A unit square in the input space becomes a parallelogram in the output space whose area equals the absolute value of the determinant. When the determinant is zero, the space is squashed flat — the parallelogram collapses onto a line or a point, and the transformation is not invertible. This is why a determinant of zero is a red flag in linear algebra: it signals that information has been lost and no reverse transformation exists.
The determinant is one of two basic invariants of a matrix. The other is the trace, which is the sum of the diagonal entries. A matrix determinant calculator typically displays both values alongside the input, giving you a quick snapshot of how the matrix behaves: the trace summarizes the sum of eigenvalues, while the determinant captures their product. Together, these two numbers tell you a great deal about the underlying transformation without requiring you to work through the full eigenvalue calculation.
3x3 by cofactor expansion
For a 3x3 matrix, the most reliable hand method is cofactor expansion along the first row. The idea is to break the 3x3 determinant into three smaller 2x2 determinants, each multiplied by the appropriate entry from the top row. Because every 2x2 determinant is simply ad - bc, the whole calculation reduces to arithmetic you can do in your head or on scratch paper. A matrix determinant calculator applies the same logic, just faster and without sign slips.
The pattern of signs is the part that trips people up. When you expand along the first row, the signs alternate in a checkerboard starting with plus: the first term is positive, the second is negative, and the third is positive again. For a general 3x3 matrix with entries a, b, c in the first row and d, e, f / g, h, i below, the formula reads det = a(ei - fh) - b(di - fg) + c(dh - eg). Each parenthesis is the 2x2 determinant of the matrix you get by deleting the row and column of the entry out front. That smaller matrix is called the minor, and the sign in front is the cofactor sign.
Here is the full expansion for the matrix with rows (1, 2, 3), (0, 1, 4), (5, 6, 0). Following the formula: det = 1 times (1 times 0 minus 4 times 6) minus 2 times (0 times 0 minus 4 times 5) plus 3 times (0 times 6 minus 1 times 5). Working each minor: 1 times (0 - 24) - 2 times (0 - 20) + 3 times (0 - 5). That gives -24 + 40 - 15, which equals 1. The determinant is exactly 1, which means the linear transformation preserves volume perfectly. The trace, shown alongside as the other basic invariant of a matrix, is the sum of the diagonal entries 1 + 1 + 0 = 2.
Contrast that with the matrix whose rows are (1, 2, 3), (4, 5, 6), (7, 8, 9). Running the same cofactor expansion: det = 1 times (5 times 9 - 6 times 8) - 2 times (4 times 9 - 6 times 7) + 3 times (4 times 8 - 5 times 7). Each minor works out to -3, so the total is 1 times (-3) - 2 times (-6) + 3 times (-3), giving -3 + 12 - 9 = 0. A determinant of 0 means the rows are linearly dependent, the matrix is singular, and the transformation squashes 3D space flat into a plane. Such a matrix has no inverse.
Worked examples
The matrix determinant calculator handles each input by applying the standard cofactor expansion method, then returning the determinant along with a quick invertibility verdict. The trace, which is the sum of the diagonal entries, is shown alongside as the other basic invariant of a matrix. The examples below illustrate how the calculator reports results for square matrices of different sizes and conditions.
For a 2x2 matrix the determinant is ad - bc. Verified: [[4, 3], [6, 3]] has determinant 4x3 - 3x6 = -6; the negative sign means the transformation flips orientation, and areas scale by 6. Geometrically |det| is the area (2D) or volume (3D) scaling factor of the linear transformation, so this matrix doubles the area of any region it transforms while reversing its orientation. The trace of this matrix is 4 + 3 = 7, which together with the determinant gives a compact summary of how the transformation behaves.
For a 3x3 matrix, cofactor expansion along the first row gives det = a(ei - fh) - b(di - fg) + c(dh - eg). Verified: the matrix with rows (1,2,3), (0,1,4), (5,6,0) has determinant 1 — volume is preserved exactly. Because the absolute value of the determinant equals 1, this transformation neither stretches nor compresses the space it acts on. The trace here is 1 + 1 + 0 = 2, offering a complementary invariant to the determinant for understanding the matrix's properties.
A determinant of zero carries a clear geometric and algebraic meaning. Verified: rows (1,2,3), (4,5,6), (7,8,9) have determinant 0: the rows are linearly dependent, the matrix is singular and has no inverse. When det = 0 the space is squashed flat, collapsing three-dimensional volume into a lower-dimensional plane or line. The calculator flags such cases so users can immediately see that the matrix cannot be inverted and that any system of equations built from it will not have a unique solution.
| Matrix size | Example matrix | Determinant | Trace | Invertibility verdict |
|---|---|---|---|---|
| 2x2 | [[4, 3], [6, 3]] | -6 | 7 | Invertible; orientation flipped, areas scale by 6 |
| 3x3 | [(1,2,3), (0,1,4), (5,6,0)] | 1 | 2 | Invertible; volume preserved exactly |
| 3x3 | [(1,2,3), (4,5,6), (7,8,9)] | 0 | 15 | Singular; rows linearly dependent, no inverse |
What a determinant of zero tells you
When you use a matrix determinant calculator and the result comes back as zero, that single number tells you something important about the structure of the matrix. A determinant of zero means the matrix is singular — it has no inverse. No matter what vector you multiply it by, you cannot recover the original input, because the transformation it represents has destroyed information.
The underlying reason is linear dependence among the rows or columns. When the determinant is zero, at least one row can be written as a combination of the others, so it adds no new information. The classic textbook example is the matrix with rows (1, 2, 3), (4, 5, 6), and (7, 8, 9). Its determinant is exactly zero. The rows are linearly dependent, the matrix is singular, and it has no inverse. This is why systems of equations built from a singular matrix have no unique solution — you are left with either infinitely many solutions or none at all.
Geometrically, the absolute value of the determinant is the area scaling factor in two dimensions or the volume scaling factor in three dimensions. For a 2x2 matrix, the determinant is ad - bc. As a verified example, the matrix [[4, 3], [6, 3]] has determinant 4x3 - 3x6 = -6. The negative sign means the transformation flips orientation, and areas scale by 6. A determinant of zero means the space is squashed flat — area or volume collapses entirely, and the transformation cannot be reversed because infinitely many points land on the same spot.
For a 3x3 matrix, cofactor expansion along the first row gives det = a(ei - fh) - b(di - fg) + c(dh - eg). When this expression equals zero, the three row vectors no longer span the full three-dimensional space. By contrast, the matrix with rows (1, 2, 3), (0, 1, 4), and (5, 6, 0) has determinant 1, meaning volume is preserved exactly. The trace, which is the sum of the diagonal entries, is often shown alongside the determinant as the other basic invariant of a matrix, but only the determinant reveals whether a matrix is singular.
Determinant as a scaling factor
A matrix determinant calculator does more than produce a single number. That number carries a geometric meaning. When a matrix represents a linear transformation, the determinant tells you how that transformation scales space. The absolute value of the determinant, written |det|, is the area scaling factor in two dimensions or the volume scaling factor in three dimensions. For a 2x2 matrix the determinant is ad - bc. Consider the matrix [[4, 3], [6, 3]]. Its determinant equals 4x3 - 3x6 = -6. The absolute value, 6, means every region in the plane has its area multiplied by 6 under this transformation. A unit square becomes a shape with area 6.
The sign of the determinant matters just as much as the magnitude. A positive determinant preserves orientation, while a negative determinant flips it. The matrix [[4, 3], [6, 3]] has determinant -6, and that negative sign means the transformation flips orientation, similar to a mirror reflection. Areas still scale by 6, but the space has been turned inside out. When the determinant equals exactly 1, the transformation preserves volume perfectly. Rotations and shears are classic examples: they reshape space without compressing or expanding it. The matrix with rows (1,2,3), (0,1,4), (5,6,0) has determinant 1, which means volume is preserved exactly. A 3x3 determinant is computed through cofactor expansion along the first row: det = a(ei - fh) - b(di - fg) + c(dh - eg).
A determinant of zero has a striking geometric interpretation: the space is squashed flat. In 2D, area collapses onto a line or a point. In 3D, volume collapses onto a plane, a line, or a point. The matrix with rows (1,2,3), (4,5,6), (7,8,9) has determinant 0. Its rows are linearly dependent, the matrix is singular, and it has no inverse. No transformation can undo the flattening, because information about the original space has been permanently lost. This is why a determinant of zero serves as a critical warning in linear algebra.
- |det| gives the area (2D) or volume (3D) scaling factor of the transformation
- A negative determinant flips orientation; a positive one preserves it
- det = 1 means volume is preserved exactly, as with rotations and shears
- det = 0 means the space is squashed flat and the matrix has no inverse
- The trace (sum of the diagonal) is shown alongside as the other basic invariant of a matrix
Common mistakes
One of the most frequent mistakes when working out a determinant by hand is getting the sign checkerboard wrong. The cofactor signs alternate as you move across a row or down a column, starting with a positive sign in the top-left corner. For a 3x3 matrix, cofactor expansion along the first row follows the pattern det = a(ei - fh) - b(di - fg) + c(dh - eg). Notice that the middle term carries a negative sign, not a positive one. If you forget that alternating pattern, every result from that point onward will be wrong. A reliable matrix determinant calculator applies the correct signs automatically, which removes this source of error entirely.
Another common error is doing more work than necessary. When a row or column contains zeros, expanding along that row or column saves time because each zero multiplied by its cofactor contributes nothing to the total. For example, the matrix with rows (1,2,3), (0,1,4), (5,6,0) has determinant 1. Expanding along the second row, which contains a zero, reduces the calculation and minimizes the chance of arithmetic slips. Many people expand along the first row by habit, even when another row has more zeros and would make the computation simpler and less error-prone.
A third mistake involves confusing the determinant with the matrix itself. The determinant is a single number, not a matrix. For a 2x2 matrix the determinant is ad - bc, a scalar value. The verified example [[4, 3], [6, 3]] has determinant 4x3 - 3x6 = -6. That value of -6 is not a matrix; it is a number that tells you something about what the matrix does geometrically. The negative sign means the transformation flips orientation, and areas scale by 6. Similarly, the trace, which is the sum of the diagonal, is another single number shown alongside the determinant as a basic invariant of a matrix. Neither the determinant nor the trace is the matrix.
People also misread what a determinant of zero means. The verified example with rows (1,2,3), (4,5,6), (7,8,9) has determinant 0. This does not mean the matrix itself is zero. It means the rows are linearly dependent, the matrix is singular, and it has no inverse. Geometrically, |det| is the area or volume scaling factor of the linear transformation, so det = 0 means the space is squashed flat. A determinant of zero carries real geometric meaning, and treating it as a simple arithmetic result misses the point of the calculation.
FAQs
How do you find the determinant of a 2x2 matrix?
Multiply the diagonals and subtract: ad - bc. For [[4,3],[6,3]] that is 12 - 18 = -6. This simple formula works for any 2x2 matrix where the entries are labeled a, b, c, d reading left to right, top to bottom.
What does a determinant of 0 mean?
The matrix is singular: its rows/columns are linearly dependent, it has no inverse, and its system has no unique solution. This means the matrix cannot be reversed and any associated system of equations either has no solution or infinitely many solutions.
Can a determinant be negative?
Yes: -6 in the 2x2 example. The sign records that the transformation flips orientation; the magnitude is the scaling factor. A negative determinant simply means the matrix reverses orientation while scaling space by the absolute value of the determinant.
How do you expand a 3x3 determinant?
Along any row or column with cofactors: a(ei - fh) - b(di - fg) + c(dh - eg) along the first row. You can choose any row or column, but the first row is most common. The signs alternate as you move across the entries.
What is the trace of a matrix?
The sum of the main diagonal: 1 + 1 + 0 = 2 for the determinant-1 example on this page. The trace is simply adding up the entries running from the top-left to the bottom-right corner of the square matrix.
Does det = 1 mean the matrix is a rotation?
Not necessarily — shears also have determinant 1. It means area/volume is preserved exactly. Any transformation with a determinant of 1 keeps the same area or volume, but it could be a rotation, a shear, or another type of transformation that maintains size.