Skip to content

Glossary: Linear Algebra for ML

Diagonal

Also written: np.diag

The entries from top left to bottom right of a square matrix. `np.diag(s)` builds a matrix with `s` along it and zeros elsewhere.

Where the book teaches it

Related terms

Identity matrix