How to Find a 3×3 Determinant and Inverse

Calculates the determinant of the matrix [[a, b, c], [d, e, f], [g, h, i]] by expanding along the first row, and gives the nine entries of its inverse, the transposed cofactor matrix divided by the determinant. When the determinant is zero there is no inverse.

This gives the determinant and the inverse of a three by three matrix. The determinant is found by expanding along the first row.

det=a(eifh)b(difg)+c(dheg)\det = a(ei - fh) - b(di - fg) + c(dh - eg)

The matrix is written [[a,b,c],[d,e,f],[g,h,i]][[a, b, c], [d, e, f], [g, h, i]]. Each entry of the first row is multiplied by the two by two determinant left when its own row and column are struck out, and the signs alternate ++, -, ++.

The inverse is the matrix of cofactors, transposed and divided by the determinant.

Example

For [[1,2,3],[0,1,4],[5,6,0]][[1, 2, 3], [0, 1, 4], [5, 6, 0]] the determinant is 1(1×04×6)2(0×04×5)+3(0×61×5)1(1 \times 0 - 4 \times 6) - 2(0 \times 0 - 4 \times 5) + 3(0 \times 6 - 1 \times 5), which is 24-24, then +40+40, then 15-15, adding to 1. With a determinant of 1 no division is needed and the inverse is all whole numbers: [[24,18,5],[20,15,4],[5,4,1]][[-24, 18, 5], [20, -15, -4], [-5, 4, 1]].

What the determinant means

The determinant is the factor by which the matrix scales volume. A negative sign means the transformation also turns space inside out.

A matrix with determinant 0 has no inverse. Its three row vectors lie in a single plane, so the transformation flattens space, and nothing flattened can be undone.

Notes

Enter the entries row by row: aa, bb, cc across the first row, dd, ee, ff across the second, gg, hh, ii across the third.