Calculates inverse of given matrix