diagonaalmatrix
A diagonal matrix is a square matrix in which every non-diagonal entry is zero. Equivalently, a matrix A = [a_ij] is diagonal if a_ij = 0 for all i ≠ j. A diagonal matrix can be written as D = diag(d1, d2, ..., dn), where di are the entries on the main diagonal.
Properties and operations follow from its structure. The product of two diagonal matrices is diagonal, with
Eigenvalues and diagonalization are straightforward: the eigenvalues of a diagonal matrix are precisely its diagonal entries.
Special cases include the identity matrix, which is diagonal with ones on the diagonal, and the zero