Update cachematrix.R

Updated with functions