The functions makeCacheMatrix and cacheSolve added

add the source to your R environment by using
source(“cacheMatrix.R”)
usage:
holder <- makeCacheMatrix(matrix(c(1:4), nrow=2, ncol=2))

cacheSolve(holder)

holder$getinv()

     [,1] [,2]
[1,]   -2  1.5
[2,]    1 -0.5

Change the values using holder$set(matrix)

*important* this functions do not work for inverses of singular
matrices.