USAGE Examples :
x <- matrix(rnorm(16), nrow = 4)
cm <- makeCacheMatrix(x)
cm$getMatrix()
[,1] [,2] [,3] [,4]
[1,] -1.4332700 -1.1260479 -0.8502516 -0.567789
[2,] -0.2163094 -1.7524981 -0.4194068 -1.442623
[3,] -1.0437617 -0.3273858 -0.2062895 -0.637691
[4,] 0.5098000 0.2229530 0.2166387 -0.369119
cacheSolve(cm)
Calculate the inverse of the matrix...
[,1] [,2] [,3] [,4]
[1,] 0.5969354 -0.009156084 -1.1969154 1.185356
[2,] 1.1093224 -0.951691610 -0.1859315 2.334309
[3,] -3.3403496 1.198436085 2.4733969 -3.818661
[4,] -0.4659866 0.115890352 -0.3137416 -1.903272
cacheSolve(cm)
Getting cached data...
[,1] [,2] [,3] [,4]
[1,] 0.5969354 -0.009156084 -1.1969154 1.185356
[2,] 1.1093224 -0.951691610 -0.1859315 2.334309
[3,] -3.3403496 1.198436085 2.4733969 -3.818661
[4,] -0.4659866 0.115890352 -0.3137416 -1.903272
cm$getInverseMatrix()
[,1] [,2] [,3] [,4]
[1,] 0.5969354 -0.009156084 -1.1969154 1.185356
[2,] 1.1093224 -0.951691610 -0.1859315 2.334309
[3,] -3.3403496 1.198436085 2.4733969 -3.818661
[4,] -0.4659866 0.115890352 -0.3137416 -1.903272