We briefly summarize the kernel regression approach, as used recently in materials modelling, to fitting functions, particularly potential energy surfaces, and highlight how the linear algebra framework can be used to both predict and train from linear functionals of the potential energy, such as the total energy and atomic forces. We then give a detailed account of the smooth overlap of atomic positions (SOAP) representation and kernel, showing how it arises from an abstract representation of smooth atomic densities, and how it is related to several popular density-based representations of atomic structure. We also discuss recent generalizations that allow fine control of correlations between different atomic species, prediction and fitting of tensorial properties, and also how to construct structural kernels—applicable to comparing entire molecules or periodic systems—that go beyond an additive combination of local environments. (This chapter is adapted with permission from Ceriotti et al. (Handbook of materials modeling. Springer, Cham, 2019).)