The short answer: for a 3×3 matrix A, the determinant is det(A) = a(ei − fh) − b(di − fg) + c(dh − eg). If det(A) ≠ 0, the inverse is the adjugate divided by the determinant, and the system AX = B has the unique solution X = A⁻¹B. Cramer’s rule gives the same answer as ratios of determinants; a zero determinant means no unique solution.

Key takeaways

  • Det is a signed volume scale factor. A zero determinant collapses three-dimensional space into a plane or line.
  • Cofactor signs alternate, starting with + in the top-left position.
  • The adjugate is the transpose of the cofactor matrix. Forgetting the transpose is the classic inverse error.
  • Cramer’s rule is tidy for 3×3 systems, but inefficient for large ones.
  • Always verify A × A⁻¹ = I and substitute the solution into the original equations.
  • Near-zero determinants amplify rounding error, even when the matrix is technically invertible.

What a 3×3 matrix represents

A 3×3 matrix stores nine numbers in three rows and three columns. It can be read as a linear map from three-dimensional space to itself: the columns are the images of the unit vectors, and multiplying the matrix by a vector produces a new vector. It can also be read as the coefficient table of three linear equations in three unknowns.

Both readings matter. The determinant describes how the map scales volume, and the inverse undoes the map. The same array therefore answers a geometric question (“what happens to a cube?”) and an algebraic one (“what values satisfy all three equations?”).

The determinant by cofactor expansion

For A = [[a, b, c], [d, e, f], [g, h, i]], expanding along the first row gives:

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

The terms in parentheses are 2×2 determinants called minors. The pattern of signs is + − + along the first row, and it alternates in a checkerboard across the matrix. Expanding along any row or column gives the same determinant, so choose the row or column with the most zeros.

For A = [[2, 1, 0], [1, 3, 1], [0, 1, 2]]: det(A) = 2(3×2 − 1×1) − 1(1×2 − 1×0) + 0 = 2(5) − 2 = 8. The nonzero determinant means the three rows are linearly independent and the matrix is invertible.

Minors, cofactors, and the adjugate

The minor Mij is the determinant left after deleting row i and column j. The cofactor is Cij = (−1)^(i+j) × Mij, which applies the checkerboard sign. The cofactor matrix collects all nine cofactors, and the adjugate adj(A) is its transpose: adj(A) = C^T.

For the example matrix, the cofactors are C11 = 5, C12 = −2, C13 = 1, C21 = −2, C22 = 4, C23 = −2, C31 = 1, C32 = −2, and C33 = 5. The cofactor matrix is symmetric here, so its transpose is identical. That is a convenience of this example, not a general rule.

Building the inverse

If det(A) ≠ 0, the inverse is A⁻¹ = adj(A) ÷ det(A). For the example:

A⁻¹ = (1/8) × [[5, −2, 1], [−2, 4, −2], [1, −2, 5]]

Check one entry of A × A⁻¹: row 1 of A times column 1 of A⁻¹ is (2×5 + 1×(−2) + 0×1) ÷ 8 = 8 ÷ 8 = 1. Row 1 times column 2 is (2×(−2) + 1×4 + 0×(−2)) ÷ 8 = 0, as required for an off-diagonal entry of the identity. A full check catches sign and transpose errors quickly.

The inverse exists only for square matrices with nonzero determinant. A rectangular matrix can have a left or right pseudo-inverse, but it does not have a two-sided inverse.

Solving AX = B with the inverse

If A is invertible, multiply both sides of AX = B on the left by A⁻¹: X = A⁻¹B. Order matters because matrix multiplication is not commutative; B × A⁻¹ is generally a different product and may not even be defined.

Take B = [1, 2, 3]^T. Then x = (5×1 − 2×2 + 1×3) ÷ 8 = 4 ÷ 8 = 0.5, y = (−2×1 + 4×2 − 2×3) ÷ 8 = 0, and z = (1×1 − 2×2 + 5×3) ÷ 8 = 12 ÷ 8 = 1.5. Substituting: 2(0.5) + 0 = 1, 0.5 + 3(0) + 1.5 = 2, and 0 + 0 + 2(1.5) = 3. All three equations hold.

Cramer’s rule

Cramer’s rule expresses each unknown as a ratio of determinants. Let A_i be the matrix formed by replacing column i of A with B. Then x_i = det(A_i) ÷ det(A). For the same system, det(A) = 8.

Replacing column 1 gives det(A_x) = 1(3×2 − 1×1) − 1(2×2 − 1×3) + 0 = 5 − 1 = 4, so x = 4/8 = 0.5. Replacing column 2 gives det(A_y) = 2(2×2 − 1×3) − 1(1×2 − 1×0) + 0 = 2 − 2 = 0, so y = 0. Replacing column 3 gives det(A_z) = 2(3×3 − 1×1) − 1(1×3 − 2×0) + 1(1×1 − 3×0) = 14 − 3 + 1 = 12, so z = 1.5.

Cramer’s rule fails when det(A) = 0: the ratios are undefined, and the system has either no solution or infinitely many. It is also numerically weaker than elimination when the determinant is small relative to the entries.

Row reduction versus inverse and Cramer

Gaussian elimination solves AX = B by combining rows until the system is triangular, then back-substituting. It uses about n³/3 operations for an n×n system, while computing an explicit inverse uses roughly n³ operations and Cramer’s rule uses about n⁴. For a single 3×3 system, all three are easy by hand; for a 30×30 system, elimination is far faster.

The inverse is worth computing when the same A will be used with many different B vectors. Cramer’s rule is worth using when you need only one unknown and the determinants are simple. Elimination is the default for numerical work because it is stable and does not require forming A⁻¹.

Singular and near-singular matrices

A matrix is singular when det(A) = 0. For example, [[1, 2, 3], [2, 4, 6], [1, 1, 1]] is singular because row 2 is twice row 1, so the three rows do not span three dimensions. A singular system has no unique solution: the equations may be inconsistent (no solution) or dependent (infinitely many).

Near-singular is subtler. A determinant of 0.001 is nonzero, but the inverse contains entries around 1,000 times larger than the original, so small input errors become large output errors. The condition number measures this amplification; a large condition number warns that the computed solution may have few correct digits even when the arithmetic is exact.

Common mistakes

  • Dropping a cofactor sign. The checkerboard pattern is not optional; one wrong sign corrupts the inverse.
  • Forgetting to transpose the cofactor matrix. The adjugate is C^T, not C.
  • Dividing by the wrong determinant. Each cofactor is divided by det(A), not by a minor.
  • Multiplying in the wrong order. X = A⁻¹B, never B A⁻¹.
  • Assuming a zero determinant means “no solution.” It can also mean infinitely many solutions.
  • Rounding intermediate cofactors. Keep exact fractions until the final step.

Practical caveats

Hand calculations are excellent for learning and for small exact systems, but production code should use a library routine based on LU decomposition with partial pivoting. Those routines handle row swaps and scaling, and they report conditioning information that a hand determinant does not.

Units matter when the matrix mixes quantities. Adding a row of metres to a row of seconds is legal arithmetic but meaningless modelling. Scale rows and columns to comparable magnitudes before judging whether a determinant is “small,” because a determinant of 10⁻⁶ may be perfectly conditioned if all entries are around 10⁻².

Frequently asked questions

Can every 3×3 matrix be inverted?

No. A matrix is invertible only if its determinant is nonzero and its rows (equivalently, columns) are linearly independent.

Why does Cramer’s rule require a nonzero determinant?

Each unknown is a ratio with det(A) in the denominator. If det(A) = 0, the division is undefined and the system does not have a unique solution.

Is the inverse of a symmetric matrix always symmetric?

Yes. If A is symmetric and invertible, then (A⁻¹)^T = (A^T)⁻¹ = A⁻¹, so the inverse is symmetric too.

What does a negative determinant mean geometrically?

Its absolute value is the volume scale factor, and the negative sign means the transformation reverses orientation, like a mirror reflection.

Which method should I use for a 3×3 system by hand?

Elimination is usually fastest and least error-prone. Use the inverse or Cramer’s rule when the problem specifically calls for them or when you need a formula for one unknown.

How can I check an inverse quickly?

Multiply A by A⁻¹ and confirm you get the identity matrix. Even checking one row catches most sign, transpose, and scaling mistakes.

Further reading

Keep exploring

Read next Logarithm: Base, Product Rule, and Scale A logarithm is an exponent in disguise. Learn the definition, the product, quotient and power rules, change of… Read next Order of Operations: PEMDAS and Ambiguous Expressions PEMDAS is a shared convention, not a law of mathematics. Learn the real precedence rules, the exponent and… Read next Significant Figures: Counting, Rounding, and Precision Significant figures record how precisely a value was measured. Learn the counting rules, the addition and multiplication rules,…