A Reproducing kernel Hilbert space is a Hilbert space of functions on a set in which evaluation at each fixed point is a continuous linear functional. The Riesz representation theorem therefore supplies an element such thatSetting defines its positive-semidefinite kernel. The reproducing property turns pointwise information into an inner product; the Cauchy-Schwarz inequality givesThus small changes in the norm control evaluation at each fixed point. In the linear kernel example , the functions form the corresponding finite-dimensional space with the ordinary coefficient inner product. The Moore-Aronszajn theorem extends the correspondence to arbitrary positive-semidefinite kernels.[ref]
For positive-semidefinite kernels with Reproducing kernel Hilbert spaces , the Reproducing kernel Hilbert space of consists of sums , withThe minimum is attained uniquely. Indeed, in the Hilbert space direct sum , the tuples summing to zero form a closed subspace : they are the intersection, over inputs , of the kernels of the continuous maps . Every affine fibre has a unique representative in by orthogonal decomposition by a closed subspace. The vector lies in and represents evaluation in the quotient; its evaluation at is , identifying the positive-semidefinite kernel with .
For a real-valued loss function depending only on evaluations at , and a positive squared-norm penalty, any minimizing tuple in a sum of reproducing-kernel Hilbert spaces has the formwith the same coefficient vector for every component. The tuple must be the unique minimum-norm decomposition of its sum. Apply the representer theorem to that sum and note that the displayed tuple has total squared norm , exactly the norm of the sum. This argument is conditional on existence of a minimizer; arbitrary loss functions need not attain their infimum.
The reproducing property is ; it turns point evaluation into an inner product with a kernel section.
Let be a Reproducing kernel Hilbert space with positive-semidefinite kernel . Suppose an objective has the formwhere is strictly increasing. If a minimizer exists, every minimizer lies in the linear span of the sections :To prove this, decompose into its orthogonal projection onto that finite-dimensional linear span and its orthogonal remainder. The reproducing property gives , so removing the remainder preserves the data-dependent term. The Pythagorean theorem gives , so strict increase of excludes a nonzero remainder at a minimizer.
For merely nondecreasing , projecting an existing minimizer still gives a minimizer in the linear span, but other minimizers may remain outside it. The theorem is a finite-representation result; existence of a minimizer needs separate hypotheses.
A kernel method represents data through a positive-semidefinite kernel, allowing algorithms to use inner products in an implicit feature map.
Kernel ridge regression fits a function in a Reproducing kernel Hilbert space by minimizingThe first term rewards fit to the observations; the second penalizes the norm. The representer theorem gives . With kernel matrix , this becomesOne coefficient solution is , and the fitted observation vector is . The positive ridge makes this displayed inverse exist even when is singular; different coefficient vectors in the null space of represent the same fitted function.
For a single observation with and , the coefficient is and the prediction is . This exposes both shrinkage and how the positive-semidefinite kernel transfers information to a new point. The factor depends on the chosen normalization of the squared-error term.
Fix observation points and suppose , where the noise has zero expected value and covariance matrix . Use the unscaled objective with and . The kernel-ridge hat matrix is now . For ,This is prediction error at the fixed observation points, with separate squared-bias and variance terms.
For eigenvalues of the kernel matrix,The reproducing property and Bessel inequality represent with , including singular . HenceThe bound makes the opposing effects of the ridge explicit: it increases the displayed bias bound while reducing the variance bound.
Every positive-semidefinite kernel has a Hilbert-space feature map satisfying , and determines a unique reproducing-kernel Hilbert space.
The kernel trick evaluates inner products of feature map outputs through without explicitly constructing those vectors. An algorithm expressed entirely through these inner products can therefore operate on nonlinear derived coordinates using only evaluations of a positive-semidefinite kernel on the original inputs. A classifier linear in the derived coordinates can have a nonlinear boundary in the original coordinates.
The polynomial kernel gives a finite, fully visible example: corresponds to . The XOR separation by a product feature below makes the interaction coordinate useful, while dual prediction with a kernel shows how to predict without calculating it explicitly.
An arbitrary score called a similarity need not be a positive-semidefinite kernel. Symmetry alone, even with nonnegative entries, is insufficient: the symmetric matrixhas for , so it cannot be a Gram matrix of real inner products. A positive-semidefinite kernel requires a positive semidefinite matrix for every finite choice of inputs, not just the observed training data.[ref]
Gaussian Processes for Machine Learning by Carl Edward Rasmussen and Christopher K. I. Williams. Section 4.1, p. 80: Gram matrices, quadratic-form definition of positive semidefiniteness, and nonnegative eigenvalues
The existing Moore-Aronszajn theorem connects this requirement to a Reproducing kernel Hilbert space; this example needs only finite linear algebra.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 areAll 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.
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.If the weight vector lies in the linear span of the training feature map outputs, write . ThenThis is a dual representation: coefficients weight training examples rather than feature coordinates. They need not be positive, and need not be unique when the kernel matrix is singular. Some kernel methods instead write with under their own optimization constraints.[ref]
The kernel trick by Ryan Giordano. Kernelizing classification with support vector machines: displayed prediction as a sum of label-weighted kernel evaluations
The formula is an algebraic conversion for a weight vector in this linear span, not a claim about every possible weight vector. The representer theorem gives a broader reason this form appears in regularized kernel methods.For the XOR separation by a product feature, let have rows . The Gram matrix of those rows, equivalently the kernel matrix, isIts eigenvalues are , so it is a positive semidefinite matrix of rank two, not an invertible matrix. More generally, for any real coefficient vector and any finite set of inputs,This proves the positive-semidefinite kernel condition for the displayed polynomial kernel on all of , rather than checking only this square.
Here , so the explicit choice gives and . ConsequentlyFor the new input , the four polynomial kernel evaluations are . Their weighted sum is , and the sign function predicts . No explicit feature map is needed for this calculation. These coefficients were constructed to reproduce the chosen separator; no fitting algorithm or generalization guarantee is being asserted.
For input coordinates, the homogeneous quadratic polynomial kernel has a weighted quadratic feature map with distinct monomials. Computing an inner product of already stored mapped vectors costs arithmetic operations, whereas costs using the input vectors. Here denotes big O notation. Higher fixed degrees can make the dimension gap much larger.
Sample count still matters. With training examples, materializing a dense kernel matrix stores numbers and requires distinct evaluations using symmetry. A dense direct solve for kernel ridge regression typically takes operations after constructing the kernel matrix, while a dual prediction with nonzero coefficients uses kernel evaluations. Explicit finite feature maps can be preferable when is small relative to , and a stored primal weight vector can make prediction depend on rather than on . The kernel trick by Ryan Giordano (sections Ridge regression and The polynomial kernel) explains the change from feature-coordinate equations to training-example equations; neither representation is universally faster.
The kernel trick saves explicit feature construction when the positive-semidefinite kernel is economical to evaluate; it does not remove the cost of optimization, choose a useful positive-semidefinite kernel, or establish generalization. Random Fourier features illustrate a different tradeoff: replacing the exact Gaussian kernel with a finite approximate feature map can reduce dependence on the sample count while introducing approximation error.
Kernel principal component analysis diagonalizes a centered kernel matrix to perform principal component analysis in an implicit feature space.
A stationary Gaussian process has a covariance positive-semidefinite kernel . In the integrable Fourier transform setting on , use the conventionwith nonnegative integrable spectral density . Its Reproducing kernel Hilbert space has the weighted Fourier transform normThe admissible functions have finite displayed norm and almost everywhere where . That support condition is essential: a zero spectral weight cannot supply a missing frequency by treating an undefined quotient as zero. Small positive spectral weights instead make corresponding components expensive.
The norm describes deterministic functions associated with the covariance positive-semidefinite kernel. It does not assert that a random sample path of the Gaussian process has finite norm in this space. Regularization and random-path variation therefore describe different aspects of the same covariance model.[ref]
Articles by others on the same topic
A Reproducing Kernel Hilbert Space (RKHS) is a fundamental concept in functional analysis and machine learning, particularly in the context of kernel methods. It is a Hilbert space of functions in which point evaluations are continuous linear functionals. The main feature of an RKHS is the presence of a reproducing kernel, which allows for an elegant and powerful way to characterize functions in the space.

