invert function

Matrix Inversion with Fallback Methods