Added functions for making a vector function and caching the inverse of a matrix