assignment 2: implemented two functions for cache matrix inverse.