Positive Definite Matrices

Volume I, Chapter 1 — Part V. Equivalent characterizations of positive definite and semidefinite matrices, Cholesky decomposition, convexity via the Hessian, covariance geometry, Schur complements, and regularization theory.

Intermediate

Table of Contents

  1. Learning Objectives
  2. Prerequisites
  3. Notation
  4. Core Intuition
  5. Definitions and Quadratic Forms
  6. Equivalent Characterizations
  7. The Cholesky Decomposition
  8. The PSD Cone and Partial Order
  9. Connection to Convexity
  10. Covariance Matrices and Uncertainty
  11. Kernel Matrices and Mercer's Theorem
  12. Regularization and Ridge Regression
  13. The Schur Complement
  14. Common Pitfalls and Misconceptions
  15. Research Perspective
  16. Summary of Takeaways
  17. Exercises

Learning Objectives

After reading this chapter, you should be able to:

  1. Define positive definite (PD) and positive semidefinite (PSD) matrices via quadratic forms.
  2. Prove equivalence of the five standard characterizations (quadratic form, eigenvalues, Sylvester, Cholesky, inverse).
  3. Derive the Cholesky decomposition constructively and explain its role in Gaussian sampling.
  4. Connect PSD Hessians to convexity of twice-differentiable functions.
  5. Prove that covariance and kernel Gram matrices are PSD.
  6. Apply the Schur complement to conditional covariances and block matrix inversion.

Prerequisites


Notation

  • A0\mathbf{A} \succ 0 — Symmetric positive definite matrix
  • A0\mathbf{A} \succeq 0 — Symmetric positive semidefinite
  • λmin(A),λmax(A)\lambda_{\min}(\mathbf{A}), \lambda_{\max}(\mathbf{A}) — Extreme eigenvalues
  • κ(A)\kappa(\mathbf{A}) — Condition number λmax/λmin\lambda_{\max}/\lambda_{\min}
  • xTAx\mathbf{x}^T \mathbf{A} \mathbf{x} — Quadratic form

Core Intuition

A symmetric matrix A\mathbf{A} defines a quadratic form q(x)=xTAxq(\mathbf{x}) = \mathbf{x}^T \mathbf{A}\mathbf{x} — a generalization of the squared norm x2=xTIx\|\mathbf{x}\|^2 = \mathbf{x}^T \mathbf{I}\mathbf{x}. When A0\mathbf{A} \succ 0 (positive definite), this form behaves like a true "squared length" in a curved geometry: it is always positive except at the origin, defines ellipsoidal level sets, and supports taking square roots (Cholesky).

PSD matrices appear wherever we need valid geometries for uncertainty (covariance), convex optimization landscapes (Hessians), or valid similarity measures (kernels). Adding λI\lambda \mathbf{I} to a PSD matrix makes it PD — the mathematical basis for Ridge regularization.

Series context. This completes Chapter 1 (Linear Algebra) of Volume I. Next: Gradient Descent in Chapter 2 (Calculus & Optimization).

Interactive: Positive Definite Matrices

✓ Positive Definite (all eigenvalues > 0)

λ₁

2.309

λ₂

1.191

det

2.750

Symmetric matrix [a, b; b, d]:

Observe: PD matrices have elliptical level sets of x^TAx = c. The ellipse axes align with eigenvectors (dashed yellow). Make b large to see the ellipse tilt. If a eigenvalue goes negative, level sets become hyperbolas — the matrix is indefinite.

Definitions and Quadratic Forms

Definition 1 (Quadratic Form). For symmetric ARn×n\mathbf{A} \in \mathbb{R}^{n \times n}, the function q:RnRq: \mathbb{R}^n \to \mathbb{R} given by

q(x)=xTAx=i,jAijxixj(1)q(\mathbf{x}) = \mathbf{x}^T \mathbf{A}\mathbf{x} = \sum_{i,j} A_{ij} x_i x_j \tag{1}

is a quadratic form.

Definition 2 (Positive Definite). A\mathbf{A} is positive definite, written A0\mathbf{A} \succ 0, if

xTAx>0x0.(2)\mathbf{x}^T \mathbf{A}\mathbf{x} > 0 \quad \forall\, \mathbf{x} \neq \mathbf{0}. \tag{2}

Definition 3 (Positive Semidefinite). A\mathbf{A} is positive semidefinite, written A0\mathbf{A} \succeq 0, if

xTAx0x.(3)\mathbf{x}^T \mathbf{A}\mathbf{x} \geq 0 \quad \forall\, \mathbf{x}. \tag{3}

Definition 4 (Negative Definite / Indefinite). A0\mathbf{A} \prec 0 if A0-\mathbf{A} \succ 0. A\mathbf{A} is indefinite if it is neither PSD nor NSD — i.e., it has both positive and negative eigenvalues.

Example 1. In0\mathbf{I}_n \succ 0 since xTIx=x2>0\mathbf{x}^T \mathbf{I}\mathbf{x} = \|\mathbf{x}\|^2 > 0 for x0\mathbf{x} \neq \mathbf{0}.

Example 2. A=[1111]\mathbf{A} = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix} is PSD but not PD: xTAx=(x1+x2)20\mathbf{x}^T \mathbf{A}\mathbf{x} = (x_1 + x_2)^2 \geq 0, with equality for x=(1,1)T\mathbf{x} = (1, -1)^T.


Equivalent Characterizations

Theorem 1. For symmetric ARn×n\mathbf{A} \in \mathbb{R}^{n \times n}, the following are equivalent:

  1. A0\mathbf{A} \succ 0
  2. All eigenvalues satisfy λi>0\lambda_i > 0
  3. All leading principal minors are positive (Sylvester's criterion)
  4. There exists invertible lower triangular L\mathbf{L} with A=LLT\mathbf{A} = \mathbf{L}\mathbf{L}^T (Cholesky)
  5. A\mathbf{A} is invertible and A10\mathbf{A}^{-1} \succ 0

Proof of (1) \Leftrightarrow (2). By the spectral theorem, A=QΛQT\mathbf{A} = \mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^T with Q\mathbf{Q} orthogonal. Let y=QTx\mathbf{y} = \mathbf{Q}^T\mathbf{x}:

xTAx=yTΛy=i=1nλiyi2.(4)\mathbf{x}^T \mathbf{A}\mathbf{x} = \mathbf{y}^T \boldsymbol{\Lambda}\mathbf{y} = \sum_{i=1}^{n} \lambda_i y_i^2. \tag{4}

This is positive for all y0\mathbf{y} \neq \mathbf{0} iff all λi>0\lambda_i > 0. \blacksquare

Proof of (2) \Rightarrow (4). Constructive Cholesky (Section below) produces L\mathbf{L} with positive diagonal when all leading minors are positive. \blacksquare

Proof of (4) \Rightarrow (1). If A=LLT\mathbf{A} = \mathbf{L}\mathbf{L}^T with L\mathbf{L} invertible, then for x0\mathbf{x} \neq \mathbf{0}: xTAx=LTx2>0\mathbf{x}^T\mathbf{A}\mathbf{x} = \|\mathbf{L}^T\mathbf{x}\|^2 > 0. \blacksquare

Proof of (1) \Leftrightarrow (5). If A0\mathbf{A} \succ 0, eigenvalues of A1\mathbf{A}^{-1} are 1/λi>01/\lambda_i > 0, so A10\mathbf{A}^{-1} \succ 0. Conversely, if A10\mathbf{A}^{-1} \succ 0, then A=(A1)10\mathbf{A} = (\mathbf{A}^{-1})^{-1} \succ 0. \blacksquare

Important equation. Equation (4) diagonalizes the quadratic form in the eigenbasis. Level sets {x:xTAx=c}\{\mathbf{x} : \mathbf{x}^T\mathbf{A}\mathbf{x} = c\} are ellipsoids with axis lengths 1/λi1/\sqrt{\lambda_i}.

Theorem 2 (PSD characterizations). For symmetric A\mathbf{A}, the following are equivalent:

  1. A0\mathbf{A} \succeq 0
  2. All eigenvalues satisfy λi0\lambda_i \geq 0
  3. A=BTB\mathbf{A} = \mathbf{B}^T\mathbf{B} for some B\mathbf{B} (existence of square root)

The Cholesky Decomposition

Theorem 3 (Cholesky). Every PD matrix ARn×n\mathbf{A} \in \mathbb{R}^{n \times n} admits a unique factorization A=LLT\mathbf{A} = \mathbf{L}\mathbf{L}^T where L\mathbf{L} is lower triangular with positive diagonal entries.

Constructive algorithm (2×2 case). Let A=[abbc]\mathbf{A} = \begin{bmatrix} a & b \\ b & c \end{bmatrix} with a>0a > 0 and acb2>0ac - b^2 > 0. Seek L=[l110l21l22]\mathbf{L} = \begin{bmatrix} l_{11} & 0 \\ l_{21} & l_{22} \end{bmatrix}:

LLT=[l112l11l21l11l21l212+l222].(5)\mathbf{L}\mathbf{L}^T = \begin{bmatrix} l_{11}^2 & l_{11}l_{21} \\ l_{11}l_{21} & l_{21}^2 + l_{22}^2 \end{bmatrix}. \tag{5}

Matching entries:

l11=a,l21=ba,l22=cb2a=acb2a>0.(6)l_{11} = \sqrt{a}, \quad l_{21} = \frac{b}{\sqrt{a}}, \quad l_{22} = \sqrt{c - \frac{b^2}{a}} = \sqrt{\frac{ac - b^2}{a}} > 0. \tag{6}

Positivity of l22l_{22} requires ac>b2ac > b^2 — the PD condition via Sylvester.

General algorithm. For i=1,,ni = 1, \ldots, n:

Lii=Aiik=1i1Lik2,Lij=1Ljj(Aijk=1j1LikLjk),  j<i.(7)L_{ii} = \sqrt{A_{ii} - \sum_{k=1}^{i-1} L_{ik}^2}, \quad L_{ij} = \frac{1}{L_{jj}}\left(A_{ij} - \sum_{k=1}^{j-1} L_{ik}L_{jk}\right), \; j < i. \tag{7}

Complexity. O(n3/3)O(n^3/3) — half the cost of general LU or inversion.

Application: Gaussian sampling. If ϵN(0,I)\boldsymbol{\epsilon} \sim \mathcal{N}(\mathbf{0}, \mathbf{I}), then x=μ+LϵN(μ,LLT)\mathbf{x} = \boldsymbol{\mu} + \mathbf{L}\boldsymbol{\epsilon} \sim \mathcal{N}(\boldsymbol{\mu}, \mathbf{L}\mathbf{L}^T). This reparameterization enables gradient-based learning of covariance structure in variational inference.


The PSD Cone and Partial Order

Definition 5. The set S+n={ARn×n:A=AT,A0}\mathbb{S}^n_+ = \{\mathbf{A} \in \mathbb{R}^{n \times n} : \mathbf{A} = \mathbf{A}^T, \mathbf{A} \succeq 0\} is a convex cone.

Proposition 1. If A0\mathbf{A} \succeq 0 and B0\mathbf{B} \succeq 0, then for any α,β0\alpha, \beta \geq 0:

αA+βB0.(8)\alpha \mathbf{A} + \beta \mathbf{B} \succeq 0. \tag{8}

Proof. xT(αA+βB)x=αxTAx+βxTBx0\mathbf{x}^T(\alpha\mathbf{A} + \beta\mathbf{B})\mathbf{x} = \alpha\mathbf{x}^T\mathbf{A}\mathbf{x} + \beta\mathbf{x}^T\mathbf{B}\mathbf{x} \geq 0. \blacksquare

We write AB\mathbf{A} \succeq \mathbf{B} iff AB0\mathbf{A} - \mathbf{B} \succeq 0. This defines a partial order on symmetric matrices (Loewner order).

Proposition 2. If A0\mathbf{A} \succeq 0 and λ>0\lambda > 0, then A+λI0\mathbf{A} + \lambda \mathbf{I} \succ 0.

This is the mathematical basis for regularization: perturbing a PSD matrix by a positive multiple of the identity makes it PD.


Connection to Convexity

Theorem 4 (Second-order convexity condition). A twice-differentiable function f:RnRf: \mathbb{R}^n \to \mathbb{R} is convex if and only if

2f(x)0x.(9)\nabla^2 f(\mathbf{x}) \succeq 0 \quad \forall\, \mathbf{x}. \tag{9}

Proof (\Rightarrow). Convexity implies f(y)f(x)+f(x)T(yx)f(\mathbf{y}) \geq f(\mathbf{x}) + \nabla f(\mathbf{x})^T(\mathbf{y} - \mathbf{x}). Applying to y=x+tv\mathbf{y} = \mathbf{x} + t\mathbf{v} and taking the second derivative at t=0t = 0 gives vT2f(x)v0\mathbf{v}^T \nabla^2 f(\mathbf{x}) \mathbf{v} \geq 0.

Proof (\Leftarrow). Taylor's theorem: for some z\mathbf{z} on the segment between x\mathbf{x} and y\mathbf{y},

f(y)=f(x)+f(x)T(yx)+12(yx)T2f(z)(yx).(10)f(\mathbf{y}) = f(\mathbf{x}) + \nabla f(\mathbf{x})^T(\mathbf{y}-\mathbf{x}) + \frac{1}{2}(\mathbf{y}-\mathbf{x})^T \nabla^2 f(\mathbf{z})(\mathbf{y}-\mathbf{x}). \tag{10}

If 2f0\nabla^2 f \succeq 0, the quadratic term is nonnegative, giving first-order convexity. \blacksquare

Corollary 4. At a local minimum x\mathbf{x}^*, 2f(x)0\nabla^2 f(\mathbf{x}^*) \succeq 0. If 2f(x)0\nabla^2 f(\mathbf{x}^*) \succ 0, the minimum is strict.

ML interpretation. Hessian eigenvalues are curvatures. Negative eigenvalues indicate saddle points. The condition number of the Hessian at a minimum governs local optimization difficulty — connecting to Eigenvalues & Eigenvectors and Gradient Descent.


Covariance Matrices and Uncertainty

Definition 6 (Covariance). For random vector x\mathbf{x} with mean μ\boldsymbol{\mu}:

Σ=E[(xμ)(xμ)T].(11)\boldsymbol{\Sigma} = \mathbb{E}[(\mathbf{x} - \boldsymbol{\mu})(\mathbf{x} - \boldsymbol{\mu})^T]. \tag{11}

Theorem 5. Every covariance matrix is PSD.

Proof. For any vRn\mathbf{v} \in \mathbb{R}^n:

vTΣv=E[(vT(xμ))2]0.(12)\mathbf{v}^T \boldsymbol{\Sigma}\mathbf{v} = \mathbb{E}[(\mathbf{v}^T(\mathbf{x}-\boldsymbol{\mu}))^2] \geq 0. \quad \blacksquare \tag{12}

Interpretation. Σ\boldsymbol{\Sigma} is PSD but may be singular. rank(Σ)=r<n\text{rank}(\boldsymbol{\Sigma}) = r < n means the random vector lies in an rr-dimensional affine subspace — there are nrn - r directions of zero variance.

Sample covariance. For data x1,,xN\mathbf{x}_1, \ldots, \mathbf{x}_N:

Σ^=1N1i=1N(xixˉ)(xixˉ)T=1N1XTX(13)\hat{\boldsymbol{\Sigma}} = \frac{1}{N-1}\sum_{i=1}^{N}(\mathbf{x}_i - \bar{\mathbf{x}})(\mathbf{x}_i - \bar{\mathbf{x}})^T = \frac{1}{N-1}\mathbf{X}^T\mathbf{X} \tag{13}

(centered X\mathbf{X}). This is PSD by construction (Σ^=BTB\hat{\boldsymbol{\Sigma}} = \mathbf{B}^T\mathbf{B} with B=X/N1\mathbf{B} = \mathbf{X}/\sqrt{N-1}).

Multivariate Gaussian. xN(μ,Σ)\mathbf{x} \sim \mathcal{N}(\boldsymbol{\mu}, \boldsymbol{\Sigma}) requires Σ0\boldsymbol{\Sigma} \succ 0 for a valid density:

p(x)=1(2π)n/2Σ1/2exp(12(xμ)TΣ1(xμ)).(14)p(\mathbf{x}) = \frac{1}{(2\pi)^{n/2}|\boldsymbol{\Sigma}|^{1/2}}\exp\left(-\frac{1}{2}(\mathbf{x}-\boldsymbol{\mu})^T\boldsymbol{\Sigma}^{-1}(\mathbf{x}-\boldsymbol{\mu})\right). \tag{14}

The quadratic form in the exponent uses Σ10\boldsymbol{\Sigma}^{-1} \succ 0 when Σ0\boldsymbol{\Sigma} \succ 0.


Kernel Matrices and Mercer's Theorem

Definition 7 (Kernel). A function K:X×XRK: \mathcal{X} \times \mathcal{X} \to \mathbb{R} is a valid kernel if for any finite set {x1,,xN}\{x_1, \ldots, x_N\}, the Gram matrix Kij=K(xi,xj)K_{ij} = K(x_i, x_j) is PSD.

Theorem 6 (Mercer's Theorem — statement). A continuous symmetric kernel on a compact domain is valid if and only if it admits an expansion

K(x,x)=i=1λiϕi(x)ϕi(x),λi0,(15)K(x, x') = \sum_{i=1}^{\infty} \lambda_i \phi_i(x) \phi_i(x'), \quad \lambda_i \geq 0, \tag{15}

where {ϕi}\{\phi_i\} are orthonormal eigenfunctions.

Consequence. Valid kernels define inner products in feature spaces (possibly infinite-dimensional). Kernel ridge regression, SVMs, and Gaussian processes all require PSD Gram matrices.

Example 3 (RBF kernel). K(x,x)=exp(γxx2)K(x, x') = \exp(-\gamma\|x - x'\|^2) is PSD for all γ>0\gamma > 0.


Regularization and Ridge Regression

Problem. Least squares with XTX\mathbf{X}^T\mathbf{X} singular or ill-conditioned.

Ridge solution:

w^Ridge=(XTX+λI)1XTy.(16)\hat{\mathbf{w}}_{\text{Ridge}} = (\mathbf{X}^T\mathbf{X} + \lambda \mathbf{I})^{-1}\mathbf{X}^T\mathbf{y}. \tag{16}

Theorem 7. If XTX0\mathbf{X}^T\mathbf{X} \succeq 0 and λ>0\lambda > 0, then XTX+λI0\mathbf{X}^T\mathbf{X} + \lambda\mathbf{I} \succ 0.

Proof. For v0\mathbf{v} \neq \mathbf{0}: vT(XTX+λI)v=vTXTXv+λv2λv2>0\mathbf{v}^T(\mathbf{X}^T\mathbf{X} + \lambda\mathbf{I})\mathbf{v} = \mathbf{v}^T\mathbf{X}^T\mathbf{X}\mathbf{v} + \lambda\|\mathbf{v}\|^2 \geq \lambda\|\mathbf{v}\|^2 > 0. \blacksquare

Bayesian interpretation. Ridge regression corresponds to MAP estimation with Gaussian prior wN(0,σp2I)\mathbf{w} \sim \mathcal{N}(\mathbf{0}, \sigma_p^2 \mathbf{I}), developed in Bayesian Linear Regression.

Effect on spectrum. If XTX\mathbf{X}^T\mathbf{X} has eigenvalues μi\mu_i, then the regularized matrix has eigenvalues μi+λ\mu_i + \lambda, improving condition number from μmax/μmin\mu_{\max}/\mu_{\min} to (μmax+λ)/(μmin+λ)(\mu_{\max}+\lambda)/(\mu_{\min}+\lambda).


The Schur Complement

Definition 8. For block matrix

M=[ABBTC],(17)\mathbf{M} = \begin{bmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{B}^T & \mathbf{C} \end{bmatrix}, \tag{17}

the Schur complement of block C\mathbf{C} is

M/C=ABC1BT.(18)\mathbf{M}/\mathbf{C} = \mathbf{A} - \mathbf{B}\mathbf{C}^{-1}\mathbf{B}^T. \tag{18}

Theorem 8. If C0\mathbf{C} \succ 0, then M0\mathbf{M} \succ 0 if and only if M/C0\mathbf{M}/\mathbf{C} \succ 0.

Application: Conditional covariance. For joint Gaussian [xaxb]N(μ,Σ)\begin{bmatrix} \mathbf{x}_a \\ \mathbf{x}_b \end{bmatrix} \sim \mathcal{N}(\boldsymbol{\mu}, \boldsymbol{\Sigma}) with

Σ=[ΣaaΣabΣbaΣbb],(19)\boldsymbol{\Sigma} = \begin{bmatrix} \boldsymbol{\Sigma}_{aa} & \boldsymbol{\Sigma}_{ab} \\ \boldsymbol{\Sigma}_{ba} & \boldsymbol{\Sigma}_{bb} \end{bmatrix}, \tag{19}

the conditional distribution xaxb\mathbf{x}_a | \mathbf{x}_b has covariance

Σab=ΣaaΣabΣbb1Σba=Σ/Σbb.(20)\boldsymbol{\Sigma}_{a|b} = \boldsymbol{\Sigma}_{aa} - \boldsymbol{\Sigma}_{ab}\boldsymbol{\Sigma}_{bb}^{-1}\boldsymbol{\Sigma}_{ba} = \boldsymbol{\Sigma}/\boldsymbol{\Sigma}_{bb}. \tag{20}

Theorem 9. ΣabΣaa\boldsymbol{\Sigma}_{a|b} \preceq \boldsymbol{\Sigma}_{aa} (conditioning reduces or preserves uncertainty).

Proof. By Theorem 8 applied to PSD Σ\boldsymbol{\Sigma}, the Schur complement is PSD. \blacksquare

The Schur complement also appears in the Woodbury matrix identity and Gaussian process predictive variance.


Common Pitfalls and Misconceptions

Pitfall 1: Checking only diagonal entries for PD. All diagonal entries positive is necessary but not sufficient (except for diagonal matrices). Use eigenvalues or Cholesky.

Pitfall 2: Confusing PSD with PD. Covariance matrices are often singular (PSD but not PD) when data lies in a lower-dimensional subspace.

Pitfall 3: Assuming Hessian PD at all critical points. Saddle points have indefinite Hessians (both positive and negative eigenvalues).

Pitfall 4: Using Cholesky on near-singular matrices. When A\mathbf{A} is nearly PSD, Cholesky may fail numerically. Add jitter: A+ϵI\mathbf{A} + \epsilon \mathbf{I}.

Pitfall 5: Treating kernel PD as optional. An invalid (non-PSD) Gram matrix breaks the interpretation as an inner product and can cause negative "variances" in GP predictions.


Research Perspective

The study of quadratic forms and definiteness connects to Hilbert's work on invariant theory and the development of convex analysis in the twentieth century. Loewner (1934) introduced the matrix partial order \succeq.

In machine learning, PD matrices underpin:

  • Gaussian processes (Rasmussen & Williams, 2006): kernel matrices must be PSD
  • Natural gradient (Amari, 1998): uses the Fisher information matrix (PSD)
  • Second-order optimization (Newton, L-BFGS): requires or approximates PD curvature
  • Diffusion models (Volume III): noise covariances and score matching Hessians

Recent work on sharpness and flat minima analyzes the Hessian spectrum at solutions, connecting PD geometry to generalization.


Summary of Takeaways

  • Quadratic formxTAx\mathbf{x}^T\mathbf{A}\mathbf{x}A0\mathbf{A} \succ 0 — Valid norm geometry
  • Spectrum — Eigenvalues λi\lambda_iλi>0\lambda_i > 0 — Ellipsoid axis lengths
  • CholeskyA=LLT\mathbf{A} = \mathbf{L}\mathbf{L}^TL\mathbf{L} invertible — Sampling, solving
  • Convexity — Hessian 2f\nabla^2 f0\succeq 0 — Global/local min structure
  • Statistics — Covariance Σ\boldsymbol{\Sigma}0\succeq 0 — Valid uncertainty
  • RegularizationXTX+λI\mathbf{X}^T\mathbf{X} + \lambda\mathbf{I}0\succ 0 — Invertibility
  • Kernels — Gram matrix K\mathbf{K}0\succeq 0 — Valid similarity
  • Conditioning — Schur complement — \preceq block — Reduced uncertainty

Next article: Gradient Descent → — Chapter 2: optimization from first-order Taylor expansions.


Exercises

Exercise 1. Determine whether A=[2335]\mathbf{A} = \begin{bmatrix} 2 & 3 \\ 3 & 5 \end{bmatrix} is PD using (a) eigenvalues, (b) Sylvester's criterion, (c) Cholesky.

Exercise 2. Prove that if A0\mathbf{A} \succ 0, then logdet(A)>\log\det(\mathbf{A}) > -\infty and det(A)>0\det(\mathbf{A}) > 0.

Exercise 3. Show that the function f(x)=12xTAxbTxf(\mathbf{x}) = \frac{1}{2}\mathbf{x}^T\mathbf{A}\mathbf{x} - \mathbf{b}^T\mathbf{x} with A0\mathbf{A} \succ 0 is strictly convex and find its unique minimizer.

Exercise 4 (Covariance). For x=(X1,X2)T\mathbf{x} = (X_1, X_2)^T with X2=X1+ϵX_2 = X_1 + \epsilon, ϵX1\epsilon \perp X_1, compute Σ\boldsymbol{\Sigma} and show det(Σ)=0\det(\boldsymbol{\Sigma}) = 0.

Exercise 5 (Ridge). If XTX\mathbf{X}^T\mathbf{X} has eigenvalues (100,10,0.1)(100, 10, 0.1), compute eigenvalues of XTX+λI\mathbf{X}^T\mathbf{X} + \lambda\mathbf{I} for λ=1\lambda = 1 and compare condition numbers.

Exercise 6 (Schur complement). For Σ\boldsymbol{\Sigma} as in (19) with invertible Σbb\boldsymbol{\Sigma}_{bb}, derive (20) by completing the square in the joint Gaussian density.

Exercise 7 (Conceptual). Explain why the reparameterization x=μ+Lϵ\mathbf{x} = \boldsymbol{\mu} + \mathbf{L}\boldsymbol{\epsilon} with ϵN(0,I)\boldsymbol{\epsilon} \sim \mathcal{N}(\mathbf{0}, \mathbf{I}) requires LLT=Σ\mathbf{L}\mathbf{L}^T = \boldsymbol{\Sigma} to be PD, not merely PSD, for a proper density over all of Rn\mathbb{R}^n.


Appendix: The Matrix Square Root

Definition 9 (Matrix Square Root). For PSD A0\mathbf{A} \succeq 0, the unique PSD matrix A1/2\mathbf{A}^{1/2} satisfying (A1/2)2=A(\mathbf{A}^{1/2})^2 = \mathbf{A} is given by the spectral theorem:

A1/2=Qdiag(λ1,,λn)QT.(A.1)\mathbf{A}^{1/2} = \mathbf{Q}\,\text{diag}(\sqrt{\lambda_1}, \ldots, \sqrt{\lambda_n})\,\mathbf{Q}^T. \tag{A.1}

Theorem 10. If A=BTB\mathbf{A} = \mathbf{B}^T\mathbf{B}, then A1/2\mathbf{A}^{1/2} exists and can be computed via SVD of B\mathbf{B}.

Proof. From B=UΣVT\mathbf{B} = \mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^T, we have A=VΣ2VT\mathbf{A} = \mathbf{V}\boldsymbol{\Sigma}^2\mathbf{V}^T, so A1/2=VΣVT\mathbf{A}^{1/2} = \mathbf{V}\boldsymbol{\Sigma}\mathbf{V}^T. \blacksquare

Application: Whitening. Given data with covariance Σ\boldsymbol{\Sigma}, the transformation z=Σ1/2(xμ)\mathbf{z} = \boldsymbol{\Sigma}^{-1/2}(\mathbf{x} - \boldsymbol{\mu}) produces unit-variance, uncorrelated coordinates. Whitening is a standard preprocessing step before algorithms sensitive to scale (e.g., k-means, some clustering methods).

Application: Distance in Mahalanobis metric. The quadratic form (xμ)TΣ1(xμ)(\mathbf{x}-\boldsymbol{\mu})^T\boldsymbol{\Sigma}^{-1}(\mathbf{x}-\boldsymbol{\mu}) defines a distance that accounts for correlation structure — equivalent to Euclidean distance after whitening.