creation of the homework functions

calculates, caches and retrieves the inverse of a matrix