A diagonal matrix is a square matrix of the form
(1)
|
where is the Kronecker delta, are constants, and , 2, ..., , with no implied summation over indices. The general diagonal matrix is therefore of the form
(2)
|
often denoted .
The diagonal matrix with elements can be computed in the Wolfram Language using DiagonalMatrix[l], and a matrix may be tested to determine if it is diagonal using DiagonalMatrixQ[m].
The determinant of a diagonal matrix given by is . This means that , so for , 2, ..., the first few values are 1, 2, 6, 24, 120, 720, 5040, 40320, ... (OEIS A000142).
Given a matrix equation of the form
(3)
|
multiply through to obtain
(4)
|
Since in general, for , this can be true only if off-diagonal components vanish. Therefore, must be diagonal.
Given a diagonal matrix , the matrix power can be computed simply by taking each element to the power in question,
(5)
| |||
(6)
|
Similarly, a matrix exponential can be performed simply by exponentiating each of the diagonal elements,
(7)
|