Update cachematrix.R

Assignment from student Chan Shu Ching