function to return Inverse of matrix