Added code for caching and inverting given matrix.