Update: Implementation of Matrix inversion with caching of result.