Function to compute inverse of an invertible matrix and cache it for reuse