Modifed the cachematrix template to add code for inversion of matrix