Add methods and code to cache the inverse matrix.
Add comments.