filled in functions to specify a matrix and cache its inverse