Matrix inversion done, working correctly.