Updated cachematrix.R

Added comments and code for the functions.