makeCacheMatrix and cacheSolve functions written.