Add docstring to matrices.py