CalculateItNow home

Matrix Calculator

Determinant, trace, transpose and inverse of a 2×2 or 3×3 matrix, with the cofactor expansion written out and singular matrices called out explicitly.

Matrix Calculator: with the default inputs, determinant is 10.

Try an example
Determinant
10
Trace (sum of the diagonal)
10
Singular?
No — the determinant is not 0, so the matrix is invertible
Inverse
[0.6 -0.7; -0.2 0.4]
Transpose
[4 2; 7 6]
Assumptions
  • Only real-valued 2×2 and 3×3 matrices are supported.
  • The inverse is computed from the adjugate divided by the determinant — exact for exact inputs, but ill-conditioned matrices amplify rounding error.
  • A determinant of exactly 0 is reported as singular; a very small non-zero determinant is still inverted, with the usual numerical caveats.
Your 2×2 matrix
Column 1Column 2
47
26
Inverse
Column 1Column 2
0.6-0.7
-0.20.4

Multiply the matrix by this and you get the identity, up to rounding.

Math verified by automated testsUpdated 2026-09-092 sources cited

How this is worked out

The formula

2×2:  det = a₁₁a₂₂ − a₁₂a₂₁
      inverse = (1 ÷ det) × [ a₂₂  −a₁₂ ; −a₂₁  a₁₁ ]

3×3:  det = a₁₁(a₂₂a₃₃ − a₂₃a₃₂) − a₁₂(a₂₁a₃₃ − a₂₃a₃₁) + a₁₃(a₂₁a₃₂ − a₂₂a₃₁)
      inverse = adjugate ÷ det, where the adjugate is the transpose of the cofactor matrix

Trace = sum of the diagonal entries.  A matrix is singular exactly when det = 0.

Open How it’s calculated above to see this worked through with your own numbers.

What you enter

Matrix size
A 2×2 uses only the top-left four entries.2 × 2 · 3 × 3
a11
A number.defaults to 4
a12
A number.defaults to 7
a13(under More options)
A number.defaults to 2
a21
A number.defaults to 2
a22
A number.defaults to 6
a23(under More options)
A number.defaults to 3
a31(under More options)
A number.defaults to 1
a32(under More options)
A number.defaults to 2
a33(under More options)
A number.defaults to 9

What you get back

Determinantmain answer
Trace (sum of the diagonal)
Singular?
Inverse
Transpose

What this assumes

  • Only real-valued 2×2 and 3×3 matrices are supported.
  • The inverse is computed from the adjugate divided by the determinant — exact for exact inputs, but ill-conditioned matrices amplify rounding error.
  • A determinant of exactly 0 is reported as singular; a very small non-zero determinant is still inverted, with the usual numerical caveats.

About this calculator

The determinant is the single number that tells you the most about a square matrix. It is the factor by which the matrix scales area (2×2) or volume (3×3), and its sign says whether the transformation flips orientation. A determinant of 0 means the matrix squashes space flat — and that is precisely when no inverse exists.

How to use it

Choose 2×2 or 3×3 and fill in the entries; a 2×2 uses only the top-left four boxes, and the third row and column are tucked under More options. The steps show the cofactor expansion in full, which is the working a linear algebra course expects to see.

How to read the results

  • Determinant. For a 2×2 matrix built from the vectors (a₁₁, a₂₁) and (a₁₂, a₂₂), |det| is the area of the parallelogram they span. For a 3×3 it is the volume of the parallelepiped. A negative determinant means the transformation reverses handedness (a reflection is mixed in).
  • Trace is the sum of the diagonal. It equals the sum of the eigenvalues, just as the determinant equals their product — the two numbers together pin down a 2×2 matrix's characteristic polynomial completely.
  • Inverse. Computed from the adjugate divided by the determinant, which is the exact closed form rather than a numerical elimination. Multiply the original by the inverse and you get the identity matrix.
  • Transpose flips rows and columns. Note that det(Aᵀ) = det(A) always.

Singular matrices

When the determinant is exactly 0 the matrix is singular and there is no inverse. The calculator says so explicitly rather than printing infinities. In practice this means the rows (equivalently the columns) are linearly dependent — one is a combination of the others — and the system Ax = b either has no solution or infinitely many, never exactly one.

Where it misleads

A determinant that is merely small is a warning sign of its own. The matrix [[1, 1], [1, 1.0001]] has a determinant of 0.0001 and a perfectly well-defined inverse, but that inverse has entries in the tens of thousands, so tiny errors in the input become enormous errors in the output. Numerical analysts call this ill-conditioning, and it is why serious software solves linear systems by LU decomposition with pivoting rather than by forming the inverse at all. The closed-form inverse here is exact for exact inputs and ideal for teaching; for solving a large or delicate system, use a proper solver.

Frequently asked questions

How do I find the determinant of a 2×2 matrix?

Multiply the main diagonal and subtract the product of the other diagonal: ad − bc. For [[1, 2], [3, 4]] that is 1×4 − 2×3 = −2.

What does it mean when the determinant is zero?

The matrix is singular. It maps space onto a lower-dimensional subspace, has no inverse, and the associated system of equations has either no solution or infinitely many.

How do you invert a 3×3 matrix by hand?

Build the 3×3 matrix of cofactors, transpose it to get the adjugate, then divide every entry by the determinant. The calculator does exactly that, so the steps match a textbook worked example.

Is the determinant of a transpose the same?

Yes — det(Aᵀ) = det(A) for every square matrix. Swapping rows and columns never changes the determinant.

Why can't I do 4×4 or matrix multiplication here?

This calculator is built around the closed-form 2×2 and 3×3 results that are worth showing the working for. Larger matrices need elimination-based methods where the useful output is the algorithm's trace, not a formula.

Put this calculator on your own site

A working matrix, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.

Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.

Matrix Calculator by CalculateItNow

The page's own title. The clearest description of what the link leads to.

The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.

Browse every calculator widget·How to add it to WordPress, Squarespace or Wix

The questions people ask next to a matrix.

All math calculators·Browse everything