R program to inverse a matrix and cache it for quick retrieval.