In linear algebra, the Gram matrix (or Gramian matrix, Gramian) of a set of vectors in an inner product space is the Hermitian matrix of inner products, whose entries are given by the inner product . If the vectors are the columns of matrix then the Gram matrix is in the general case that the vector coordinates are complex numbers, which simplifies to for the case that the vector coordinates are real numbers. An important application is to compute linear independence: a set of vectors are 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 in with the usual Euclidean dot product, the Gram matrix is , where is a matrix whose columns are the vectors and is its transpose whose rows are the vectors . For complex vectors in , , where is the conjugate transpose of . Given square-integrable functions on the interval , the Gram matrix is: where is the complex conjugate of . For any bilinear form on a finite-dimensional vector space over any field we can define a Gram matrix attached to a set of vectors by . The matrix will be symmetric if the bilinear form is symmetric. Applications In Riemannian geometry, given an embedded -dimensional Riemannian manifold and a parametrization for the volume form on induced by the embedding may be computed using the Gramian of the coordinate tangent vectors: This generalizes the classical surface integral of a parametrized surface for : If the vectors are centered random variables, the Gramian is approximately proportional to the covariance matrix, with the scaling determined by the number of elements in the vector. In quantum chemistry, the Gram matrix of a set of basis vectors is the overlap matrix. In control theory (or more generally systems theory), the controllability Gramian and observability Gramian determine properties of a linear system. Gramian matrices arise in covariance structure model fitting (see e.g., Jamshidian and Bentler, 1993, Applied Psychological Measurement, Volume 18, pp. 79–94). In the finite element method, the Gram matrix arises from approximating a function from a finite dimensional space; the Gram matrix entries are then the inner products of the basis functions of the finite dimensional subspace. In machine learning, kernel functions are often represented as Gram matrices. (Also see kernel PCA) Since the Gram matrix over