Completed assignment

Added code adapted from the example code, which stores and retrieves the
inverses of square matrices.