Cache matrix inverse

completed programming assignment 2