Created makeCacheMatrix function to store an inverted matrix and cacheSolve function to calculate and cache the inverted matrix in the makeCacheMatrix object.