Created functions to determine and cache the inverse of a matrix