Reference: diag
diag(a1, a2, ..., an) returns the n×n square matrix with the entry Mij equal to ai δ(i, j) where δ is the Kronecker delta function. diag(❨a1, a2, ..., an❩) returns the n×n square matrix with the entry Mij equal to ai δ(i, j) where δ is the Kronecker delta function.