Cachematrix code to invert & cache matrix completed