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.
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
- Gram-Schmidt process
- Hadamard product
- Homogeneous coordinates
- Hyperplane
- Identity matrix
- Ill-conditioned matrix
- Infinity norm
- Inner product
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.