Diagonal matrix is a special matrix in linear algebra. Its characteristic is that all elements except diagonal are zero.
The diagonal elements of a diagonal matrix can be any real number or complex number. Diagonal matrices are widely used in mathematics and physics, such as solving linear equations, diagonalizing matrices, quantum mechanics and so on.
Diagonal matrix has some special properties, such as "as long as the elements on the diagonal are not zero", it is always reversible, and the determinant of diagonal matrix is equal to the product of diagonal elements. In addition, the transposition of diagonal matrix is the same as the original matrix, and its rank is equal to the number of non-zero diagonal elements.