Updated cachematrix.R file with completed formulas