Wrote two functions in cachematrix.R as required by Programming Assignment 2