Created caching function

Added functions to create the matrix object and perform the invert
calculation and cache this value.