Inverts a 3x3 matrix.
Reference: https://www.geometrictools.com/Documentation/LaplaceExpansionTheorem.pdf