Inverse matrix by cache matrix value

First trial by my understanding through instructor's example.