Why are covariance and Gram matrices positive-semi-definite?

Quick Overview

Asks why covariance matrices and Gram matrices are always positive-semi-definite and when they become strictly positive definite. It tests quadratic forms, the link to variance and eigenvalues, rank deficiency, and what happens when an estimated matrix loses the property.

Why are covariance and Gram matrices positive-semi-definite?

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

Why are covariance and Gram matrices positive-semi-definite? A symmetric matrix $A$ is positive-semi-definite (PSD) when $v^\top A v \ge 0$ for every vector $v$. Explain why both matrices always satisfy this, and when they are strictly positive definite. ```hint Expand the quadratic form Write $v^\top G v$ for a Gram matrix and try to group the product into something that is squared. ``` ```hint Think in terms of a projection For the covariance matrix, ask what $v^\top \Sigma v$ measures for the single random variable $v^\top x$. ``` ### What a Strong Answer Covers - Writing each matrix as a matrix times its own transpose and expanding the quadratic form - The variance argument for the covariance matrix - Symmetry, and the link between a nonnegative quadratic form and nonnegative eigenvalues - When the matrix is only semi-definite and when it is strictly positive definite - Practical consequences, such as PCA, Cholesky factorization or estimated matrices that fail the property ### Follow-up Questions - Why does a sample covariance matrix built from $n$ observations in $d$ dimensions become singular when $n \le d$? - A correlation matrix estimated with pairwise deletion of missing values has a negative eigenvalue. How can that happen, and how would you repair it? - Why must a valid kernel produce a PSD Gram matrix for every set of points? - What does a zero eigenvalue of a covariance matrix tell you about the data?

Overview: Asks why covariance matrices and Gram matrices are always positive-semi-definite and when they become strictly positive definite. It tests quadratic forms, the link to variance and eigenvalues, rank deficiency, and what happens when an estimated matrix loses the property.

General logo
General
Nov 25, 2026
mediumData ScientistOtherStatistics & Math
0
0

Why are covariance and Gram matrices positive-semi-definite?

A symmetric matrix AA is positive-semi-definite (PSD) when v⊤Av≥0v^\top A v \ge 0 for every vector vv. Explain why both matrices always satisfy this, and when they are strictly positive definite.

What a Strong Answer Covers Guidance

  • Writing each matrix as a matrix times its own transpose and expanding the quadratic form
  • The variance argument for the covariance matrix
  • Symmetry, and the link between a nonnegative quadratic form and nonnegative eigenvalues
  • When the matrix is only semi-definite and when it is strictly positive definite
  • Practical consequences, such as PCA, Cholesky factorization or estimated matrices that fail the property

Follow-up Questions Guidance

  • Why does a sample covariance matrix built from nn observations in dd dimensions become singular when n≤dn \le d ?
  • A correlation matrix estimated with pairwise deletion of missing values has a negative eigenvalue. How can that happen, and how would you repair it?
  • Why must a valid kernel produce a PSD Gram matrix for every set of points?
  • What does a zero eigenvalue of a covariance matrix tell you about the data?