Wrote functions makeCacheMatrix and cacheSolve.