Updated the cachematrix.R to complete the assignment.