Adds solution for solving and caching the inverse of a matrix