cache matrix function

Final version of the cache matrix functions.