Function for creating the special matrix defined
Function for the cachedInverse calculation, added comment for all the function and tested the function