Functions to cache matrix inverse. Try getting cached inverse first.