Suppose a feature map represented the Gaussian kernel. Choose , a unit vector , and points for . Their kernel matrix is
For sufficiently large , hence sufficiently small , every row satisfies
Thus is a symmetric strictly diagonally dominant matrix with positive diagonal and is therefore a positive-definite matrix, so .
On the other hand, if is the matrix whose th row is , then and , a contradiction. Hence every feature-space realization of the Gaussian kernel requires an infinite-dimensional vector space.
Put
The numerator is the linear kernel, while the reciprocal of the denominator is the kernel from part c applied to and . The product of positive-semidefinite kernels therefore shows that is a positive-semidefinite kernel. The Cauchy-Schwarz inequality and the arithmetic-geometric mean inequality give , so
Each power is positive semidefinite by the Schur product theorem, and the convergent sum is positive semidefinite.
Moreover . If is its canonical feature map, then
The feature-space norm gives symmetry and the triangle inequality. Finally, implies , hence and
which is equivalent to . Thus is a metric rather than merely a pseudometric.
Polynomial kernel 2026-10-14
For , a polynomial kernel is the positive-semidefinite kernel , where is a positive integer and . The case uses monomials of total degree ; also includes lower degrees. The feature map weights matter: listing each distinct monomial once with coefficient one generally gives a different inner product.[ref]
For the homogeneous quadratic case in two dimensions, take the scaled quadratic feature map
The inner product identity is explicit:
The factor accounts for the two equal cross terms in the square. Thus an inner product of three derived coordinates can be obtained from an inner product of the two input coordinates followed by squaring. The kernel trick uses this equality inside an algorithm; the feature map explains which nonlinear functions the algorithm can represent.
Positive-semidefinite kernel Created 2026-09-24 Updated 2026-11-05
A real positive-semidefinite kernel on a set is a symmetric function for which every finite choice and satisfies
Equivalently, each finite kernel matrix is a positive semidefinite matrix. This condition constrains whole collections of pairwise comparisons; individual entries need not be positive.
For example, the linear kernel on a Euclidean space satisfies the condition because
The Gaussian kernel supplies a nonlinear example. A feature map represents any such positive-semidefinite kernel as an inner product, possibly in an infinite-dimensional vector space. This lets a kernel method use the geometry of that space through pairwise evaluations.[ref]
Random Fourier features Created 2026-09-28 Updated 2026-11-05
Random Fourier features approximate a continuous translation-invariant positive-semidefinite kernel on with . Its spectral probability distribution gives frequencies satisfying .
Draw independent and identically distributed random variables from this distribution and independent from the continuous uniform distribution on . Define the feature map
Averaging the product of two cosines over leaves one half of , so . Every realized approximate kernel matrix is positive semidefinite because it is a Gram matrix. Increasing averages more sampled features; it does not make the finite approximation identically equal to the original positive-semidefinite kernel.[ref]
For a positive-semidefinite kernel with positive diagonal constant , normalize by and multiply by . The identically zero case needs no random features.
The squared-slack support vector machine uses constraints . With an unpenalized intercept, its Lagrangian dual problem maximizes subject to and . The square adds a diagonal penalty in the dual rather than a finite upper box constraint. The Karush-Kuhn-Tucker conditions give and for a feature map realizing the positive-semidefinite kernel .
Give the four corners of the square the exclusive or labels: when the input signs differ and when they agree. In the following order,
No affine function has the required strictly positive scores at and strictly negative scores at : both pairs have midpoint zero, so would have to be both positive and negative. This also rules out perfect classification by a single threshold with a consistent tie rule.
Under the polynomial kernel's quadratic feature map, the two classes become two distinct vectors:
The hyperplane separates them. With and , the score and classifier are
All four signed scores equal one. In the input plane the boundary is , the union of the coordinate axes; in the derived coordinates it is a single hyperplane. The feature map identifies opposite corners, which is harmless for these labels because opposite corners belong to the same class. A fixed feature map would not separate labels that disagree at identical mapped vectors.
Figure 1.
XOR labels in the input square and the quadratic feature slice
. The dashed diagonals join equal-label input pairs and share their midpoint, obstructing affine separation. In the feature panel all mapped points have third coordinate one; the two coincident pairs are separated by the horizontal hyperplane at second coordinate zero. Details.