Solution (source code)

= Solution

In this setting a <positive-semidefinite kernel> is an inner-product similarity: there exist a real <Hilbert space> $\mathcal H$ and a <feature map> $\varphi:\mathcal X\to\mathcal H$ such that
$$
\boxed{k(x,x')=\langle\varphi(x),\varphi(x')\rangle_{\mathcal H}}.
$$
The <feature map> may be infinite-dimensional. Equivalently, $k$ is symmetric and every finite <kernel matrix> is a <positive semidefinite matrix>. The equivalence follows by forming the <canonical feature space of a positive-semidefinite kernel> and taking its <Hilbert space> completion.