In linear algebra, the Gram matrix (Gramian matrix or Gramian) of a set of vectors
Contents
An important application is to compute linear independence: a set of vectors is linearly independent if and only if the Gram determinant (the determinant of the Gram matrix) is non-zero.
It is named after Jørgen Pedersen Gram.
Examples
For finite-dimensional real vectors with the usual Euclidean dot product, the Gram matrix is simply
Most commonly, the vectors are elements of a Euclidean space, or are functions in an L2 space, such as continuous functions on a compact interval [a, b] (which are a subspace of L 2([a, b])).
Given real-valued functions
For a general bilinear form B on a finite-dimensional vector space over any field we can define a Gram matrix G attached to a set of vectors
Applications
Positive semidefinite
The Gramian matrix is positive semidefinite, and every positive symmetric semidefinite matrix is the Gramian matrix for some set of vectors. Further, in finite-dimensions it determines the vectors up to isomorphism, i.e. any two sets of vectors with the same Gramian matrix must be related by a single unitary matrix. These facts follow from taking the spectral decomposition of any positive semidefinite matrix P, so that
Change of basis
Under change of basis represented by an invertible matrix P, the Gram matrix will change by a matrix congruence to
Gram determinant
The Gram determinant or Gramian is the determinant of the Gram matrix:
Geometrically, the Gram determinant is the square of the volume of the parallelotope formed by the vectors. In particular, the vectors are linearly independent if and only if the Gram determinant is nonzero (if and only if the Gram matrix is nonsingular).
The Gram determinant can also be expressed in terms of the exterior product of vectors by