Update cachematrix.R

These functions were checked in local, and tested to work as expected on invertible matrices.