{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "EYXNKYMJJH"
    }
  ],
  "body": "\n## Statement\n\nLet $a \u003c b$ and let $K \\colon [a, b] \\times [a, b] \\to \\R$ be a [[continuous kernel|ZM5G144PZG]] that is [[symmetric|ADTYF8FG6C]], $K(x, y) = K(y, x)$, and positive semidefinite: for every $m \\ge 1$, all $x_1, \\dots, x_m \\in [a, b]$ and all $c_1, \\dots, c_m \\in \\R$,\n$$\\sum_{i=1}^{m} \\sum_{j=1}^{m} c_i c_j K(x_i, x_j) \\ge 0.$$\nLet $T_K$ be the integral operator $(T_K \\varphi)(x) = \\int_a^b K(x, y) \\varphi(y) \\, dy$ on $L^2[a, b]$.\nThen there are an orthonormal family $(e_n)_{n \\in N}$ in $L^2[a, b]$, finite or countable, of continuous [[eigenfunctions|4NSACSWRJZ]] of $T_K$, and eigenvalues $\\mu_n \u003e 0$, such that:\n\n1. the $\\mu_n$ are all the nonzero eigenvalues of $T_K$, each repeated as often as the dimension of its eigenspace;\n2. for all $x, y \\in [a, b]$,\n$$K(x, y) = \\sum_{n \\in N} \\mu_n \\, e_n(x) \\, e_n(y),$$\nwhere the series converges absolutely and [[uniformly|08VZ57PT26]] on $[a, b] \\times [a, b]$;\n3. $\\sum_{n \\in N} \\mu_n = \\int_a^b K(x, x) \\, dx$.\n\n## Remarks\n\nPositivity of the kernel gives $\\ip{T_K \\varphi}{\\varphi} \\ge 0$ for all $\\varphi$, so all eigenvalues are nonnegative.\nPositivity of the remainder kernel $K(x, y) - \\sum_{n \\le m} \\mu_n e_n(x) e_n(y)$ gives $\\sum_{n \\le m} \\mu_n e_n(x)^2 \\le K(x, x)$ for every $m$.\nSo the diagonal series converges pointwise, and one shows its sum is $K(x, x)$, a continuous function.\n[[Dini's theorem|0XRRYF1HPE]] then makes the convergence on the diagonal uniform, and the Cauchy–Schwarz inequality transfers this to the whole square.\nPart 3 is part 2 on the diagonal, integrated.\n\nExample: $K(x, y) = \\min(x, y)$ on $[0, 1]$ is the covariance of Brownian motion, hence positive semidefinite.\nIts expansion is $\\min(x, y) = \\sum_{n \\ge 1} \\frac{2 \\sin\\left((n - \\tfrac12)\\pi x\\right) \\sin\\left((n - \\tfrac12)\\pi y\\right)}{(n - \\tfrac12)^2 \\pi^2}$, uniformly on the square.\nOn the diagonal, part 3 gives $\\sum_{n \\ge 1} \\frac{1}{(n - \\frac12)^2 \\pi^2} = \\int_0^1 x \\, dx = \\frac12$.\n\nWithout positivity, the conclusions can fail: for a general continuous symmetric kernel the expansion is only guaranteed in $L^2$, and $\\sum \\abs{\\mu_n}$ may diverge.\n\n## Explanations\n\n### L1 human\n\nA positive kernel is the infinite analogue of a positive semidefinite symmetric matrix.\nSuch a matrix is a sum of rank-one pieces built from its eigenvectors, with nonnegative weights.\nMercer's theorem says the same for continuous positive kernels, and the sum converges as well as one could hope, uniformly at every pair of points.\n\n### L2 human\n\nThe theorem upgrades the [[spectral theorem for compact self-adjoint operators|A1G25R99PY]], which gives only $L^2$ convergence, to uniform convergence of the kernel itself.\nIt is the basis of the Karhunen–Loève expansion of a stochastic process with continuous covariance.\nIn machine learning it explains why a positive kernel is an inner product of feature vectors $(\\sqrt{\\mu_n} e_n(x))_n$, which leads to reproducing kernel Hilbert spaces.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "ADTYF8FG6C"
    ],
    "kind": "statement",
    "msc": [
      "45C05",
      "47B10",
      "46E22"
    ],
    "name": "Mercer's theorem",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q1716166",
      "wikipedia": "Mercer's theorem"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Mercer%27s_theorem"
      }
    ],
    "tag": "PKGADWXPYH",
    "uses": [
      "ZM5G144PZG",
      "ADTYF8FG6C",
      "4NSACSWRJZ",
      "0XRRYF1HPE",
      "08VZ57PT26",
      "A1G25R99PY"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/PKGADWXPYH/",
  "links": [
    {
      "field": "about",
      "target": "ADTYF8FG6C"
    },
    {
      "field": "uses",
      "target": "ZM5G144PZG"
    },
    {
      "field": "uses",
      "target": "ADTYF8FG6C"
    },
    {
      "field": "uses",
      "target": "4NSACSWRJZ"
    },
    {
      "field": "uses",
      "target": "0XRRYF1HPE"
    },
    {
      "field": "uses",
      "target": "08VZ57PT26"
    },
    {
      "field": "uses",
      "target": "A1G25R99PY"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/PKGADWXPYH.md",
  "msc": [
    "45C05",
    "47B10",
    "46E22"
  ],
  "name": "Mercer's theorem",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/PKG/PKGADWXPYH.md",
  "status": null,
  "tag": "PKGADWXPYH",
  "uri": "m2://PKGADWXPYH",
  "url": "https://tamnd.github.io/math2/wiki/mercers-theorem/",
  "writing": {
    "tag": "PKGADWXPYH",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
