Implement cacheMatrix

Implemented the cachematrix functions