Cachematrix updated

The cachematrix functions now store and solve for a matrix as required