Write functions for creating matrix and caching its inverse

This is a solution for programming assignment #2