function to find an inverse of a matrix