AI engineering glossary · Linear algebra

What is gram matrix?

Gram matrix (also called Kernel matrix): The matrix of all pairwise dot products among a set of vectors, entry (i, j) being vector i dotted with vector j. It is symmetric and positive semi-definite, and kernel methods use it to hold all similarities between training examples.

Level: advancedTopic: Linear algebra

Gram matrix: an example

For three vectors, the Gram matrix is 3 x 3; its diagonal holds each vector's squared length.

Related terms

More Linear algebra terms

Where you learn it

Gram 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.