• DiagonalMatrix[list] gives a matrix with the elements of list on the leading diagonal, and 0 elsewhere.