Formally, the kernel is a function K : X × X → R that takes as input two data objects (e.g., vectors, texts, or parse trees) and outputs a real number characterizing their similarity, with the property that the function is symmetric and positive semi-definite.
for all where φ is an (implicit) mapping from X to an (inner product) feature space F. Kernels are used inside learning algorithms such as support vector machines (SVM) or kernel perceptrons as the interface between the algorithm and the data.