Wrote matrix inverse caching functions for Programming Assignment 2