For a finite family of vectors in an inner product space, its Gram matrix records all pairwise inner products:Its diagonal entries are the squared norms of the vectors, and its off-diagonal entries describe their pairwise alignment. For example, and in giveThe positive definiteness of a Gram matrix relates the resulting quadratic form to the squared norm of a linear combination. In particular, is a positive semidefinite matrix, and it is invertible exactly when the original vectors are linearly independent. This permits geometric questions about a family to be answered through one matrix.
Two finite families with the same Gram matrix are related by a linear isometry between their linear spans: send to the same linear combination of the second family. Equality of the Gram matrices preserves squared norms, so every zero combination maps to zero and the rule is well-defined. If the two ambient inner product spaces are finite-dimensional and have the same dimension, completing orthonormal bases extends this map to an ambient unitary map. Equality of the ambient dimensions is needed for that last extension.
For a complex -by- matrix , the products and are Gram products; the star denotes the conjugate transpose. For a real matrix, it reduces to the matrix transpose. If the columns of are , then is their Gram matrix under the standard complex inner product:Thus a rectangular matrix gives square Hermitian positive semidefinite matrices. The identityproves nonnegativity and gives . Similarly, . These are the kernel of a Gram product identities; combined with the rank-nullity theorem, they show that each Gram product has the same matrix rank as .
For example, gives , while . Both have matrix rank one despite their different sizes. The second is singular because the two columns of are linearly dependent.
For real vectors in a Euclidean space, their Gram matrix satisfiesThus is a positive semidefinite matrix. It is a positive-definite matrix exactly when the vectors are linearly independent: the squared norm vanishes precisely when the indicated linear combination vanishes.
For complex vectors, specify the convention. With the inner product conjugate-linear in its first argument, the same definition givesIf the inner product is instead linear in its first argument, this definition of gives . The positive definiteness criterion is unchanged, but the coefficient formula must respect the convention.
For , the Gram matrix of unit vectors with common distinct-pair inner product is . Its eigenvalues are on the all-ones direction and on its orthogonal complement. It is a positive-definite symmetric matrix exactly when , permitting a linearly independent realization in . An explicit construction takes the columns ofThe two orthogonal projections have product zero, so ; positive eigenvalues also make invertible. At either endpoint the corresponding eigenspace becomes a linear dependence.
The determinant of a Gram matrix is nonnegative and vanishes precisely when its vectors are linearly dependent. In Euclidean three-dimensional space, three column vectors form a square matrix , whose Gram matrix is . Its determinant is , the square of the scalar triple product and of the parallelepiped volume.
For a basis of a finite-dimensional inner product space with conjugate-linear first argument, define and . Then and . This is the inner-product representation of the dual basis; requiring the dual vectors to lie in the given span is essential.
For a matrix with independent standard normal entries, is a Gaussian empirical Gram matrix and has expectation equal to the identity. With mean known to be zero it is the raw empirical second moment. Subtracting a sample mean would give a different estimator. On any fixed unit vector its quadratic form is a chi-squared variable divided by .
For with independent standard Gaussian rows in dimension , combine a constant-radius sphere metric net, the quadratic form net bound, the chi-squared concentration inequality, and a union bound. This gives for a numerical . Taking larger than a constant times gives exponential decay in . The subspace is fixed, so no union over supports is needed.
If has entrywise maximum norm at most , every vector supported on at most coordinates satisfies . Thus the squared norm distortion is at most on all such sparse vectors. Use the quadratic inequality at , where a ratio would be undefined.