Diagonal Matrix
Chapter 2: Matrix — Transpose ($A^\top$) & Diagonal Matrices (also appears in Ch. 5, Ch. 5)
From the book
Chapter 2: Matrix. In the chapter mind map this icon labels Transpose ($A^\top$) & Diagonal Matrices. The discussion below is excerpted and lightly edited from § Diagonal Matrices in Mathematics for AI and Machine Learning. Related material also appears in Chapter 5 (Trace & Cyclic Props), Chapter 5 (Determinants & Inverses via LU).
That is, all off-diagonal entries are zero; only $a_{00}, a_{11}, \ldots$ along the main diagonal can be nonzero. A square diagonal matrix ($M = N$) has the form:
Notation: We often write $\text{diag}(d_0, d_1, \ldots, d_{N-1})$ to denote a diagonal matrix with diagonal entries $d_0, d_1, \ldots, d_{N-1}$. Figure the referenced section shows a $4 \times 4$ example.
A diagonal matrix need not be square. A rectangular one has $\min(M, N)$ diagonal entries and zeros elsewhere, for example Figure the referenced section shows the square, tall and wide cases.
The matrix $\Sigma \in \mathbb{R}^{M \times N}$ of the singular value decomposition (Chapter the referenced section) is of this kind. The properties below are stated for square diagonal matrices.
What this drawing shows
What you see. Square matrix whose nonzero structure lies on the main diagonal, representing independent coordinate scaling.
In the mind map. Chapter 2 — Transpose () & Diagonal Matrices. See From the book above for definitions, figures, and worked examples.
Also appears in Ch. 5 (Trace & Cyclic Props); Ch. 5 (Determinants & Inverses via LU).
Where to read next
Read the full definitions, figures, and worked examples in Chapter 2: Matrix — see the mind-map node Transpose () & Diagonal Matrices.
This concept is also referenced in Chapter 5 (Trace & Cyclic Props); Chapter 5 (Determinants & Inverses via LU).