The object diagonalMatrix is a method function.
The source of this document is in Macaulay2Doc/functions/diagonalMatrix-doc.m2:14:0.