Inversing a matrix

My function to calculate the inverse of a matrix