Completed assignment to provide a matrix that can cache it's own inverse.