Wrote functions in cachematrix.R

Did assignment