Update matrices.h

Added a few methods, improved consistency and some bug fixes.