Completed the two functions in cachematrix.R as programming assignment 2 required.