Implementation of the inverse cached matrix