AI engineering glossary · Linear algebra

What is diagonal matrix?

Diagonal matrix: A square matrix whose only non-zero entries lie on the main diagonal. Multiplying by it simply scales each coordinate separately, so products, powers and inverses are cheap to compute.

Level: beginnerTopic: Linear algebra

Diagonal matrix: an example

diag(2, 3) turns [4, 5] into [8, 15].

Related terms

More Linear algebra terms

Where you learn it

Diagonal matrix is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.