Update cachematrix.R so the functions satisfy the requirements