So much wasted time.

I spent much of my first two years at university cursing the names of Gauss and Jordan, railing at my lecturer (who grim-facedly assured me there were no more useful uses of a student’s thinking time than ham-fistedly rearranging these things), and thinking “there MUST be a better way”

There’s a different way, and I quite like it. Here’s what you do, working as an example with the matrix $\matthreethree{1&}{2&}{3}{4&}{5&}{6}{7&}{8&}{0}$.

There are three major steps:

1. Copy out the matrix in four different places, sometimes circled and sometimes not

2. Do a couple of multiplications and a subtraction in each cell

3. Divide the whole thing by the determinant

My experience of it today is that it’s much quicker and more reliable than Gauss-Jordan, but your mileage may (of course) vary.

Start by drawing a 3 × 3 grid, with squares big enough for four small numbers, two moderate-sized numbers and one big number.

You’re going to copy the matrix into this grid four times, each time wrapping around to the left of the row or top of the column if you run out of space, and each time offset from where it started:

• Once, offset by one cell to the right and one down

• Once, offset by two cells to the right and two down

• Once circled, offset by two cells right and one down

• Once circled, offset by one cell right and two down

Using brackets rather than circles, this example would develop as (I’ve bolded where the top-left element goes at each step):

 0 7 8 3 1 2 6 4 5
 0 4 7 6 8 4 3 8 1 9 2 7 6 2 4 3 5 1
 0 4 (8) 7 6 (0) 8 4 (7) 3 8 (2) 1 9 (3) 2 7 (1) 6 2 (5) 4 3 (6) 5 1 (4)
 0 4 (8) (6) 7 6 (0) (4) 8 4 (7) (5) 3 8 (2) (0) 1 0 (3) (7) 2 7 (1) (8) 6 2 (5) (3) 4 3 (6) (1) 5 1 (4) (2)

Now, in each cell, I’m going to subtract the product of the circled numbers from the product of the uncircled numbers. For instance, in the bottom-right cell, I’ll work out $5 \times 1 - 4 \times 2 = 5 -8 = -3$. Here’s how it goes down:

 -48 42 -3 24 -21 6 -3 6 -3

Almost done! All we need to do now is divide by the determinant of the original matrix. Using the Mathematical Ninja’s trick, that’s: $\left[(1 \times 5 \times 0 + 2 \times 6 \times 7 + 3\times 4 \times 8 \right] - \left[ 1 \times 6 \times 8 + 2 \times 4 \times 0 + 3 \times 5 \times 7 \right] = [0 + 84 + 96] - [48 + 0 + 105] = 180 - 153 = 27$.

We could write it as $\frac{1}{27}\matthreethree{-48&}{42&}{-3}{24&}{-21&}{6}{-3&}{6&}{-3}$, but the Mathematical Ninja would have our guts for garters: there’s a factor of three all the way through!

The inverse is $\frac{1}{9}\matthreethree{-16&}{14&}{-1}{8&}{7&}{2}{-1&}{2&}{-1}$.

* Edited 2016-05-23 to correct an unfinished sentence.