Updated cachematrix.R with function definitions