Improved matrix documentation