write functions for matrix inverse cacheing