Passer au contenu principal
EverydayToolsSIMPLE • GRATUIT • RAPIDE
AccueilCatégories
Outils de recherche...
  1. Home
  2. Éducation
  3. Matrix Determinant Calculator
Advertisement
Loading...
Advertisement
Loading...

Compute determinants of 2x2 to 6x6 matrices with full step-by-step solutions

The Matrix Determinant Calculator is a powerful educational tool that computes the determinant of any square matrix from 2x2 up to 6x6. Whether you are a student learning linear algebra for the first time, an engineer solving systems of equations, or a professional working with transformations and geometry, this calculator provides instant results along with detailed step-by-step solutions so you can follow every calculation. The determinant is one of the most fundamental concepts in linear algebra. It is a single scalar value computed from a square matrix that encodes critical geometric and algebraic information about the linear transformation the matrix represents. Understanding determinants is essential for solving systems of linear equations using Cramer's rule, computing matrix inverses, working with eigenvalues, and analyzing the geometry of linear transformations including how they scale area and volume. Our calculator supports multiple computation methods depending on the matrix size. For 2x2 matrices, it applies the classic direct formula det(A) = ad − bc, showing every substituted value. For 3x3 matrices, it uses the Sarrus rule — an elegant diagonal multiplication pattern that generates six products, three positive and three negative, which sum to the determinant. For larger matrices (4x4, 5x5, 6x6), the calculator applies cofactor expansion along the first row, recursively reducing the problem to smaller submatrices and showing each minor matrix alongside its contribution to the final result. Beyond the raw determinant value, the calculator displays a rich matrix properties panel. You will see immediately whether the matrix is invertible (a non-zero determinant means an inverse exists) or singular (a zero determinant means no inverse). The volume scaling factor shows the absolute value of the determinant, which equals the factor by which the transformation scales areas (2x2) or volumes (3x3). The orientation property tells you whether the transformation preserves or reverses the handedness of coordinate space. Linear independence of the matrix rows and columns is also reported directly. A unique visual feature is the cofactor contribution bar chart, which displays horizontal bars showing how much each first-row element contributes to the total determinant through its cofactor product. Positive contributions appear in the primary color and negative contributions in red, giving immediate insight into which elements dominate the calculation. The sign pattern overlay can be toggled on and off, placing plus and minus badges on each matrix cell to show the checkerboard sign pattern used in cofactor expansion. The sign at position (i, j) is given by (−1)^(i+j), alternating between positive and negative across the matrix. You can load preset matrices instantly: the identity matrix (whose determinant is always 1), a random matrix with integer values between −9 and 9, or a zero matrix (whose determinant is always 0). Keyboard arrow-key navigation between cells makes matrix entry fast and natural. Fraction input is supported — you can type values like 1/3 or −2/5 and the calculator will parse them as exact rational numbers. Results can be exported as a CSV file containing the matrix and computed values, copied as LaTeX markup for use in mathematical documents and papers, or printed directly from the browser. All calculations run entirely in your browser — no data is sent to any server, ensuring complete privacy.

Understanding Matrix Determinants

What Is a Determinant?

The determinant of a square matrix is a single scalar number computed from the matrix's elements. It is denoted det(A) or |A|. Every square matrix has exactly one determinant, but non-square matrices do not have determinants — the concept is only defined for matrices with equal numbers of rows and columns. Geometrically, the determinant of a 2x2 matrix gives the signed area of the parallelogram formed by its row vectors, while for a 3x3 matrix it gives the signed volume of the parallelepiped. The sign indicates whether the transformation preserves or reverses orientation. A determinant of zero means the matrix is singular: it collapses space into a lower dimension, the rows (or columns) are linearly dependent, and no inverse matrix exists.

How Is the Determinant Calculated?

For a 2x2 matrix [[a, b], [c, d]], the determinant is simply ad − bc. For a 3x3 matrix, the Sarrus rule extends the matrix by repeating its first two columns to the right, then sums the products along three right-down diagonals (positive) and subtracts the products along three right-up diagonals (negative). For larger matrices, cofactor expansion (also called Laplace expansion) is used: pick any row or column, then compute a weighted sum of the elements in that row/column, each multiplied by its cofactor. The cofactor of element a(i,j) is (−1)^(i+j) times the determinant of the (n−1)×(n−1) minor matrix formed by deleting row i and column j. This recursion continues until reaching 2x2 or 3x3 base cases.

Why Do Determinants Matter?

Determinants appear throughout mathematics, physics, and engineering. In linear algebra, the determinant determines whether a system of n equations in n unknowns has a unique solution: if det(A) ≠ 0, there is exactly one solution; if det(A) = 0, either no solution or infinitely many exist. Cramer's rule uses ratios of determinants to solve linear systems explicitly. The matrix inverse formula uses the determinant in the denominator, confirming that only non-singular matrices (det ≠ 0) are invertible. In calculus, the Jacobian determinant converts integrals between coordinate systems and measures how transformations stretch or compress volume. In physics, determinants appear in quantum mechanics (the Slater determinant for fermion wavefunctions) and in computing the cross product in three dimensions.

Limitations and Numerical Considerations

This calculator performs exact arithmetic for integer and simple fractional inputs, but floating-point arithmetic introduces small rounding errors for large matrices or entries with many decimal places. For matrices larger than 6x6, cofactor expansion becomes computationally expensive (time complexity is O(n!)), so only sizes up to 6x6 are supported for practical performance. For production numerical work with very large matrices, specialized methods like LU decomposition (O(n³)) or Gaussian elimination with partial pivoting should be used — these are more numerically stable and far more efficient. Additionally, near-singular matrices (determinant very close to zero but not exactly zero) can cause significant numerical issues in matrix inversions, so treat results near zero with caution when working with floating-point entries.

Key Formulas for Matrix Determinants

2×2 Determinant

det([[a, b], [c, d]]) = ad − bc

The determinant of a 2×2 matrix is computed by multiplying the main diagonal elements and subtracting the product of the off-diagonal elements.

3×3 Cofactor Expansion (Row 1)

det(A) = a₁₁·C₁₁ + a₁₂·C₁₂ + a₁₃·C₁₃

Expand along the first row: each element is multiplied by its cofactor Cᵢⱼ = (−1)^(i+j) × det(Mᵢⱼ), where Mᵢⱼ is the minor matrix with row i and column j deleted.

Multiplicative Property

det(AB) = det(A) × det(B)

The determinant of a product of two square matrices equals the product of their individual determinants. This holds for any number of matrices of the same size.

Singularity Condition

det(A) = 0 ⟺ A is singular (not invertible)

A square matrix is singular (has no inverse) if and only if its determinant is zero, which means its rows or columns are linearly dependent.

Determinant Reference Tables

Determinant Properties Summary

Key properties of determinants and how row/column operations affect them.

PropertyRègleExample
Row swapMultiplies det by −1Swapping R1 ↔ R2 negates det
Row scalingdet scales by the same factor kMultiplying a row by 3 triples det
Row additiondet unchangedAdding k×R1 to R2 does not change det
Transposerdet(Aᵀ) = det(A)Transposing preserves the determinant
Scalar multipledet(kA) = kⁿ × det(A) for n×ndet(2A) = 2³ × det(A) for 3×3
Inversedet(A⁻¹) = 1 / det(A)Only valid when det(A) ≠ 0

Special Matrix Determinants

Determinants of commonly encountered special matrices.

Matrix TypeDéterminantNotes
Identity matrix I1Always 1 regardless of size
Zero matrix0All entries zero → singular
Diagonal matrixProduct of diagonal entriesd₁ × d₂ × … × dₙ
Triangular matrix (upper or lower)Product of diagonal entriesSame rule as diagonal matrices
Orthogonal matrix±1det = +1 (rotation) or −1 (reflection)

Worked Examples

3×3 Determinant via Cofactor Expansion

Find the determinant of A = [[2, 1, 3], [0, −1, 2], [4, 0, 1]].

1

Expand along Row 1: det(A) = 2·C₁₁ + 1·C₁₂ + 3·C₁₃

2

C₁₁ = (+1) × det([[−1, 2], [0, 1]]) = (−1)(1) − (2)(0) = −1

3

C₁₂ = (−1) × det([[0, 2], [4, 1]]) = −[(0)(1) − (2)(4)] = −(−8) = 8

4

C₁₃ = (+1) × det([[0, −1], [4, 0]]) = (0)(0) − (−1)(4) = 4

5

det(A) = 2(−1) + 1(8) + 3(4) = −2 + 8 + 12 = 18

det(A) = 18. The matrix is invertible, preserves orientation (positive det), and scales volume by a factor of 18.

Verifying a Singular Matrix

Show that B = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] is singular.

1

Notice that Row 3 = 2 × Row 2 − Row 1: [7,8,9] = 2×[4,5,6] − [1,2,3]

2

Since the rows are linearly dependent, det(B) must be 0

3

Verify: det = 1(5·9 − 6·8) − 2(4·9 − 6·7) + 3(4·8 − 5·7)

4

= 1(45−48) − 2(36−42) + 3(32−35) = −3 + 12 − 9 = 0

det(B) = 0. The matrix is singular — it has no inverse and its rows are linearly dependent.

Using the Multiplicative Property

Given det(A) = 5 and det(B) = −3 for two 3×3 matrices, find det(AB) and det(2A).

1

det(AB) = det(A) × det(B) = 5 × (−3) = −15

2

det(2A) = 2³ × det(A) = 8 × 5 = 40 (scalar factor raised to matrix dimension)

det(AB) = −15 and det(2A) = 40.

How to Use the Matrix Determinant Calculator

1

Select Your Matrix Size

Click one of the size buttons (2×2, 3×3, 4×4, 5×5, or 6×6) to set the dimensions. The matrix grid will resize automatically, preserving any values you have already entered in overlapping positions. For most classroom problems, 2×2 and 3×3 are the most common sizes.

2

Enter Matrix Values

Click any cell in the matrix grid and type your value. You can enter integers, decimals, or fractions (e.g., 1/3 or -2/5). Use the arrow keys to move between cells quickly. To fill the matrix instantly, click Identity (diagonal 1s), Random (random integers −9 to 9), or Zero (all zeros) from the preset buttons.

3

Read the Determinant and Properties

The determinant value appears immediately in the hero result box at the top of the results panel, along with the calculation method used. Below it, the Matrix Properties panel shows whether the matrix is invertible or singular, the volume/area scaling factor, orientation preservation status, and linear independence of the rows.

4

Review Steps, Charts, and Export

Expand the Step-by-Step Solution panel to follow every calculation in detail, including each minor matrix used in cofactor expansion. The Cofactor Contributions bar chart shows how each first-row element contributes to the final determinant. Use the Copy LaTeX button to get the expression for documents, Export CSV to download the matrix and results, or Print to get a hard copy.

Questions Fréquemment Posées

What does a zero determinant mean?

A zero determinant means the matrix is singular — it has no inverse. Geometrically, this means the linear transformation represented by the matrix collapses space into a lower dimension: a 2×2 matrix with zero determinant maps the plane onto a line or a point, and a 3×3 matrix collapses 3D space onto a plane or line. Algebraically, a zero determinant means the rows (and columns) of the matrix are linearly dependent — at least one row can be expressed as a linear combination of the others. In the context of a system of linear equations Ax = b, if det(A) = 0 then either no solution exists or infinitely many solutions exist. Cramer's rule cannot be applied, and Gaussian elimination will reveal either an inconsistency or a free variable.

How do I calculate a 3×3 determinant by hand using the Sarrus rule?

Write out the 3×3 matrix and then extend it by repeating the first two columns to the right of the original three columns. You now have a 3×5 arrangement. Draw three diagonals going down-right starting from each element in the first row of the original matrix — multiply the three elements along each diagonal and add the three products. Then draw three diagonals going up-right starting from the bottom-left area — multiply and subtract these three products. The formula is: det = aei + bfg + cdh − ceg − bdi − afh, where the elements are labeled a through i reading left to right, top to bottom. For example, for [[1,2,3],[4,5,6],[7,8,9]], you get 45 + 84 + 96 − 105 − 72 − 48 = 0.

What is the difference between a minor and a cofactor?

A minor M(i,j) is the determinant of the (n−1)×(n−1) submatrix obtained by deleting row i and column j from the original n×n matrix. A cofactor C(i,j) is the signed minor: C(i,j) = (−1)^(i+j) × M(i,j). The sign factor (−1)^(i+j) creates the checkerboard pattern of + and − signs across the matrix. For example, the cofactor C(1,1) = +M(1,1), C(1,2) = −M(1,2), C(1,3) = +M(1,3), and so on. Cofactor expansion uses cofactors rather than plain minors because the alternating signs are essential for the formula to work correctly. The cofactor matrix (all cofactors arranged in the same grid) is also used to compute the matrix inverse: A⁻¹ = (1/det(A)) × transpose(cofactor matrix).

Why is the determinant of an identity matrix always 1?

The identity matrix I has 1s on the main diagonal and 0s everywhere else. Expanding the determinant by any row, only the diagonal element is non-zero in each row, so the only surviving product is the product of all diagonal elements: 1 × 1 × 1 × ... × 1 = 1. This makes geometric sense: the identity matrix represents the identity transformation — it maps every vector to itself, leaving all shapes unchanged. The volume/area scaling factor of the identity transformation is 1, and it preserves orientation. Another way to see it: row reducing the identity gives itself (already in row echelon form), and the product of the diagonal elements of an upper triangular matrix equals the determinant. All diagonal elements are 1, so their product is 1.

Can I calculate the determinant of a non-square matrix?

No — the determinant is only defined for square matrices (same number of rows and columns). Rectangular matrices do not have a determinant. The mathematical reason is that the determinant is tied to the concept of a linear transformation mapping a vector space to itself, which requires the input and output dimensions to match. If you have a rectangular matrix, you can still compute related quantities: the rank (using row reduction), or look at singular values (via singular value decomposition). The matrix is always referred to as having full rank when all its rows or columns are linearly independent, which for square matrices corresponds exactly to having a non-zero determinant. For rectangular matrices, rank less than the smaller dimension indicates linear dependence.

What is Cramer's rule and how does it use determinants?

Cramer's rule is a method for solving a system of n linear equations in n unknowns, Ax = b, using determinants. For each unknown xᵢ, you form a new matrix Aᵢ by replacing the i-th column of A with the column vector b. Then xᵢ = det(Aᵢ) / det(A). The rule requires det(A) ≠ 0 (the system must have a unique solution). While Cramer's rule is elegant and valuable for theoretical proofs and symbolic computation, it is computationally expensive for large systems (O(n!) using cofactor expansion, or O(n⁴) using LU decomposition for each sub-determinant). In practice, Gaussian elimination (O(n³)) is preferred for numerical work. Cramer's rule is most useful for 2×2 and 3×3 systems by hand, and in theoretical contexts where you need explicit formulas for the solution in terms of the matrix entries.

Related Tools

Calculateur de Matrices

Perform addition, subtraction, and other matrix operations with step-by-step solutions.

Matrix Inverse Calculator

Find the inverse of any square matrix using Gauss-Jordan elimination or the adjugate method.

Matrix Multiplication Calculator

Multiply two or more matrices with step-by-step dot product breakdowns and heatmap visualization.

Résolveur d'équations

Solve algebraic equations including systems of linear equations that use determinants via Cramer's rule.

Résolveur d'équations linéaires

Solve systems of linear equations step by step using matrix methods and elimination.

EverydayToolsSIMPLE • GRATUIT • RAPIDE

Outils en ligne gratuits pour les non-professionnels de l'informatique. Calculatrices, convertisseurs, générateurs, et plus encore.

Catégories Populaires

  • Calculatrices de Santé
  • Calculatrices Financières
  • Outils de Conversion
  • Calculatrices Mathématiques

Entreprise

  • À propos
  • Contact
  • Politique de confidentialité
  • Conditions de Service

© 2026 EverydayTools.io. Tous droits réservés.