How do you prove that the Gaussian kernel k(x,z)=exp⁡(−γ∥x−z∥2) is a valid (positive semi-definite) kernel, using only the linear kernel and closure rules?

Supervised learning, Kernel validity
Level L5 Expert. Length Long. Nature Mat Mathematical.

What's being asked

Whether you can prove kernel closure under sums, products and limits, and build the RBF kernel from them.

Key idea

A kernel is valid if every Gram matrix K is symmetric positive semi-definite (PSD). PSD kernels are closed under non-negative sums, products (Schur product theorem), and limits, so exp⁡(kernel) is valid. Then factor the RBF kernel into such terms.

Steps

  1. Linear kernel: c⊤Kc=∑ijcicjxi⊤xj=∥∑icixi∥2≥0, so it is PSD.
  2. Sums and positive multiples of PSD matrices are PSD, as is f(x)f(z) for any function f (a rank-one matrix ff⊤).
  3. Products (Schur): let K,L be PSD. Write L=∑mλmumum⊤ with λm≥0. Then K∘L=∑mλm diag⁡(um) K diag⁡(um). Each term is a congruence of K, so it is PSD, and a non-negative sum is PSD.
  4. Powers and polynomials: km is a product of m kernels, so it is valid. Then exp⁡(k)=∑m≥0km/m! is a limit of non-negative sums of valid kernels, and a limit of PSD matrices is PSD.
  5. Factor the Gaussian: ∥x−z∥2=∥x∥2+∥z∥2−2x⊤z, so k(x,z)=e−γ∥x∥2 e−γ∥z∥2 e2γx⊤z.
  6. The first two factors form a kernel f(x)f(z). The last is exp⁡ of a scaled linear kernel, valid by step 4. Their product is valid by the Schur step, so the RBF kernel is valid.
  7. Consequence: the RBF kernel has an infinite-dimensional feature map, namely the series expansion of e2γx⊤z.

Common mistakes

How long your answer should be

One page; 8–10 minutes.

Last checked on 4 December 2026.

Read this

Previous in Supervised learning: Prove the Gauss–Markov theorem: under y=Xβ+ε with E[ε]=0, Cov⁡(ε)=σ2I and X of full column rank, the OLS estimator has the smallest covariance matrix among all linear unbiased estimators. Why does this not rule out ridge regression doing better in MSE?
Next in Supervised learning: How do you prove that the training error of AdaBoost is at most ∏t2εt(1−εt)≤exp⁡(−2∑tγt2), where γt=12−εt? For γt≥0.1 and n=1000 training points, after how many rounds is the training error zero?