Added both the functions for caching matrix inverse