In linear algebra, the Gram matrix (Gramian matrix or Gramian) of a set of vectors in an inner product space is the Hermitian matrix of inner products, whose entries are given by .
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.
For finite-dimensional real vectors with the usual Euclidean dot product, the Gram matrix is simply (or for complex vectors using the conjugate transpose), where V is a matrix whose columns are the vectors .