“I know the inverse formula, but I always slip somewhere in the arithmetic.” Matrix computations are mechanical — follow the steps and you arrive at the right answer — yet a single flipped sign derails everything.

This article works through determinants and inverses for 2×2 and 3×3 matrices with every substitution written out, including why a determinant of 0 means no inverse exists. A free calculator verifies the results at the end.

Terms first: matrix and identity matrix

A matrix is a rectangular arrangement of numbers; this article deals with square matrices (2×2 and 3×3). Entries are named from the top-left: for A = [a, b; c, d], entry a sits in row 1 column 1, b in row 1 column 2.

The identity matrix E places 1s on the diagonal and 0s elsewhere ([1, 0; 0, 1] for 2×2) — the matrix analogue of the number 1. An inverse is verified by checking that A × A⁻¹ = E.

The determinant: one number per matrix

The determinant (det) turns a square matrix into a single number. For a 2×2 matrix A = [a, b; c, d]:

det A = a·d − b·c

For example, A = [1, 2; 3, 4] gives det A = 1 × 4 − 2 × 3 = 4 − 6 = −2.

Geometrically, the determinant is the factor by which the matrix stretches space. det = 0 means space collapses — the transformation cannot be undone. A rotation matrix always has determinant 1: the 30° rotation [cos30°, −sin30°; sin30°, cos30°] has determinant cos²30° + sin²30° = 1.

The 2×2 inverse: one formula

The inverse A⁻¹ satisfies A × A⁻¹ = E, and exists only when det ≠ 0. For 2×2 there is an elegant formula:

A⁻¹ = (1/det A) × [d, −b; −c, a]

Swap the diagonal entries, flip the signs of the off-diagonal entries, divide by the determinant — that is everything.

Example: A = [2, 1; 1, 1]

det A = 2 × 1 − 1 × 1 = 1. Since det ≠ 0, the inverse exists:

A⁻¹ = (1/1) × [1, −1; −1, 2] = [1, −1; −1, 2]

Check: A × A⁻¹ = [2×1+1×(−1), 2×(−1)+1×2; 1×1+1×(−1), 1×(−1)+1×2] = [1, 0; 0, 1] — the identity matrix, confirming the result.

When det = 0

For A = [1, 2; 2, 4]: det A = 1 × 4 − 2 × 2 = 0, so no inverse exists. The associated linear system corresponds to parallel lines with no unique solution. Rather than “division by zero”, read it as “a transformation that cannot be reversed”.

The 3×3: cofactor expansion

A 3×3 determinant expands along the first row:

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

Example: A = [1, 0, 2; −1, 5, 0; 0, 3, 1]

Compute the three 2×2 minors:

  • ei − fh = 5 × 1 − 0 × 3 = 5
  • di − fg = (−1) × 1 − 0 × 0 = −1
  • dh − eg = (−1) × 3 − 5 × 0 = −3

Substituting: det A = 1 × 5 − 0 × (−1) + 2 × (−3) = −1. Since det ≠ 0, an inverse exists, with each entry computed as cofactor ÷ determinant:

A⁻¹ = [−5, −6, 10; −1, −1, 0; 3, 3, −5]

— every entry a whole number. The diagonal of A × A⁻¹ comes out 1, 1, 1, confirming correctness. Notice also that expanding along a row or column rich in zeros (like the second column here) keeps the arithmetic light.

Three common mistakes: forgetting to swap the diagonal entries in the 2×2 inverse formula ([d, −b; −c, a]); breaking the alternating sign pattern (+, −, + / −, +, − / +, −, +) during 3×3 expansion; and attempting 1/det on a matrix whose determinant is 0. The checkerboard sign pattern prevents the middle one.

Verify with the tool

Tools Hub’s Matrix Determinant & Inverse calculator takes a 2×2 or 3×3 matrix and returns the determinant with cofactor-expansion working, the inverse as a grid, and a check of the diagonal entries of A × A⁻¹. Singular matrices are reported.

How to use it (3 steps)

1

Pick the size

Choose the 2×2 or 3×3 tab. In 2×2 mode the third row and column are hidden automatically.

2

Enter the entries

Fill in the entries from the top-left. Example buttons load the matrices from this article instantly.

3

Read det, the inverse and the check

The determinant panel shows the substituted expansion, the inverse appears as a grid, and 3×3 results include a diagonal check of A × A⁻¹. A missing inverse is reported explicitly.

The tool featured in this article

Matrix Determinant & Inverse

Determinants with cofactor-expansion working and inverse matrices as a grid, with singular detection and an identity check. Free and browser-based.

Try it now

To try the example, open the 2×2 tab and press the example button for [2, 1; 1, 1]: det = 1 with inverse [1, −1; −1, 2] appears at once. See working with fractions and the dot product guide for related reading.

Summary

  • 2×2 determinant: a·d − b·c; inverse: (1/det) × [d, −b; −c, a], requiring det ≠ 0
  • 3×3 determinant expands along the first row with the +, −, + sign pattern
  • det = 0 means a transformation that cannot be reversed — no inverse exists
  • Verify with A × A⁻¹ = E; expand along rows with many zeros

FAQ

What are inverse matrices used for?

A linear system written as A·x = b has solution x = A⁻¹·b. Inverses also undo transformations — restoring coordinate systems, replaying animations backwards — and appear throughout computer graphics.

The textbook solves 3×3 inverses differently — why?

Multiple routes reach the same inverse. OpenStax applies row operations to the augmented matrix; this tool computes each entry as cofactor ÷ determinant. Both are correct.

Can I tell whether det = 0 without computing?

Often, yes: if one row (or column) is a constant multiple of another — as in [1, 2; 2, 4] where the second row is twice the first — the determinant is 0. Scanning for that pattern also makes expansion easier, since zeros simplify the arithmetic.

Can the tool handle 4×4 or larger matrices?

No — it is limited to 2×2 and 3×3. Larger sizes usually go through Gaussian elimination, which follows different steps.

References

  • OpenStax, College Algebra 2e, Section 7.7 “Solving Systems with Inverses” (identity matrix, the 2×2 inverse formula, verification): openstax.org
  • OpenStax, College Algebra 2e, Section 7.8 “Solving Systems with Cramer’s Rule” (2×2 and 3×3 determinants): openstax.org