Matrix Determinant & Inverse Calculator

Determinant, trace and inverse of a 3×3 matrix.

Enter details

Determinant

0

Trace
6
Inverse
Not invertible (det = 0)

Formula: det = a(ei − fh) − b(di − fg) + c(dh − eg)

Matrix Calculator: Determinant, Trace, & Inverse

Short answer

This calculator computes the determinant, trace, and inverse of a 3×3 square matrix using nine row-by-row numerical entries. For the input matrix [2, 0, 1; 1, 3, 2; 1, 1, 1], the calculator yields a determinant of 0, a trace of 6, and shows the matrix is singular and not invertible.

Formula

det(A) = a(ej − gi) − b(dj − gh) + c(di − eh); Trace(A) = a + e + j; A⁻¹ = (1 / det(A)) × adj(A)

For a 3×3 matrix arranged as Row 1: [a, b, c], Row 2: [d, e, g], and Row 3: [h, i, j]: det(A) represents the scalar determinant obtained by Laplace expansion along the first row; Trace(A) represents the sum of the main diagonal elements (a + e + j); adj(A) represents the adjugate matrix (the transpose of the cofactor matrix); and A⁻¹ represents the multiplicative inverse, which exists only when det(A) ≠ 0.

Worked example

Matrix entries, row by row (9 numbers)
2, 0, 1, 1, 3, 2, 1, 1, 1
  • Determinant: 0
  • Trace: 6
  • Inverse: Not invertible (det = 0)

What the Matrix Determinant & Inverse Calculator Does

A 3×3 matrix is a core mathematical object used in physics, 3D computer graphics, statistics, structural engineering, and systems of linear differential equations. Analyzing such a matrix requires finding foundational properties: its determinant, its trace, and its inverse.

This calculator automates these operations for any 3×3 real matrix. By supplying nine numbers ordered row by row, the tool simultaneously computes:

  • Determinant (det A): A scalar value that describes the scaling factor of the transformation, linear independence of rows, and whether a system of equations has a unique solution.
  • Trace: The linear sum of elements along the primary diagonal, reflecting the sum of the eigenvalues.
  • Inverse (A⁻¹): The unique matrix that, when multiplied by the original matrix, produces the 3×3 multiplicative identity matrix.

This tool is designed for STEM students, game developers calibrating transformation matrices, data analysts working with covariance structures, and engineers solving three-variable linear systems.


Step-by-Step Worked Example

Consider the nine input values: 2, 0, 1, 1, 3, 2, 1, 1, 1.

Step 1: Arrange the Matrix

Assign the entries row by row into a standard 3×3 grid:

Row 1: [ a = 2,  b = 0,  c = 1 ]
Row 2: [ d = 1,  e = 3,  g = 2 ]
Row 3: [ h = 1,  i = 1,  j = 1 ]

Step 2: Compute the Determinant

Using Laplace expansion across Row 1: $$\text{det}(A) = a(ej - gi) - b(dj - gh) + c(di - eh)$$

Evaluate the 2×2 minors:

  1. First minor: $(3 \times 1) - (2 \times 1) = 3 - 2 = 1$
  2. Second minor: $(1 \times 1) - (2 \times 1) = 1 - 2 = -1$
  3. Third minor: $(1 \times 1) - (3 \times 1) = 1 - 3 = -2$

Substitute the scalar row entries: $$\text{det}(A) = 2(1) - 0(-1) + 1(-2)$$ $$\text{det}(A) = 2 - 0 - 2 = 0$$

The determinant is 0.

Step 3: Compute the Trace

Sum the elements along the main diagonal ($a + e + j$): $$\text{Trace} = 2 + 3 + 1 = 6$$

The trace is 6.

Step 4: Determine Invertibility

The formula for the inverse matrix is: $$A^{-1} = \frac{1}{\text{det}(A)} \times \text{adj}(A)$$

Because the determinant is $0$, computing $1 / 0$ is undefined. Therefore, the matrix is singular, and the result is accurately reported as Not invertible (det = 0).


How to Interpret the Results

Understanding the output allows you to diagnose systems of linear equations and geometric operations:

  • Determinant = 0 (Singular Matrix): The rows (or columns) are linearly dependent. In geometric terms, the transformation flattens 3D space into a plane, line, or single point, losing a dimension. In systems of linear equations ($Ax = b$), there is either no solution or an infinite family of solutions.
  • Determinant ≠ 0 (Non-Singular Matrix): The transformation preserves volume dimensionality. A unique inverse exists, guaranteeing that any linear system $Ax = b$ has exactly one unique solution: $x = A^{-1}b$.
  • Sign of Determinant: A positive determinant preserves spatial orientation (right-handed coordinates stay right-handed). A negative determinant reverses spatial orientation (reflects space across an axis).
  • Trace: Represents the divergence of a vector field generated by the matrix, or the sum of its eigenvalues. If the trace is zero in specific dynamical systems, the system is volume-preserving or conservative.

Practical Tips for Matrix Calculations

  1. Maintain Row Order: The input string strictly reads left-to-right across Row 1, then Row 2, then Row 3. Mixing rows and columns transposes your data, altering the resulting inverse.
  2. Look for Zero Multipliers: When solving manually, expanding across a row or column containing multiple zeros simplifies calculations, as demonstrated by the $0(-1)$ term in our example.
  3. Sanity Check the Diagonal: The trace is easy to calculate mentally. If your manual trace ($a + e + j$) does not match the calculator output, you likely misordered the input string.

When Not to Rely on Basic Matrix Inversion

While direct algebraic inversion works reliably for theoretical calculations, avoid standard matrix inversion in specific applied scenarios:

  • Ill-Conditioned Systems: If the determinant is non-zero but exceedingly close to zero (e.g., $10^{-8}$), numerical rounding can produce an inverse with massive errors. Use matrix decomposition techniques (such as LU, QR, or Singular Value Decomposition) instead.
  • Large Linear Systems: Solving $Ax = b$ by first calculating $A^{-1}$ and multiplying $A^{-1}b$ is computationally inefficient and introduces unnecessary rounding error compared to Gaussian elimination or Cholesky decomposition.
  • Non-Square Datasets: For rectangular data arrays (such as $m \times n$ regression matrices), use least-squares solutions or the Moore-Penrose pseudoinverse rather than standard 3×3 inversion.

Comparison

ScenarioInputResult
Base exampleMatrix entries, row by row (9 numbers): 2, 0, 1, 1, 3, 2, 1, 1, 1Determinant: 0

Common mistakes

  • Entering values in column-major order instead of row-by-row sequence.
  • Entering fewer or more than nine values, causing parsing failures.
  • Forgetting the alternating sign pattern (+, -, +) across the first row during manual determinant calculation.
  • Assuming a matrix with a determinant of zero has an inverse (singular matrices cannot be inverted).
  • Confusing the trace (sum of main diagonal elements) with the determinant (a scalar product expansion).

Checklist

  • Verify that your matrix is strictly 3×3 with exactly nine real-number values entered.
  • Input entries in standard row-major order: Row 1 left-to-right, then Row 2, then Row 3.
  • Separate all nine numbers cleanly with commas.
  • Double-check negative signs before computing to avoid widespread cofactor sign errors.
  • Confirm the determinant is non-zero before expecting a valid multiplicative inverse matrix.
  • Use exact fractions or high-precision decimals when transcribing results into engineering workflows.

Calculators Percentage Editorial Team

Calculator guides from the Calculators Percentage team. These introductory examples are educational, not professional advice.

Last reviewed:

This calculator provides computational solutions for theoretical and applied mathematics based on standard linear algebra rules. Verify all safety-critical engineering, structural, or cryptographic calculations with certified numerical packages.

Frequently Asked Questions

What does a determinant of zero mean?

A determinant of zero indicates that the matrix is singular and non-invertible. Geometrically, it means the transformation collapses three-dimensional space into a lower dimension, such as a flat plane or a line, meaning volume scaling is zero. Systems of linear equations represented by such matrices either have no unique solution or infinitely many solutions.

How is the trace of a 3×3 matrix calculated?

The trace of a matrix is the sum of the elements along its main diagonal running from the top-left to the bottom-right. For a 3×3 matrix with rows [a, b, c], [d, e, g], and [h, i, j], the trace equals a + e + j. It is invariant under change of basis and equals the sum of the matrix's eigenvalues.

Can you invert a non-square matrix?

No, standard matrix inversion is only defined for square matrices (n×n) with a non-zero determinant. While non-square matrices can have left inverses, right inverses, or Moore-Penrose pseudoinverses in advanced linear algebra, they do not possess a standard two-sided multiplicative inverse.

What is the difference between adjugate and inverse?

The adjugate matrix is the transpose of the matrix of cofactors formed from the original matrix. The inverse is the adjugate divided by the scalar determinant. If the determinant is zero, the adjugate still exists, but dividing by zero prevents the inverse from existing.

Why does matrix order matter when multiplying by the inverse?

Matrix multiplication is non-commutative, meaning A × B rarely equals B × A. However, when multiplying a square matrix by its own inverse, order does not alter the result: A × A⁻¹ = A⁻¹ × A = I, where I is the identity matrix.

How do rounding errors affect matrix invertibility?

In floating-point digital computation, matrices that are theoretically singular might yield a minuscule determinant like 1e-16 due to rounding limits. A matrix with an extremely small non-zero determinant is termed 'ill-conditioned,' meaning small input perturbations cause massive errors in the inverse.

Sources & references

Formulas are tested against hand-checked answers. How we check our calculators.

Estimates only. Confirm final figures, terms and fees with your bank, provider or a qualified professional.

Last updated: January 15, 2026