Homework done. Caching an inverse with its matrix.