Taking my first stab at these matrix inversion functions