Coded the functions of Programming Assignment #2

The inverse of the matrix can be cached and retrieved from the special
"matrix" object.