teach diagonal to use the 'diagonal' attribute if a matrix has one

* closes #14
* could help with #8