Search

Search papers and lessons

Integral Operator

Level 3 · 13 min read

An integral operator turns one function into another by weighting every input point with a kernel and adding the results up, so it is a linear map on functions.

On this page

  • Colour = topic mix
  • Linear algebra
  • Probability
  • Calculus
  • Discrete math
  • Inference
  • ReadReady to readNot yet

TL;DR

An integral operator takes a function as input and returns another function as output. It does so by choosing a kernel, a function of two variables, and computing, for each point x, a weighted total of the input function over all points y. Because the total is an integral, the operator is linear: it respects adding functions and scaling them. It is the continuous version of multiplying a vector by a matrix.

Builds on: Kernel Function, Definite Integral, Function · Leads to: Convolution as a special case, and the integral-equation view of Green's functions, covariance operators and Gaussian Process Regression

Where it's used

Solving differential equations. Many linear boundary-value problems, such as heat flow along a rod with fixed ends, have solutions of the form u(x) = integral of G(x, y) f(y) dy, where G is a Green's function. The function G is the kernel of an integral operator that maps the heat source f to the temperature u. Engineers use this to compute how a system responds to a force applied at one point.

Covariance in statistics and machine learning. A kernel function that defines a Gaussian process also defines an integral operator on functions. Mercer's theorem says that a continuous positive kernel can be expanded as a sum over eigenfunctions of that operator, which is the reason kernel methods can be analysed with the spectral tools of linear algebra. Kernel principal component analysis and some Bayesian models use this view directly.

Signal processing. Convolution, the operation that blurs an image or filters a sound, is an integral operator whose kernel depends only on the difference x - y. The kernel is the filter, and the output at x is the weighted sum of the input around x. Image and audio tools use this everywhere.

Learned operators. Neural operator models learn a mapping from one function to another, for example from the initial state of a fluid to its later state, and many of them stack layers that are learned integral operators. The kernel is the learned object, which replaces a fixed matrix with a continuous family of weights.

How it works

Take the simplest non-trivial case: the interval from 0 to 1, a kernel K(x, y) = x y, and the input function f(y) = y. Trace what the operator does at one output point.

  1. Choose the operator. Define (T f)(x) = integral from 0 to 1 of K(x, y) f(y) dy. The output is a new function, T f, that depends on x. Check: the input f is used only through its values at every y in the interval.
  2. Plug in the kernel and the input. At the point x, the integrand is x y times y = x y^2. Check: K(x, y) f(y) = x y · y.
  3. Add up the weighted values. The integral integral from 0 to 1 of x y^2 dy adds the integrand over all y. Here x is a constant with respect to y, so it comes out: x times integral from 0 to 1 of y^2 dy.
  4. Compute the integral. The integral of y^2 from 0 to 1 is 1/3. Check: the antiderivative is y^3 / 3, and it goes from 0 to 1 to give 1/3.
  5. Read the answer. The output is (T f)(x) = x / 3. Check: at x = 1 the kernel is K(1, y) = y, so the output is the integral of y times y, which is 1/3, the same as x/3 at x = 1.

Now see why this is a discrete matrix in disguise. Replace the integral by a sum over sample points. Take two points, y = 0.25 and y = 0.75, each standing for a slice of width 0.5. The integral becomes:

  • the sum over the points of K(x, y_j) f(y_j) times width, which for x = 1 is 1 times 0.25 times 0.25 times 0.5 + 1 times 0.75 times 0.75 times 0.5;
  • that is 0.03125 + 0.28125 = 0.3125.

The exact answer is 1/3 = 0.3333, so two points give a rough answer. More points give a closer one. In the limit of many points, the sum is the integral. So the operator is a matrix with entries K(x_i, y_j) times width, multiplied by the vector of function values f(y_j).

flowchart LR
  A[Input function f] --> B[Multiply by kernel K of x and y]
  B --> C[Add up over all y: the integral]
  C --> D[Output function T f of x]

The flow shows the process for one output point x. Every output point repeats the same weighted total with its own x.

00.20.40.60.8100.10.20.30.40.50.6x(T f)(x)
  • T f for f(y) = y
  • T f for f(y) = 1
The same kernel K(x, y) = x y gives a straight line through the origin for each input. The dot marks the value at x = 1 for f(y) = y.

The math

Definition: Integral operator

Let K(x, y) be a function of two variables on an interval [a, b]. The integral operator with kernel K sends a function f to the function

(TKf)(x)=∫abK(x,y) f(y) dy.(T_K f)(x) = \int_a^b K(x, y)\, f(y)\, dy.

The function K is called the kernel. When f is defined on the interval, T_K f is a new function on the same interval.

Step 1 in symbols

The operator is defined for each x separately. The output at x is a number, and collecting these numbers over all x gives the output function. The input enters only through the values f(y) for y in [a, b], which means the output at x is determined by the whole input function, not by its value at x.

Step 3 in symbols

Linearity follows from the linearity of the integral. For constants alpha and beta and functions f and h,

TK(αf+βh)=α TKf+β TKh.T_K(\alpha f + \beta h) = \alpha\, T_K f + \beta\, T_K h.

Check with the example: f(y) = y + 1 gives (T f)(x) = x y (y+1) integrated, which is x (1/3 + 1/2) = 5x/6. The sum of the separate answers is x/3 + x/2 = 5x/6, so the rule holds.

Step 4 in symbols

The integral of a power is integral from a to b of y^n dy = (b^(n+1) - a^(n+1)) / (n+1). With n = 2, a = 0, b = 1, this is 1/3. Because the kernel is x y, the factor x comes out of the integral, and the output is x/3.

The discrete form

Replace the integral with a sum over N points y_j with spacing h_j:

(TKf)(xi)≈∑j=1NK(xi,yj) f(yj) hj.(T_K f)(x_i) \approx \sum_{j=1}^{N} K(x_i, y_j)\, f(y_j)\, h_j.

Write A_ij = K(x_i, y_j) h_j for the matrix. Then the vector of outputs is the matrix A times the vector of input values. In the two-point example, A has entries K(1, 0.25) times 0.5 = 0.125 and K(1, 0.75) times 0.5 = 0.375 in the top row, and the input values are f(0.25) = 0.25 and f(0.75) = 0.75. The product is 0.125 times 0.25 + 0.375 times 0.75 = 0.03125 + 0.28125 = 0.3125, the same answer as before. A matrix is a finite integral operator, and a kernel is the continuous limit of a matrix.

Eigenfunctions

An eigenfunction of T_K is a nonzero function phi with T_K phi = lambda phi for some number lambda, the eigenvalue. This is the function analogue of an eigenvector of a matrix. The Mercer expansion writes a positive kernel as a sum of such eigenfunctions, K(x, y) = sum over k of lambda_k phi_k(x) phi_k(y), with nonnegative lambda_k.

Worked examples

Example
Example 1: the constant kernel (tiny)

Take the kernel K(x, y) = 1 on [0, 1], and the input f(y) = y.

  1. Write the operator: (T f)(x) = integral from 0 to 1 of 1 times y dy.
  2. The kernel does not depend on x, so the output is the same for every x.
  3. The integral of y from 0 to 1 is 1/2. Check: the antiderivative is y^2 / 2, and 1/2 - 0 = 1/2.
  4. The output function is the constant 1/2 for every x.
  5. Interpretation: the operator returned the area under f on [0, 1], as a constant function. A kernel that ignores x turns the whole function into one number.
Example
Example 2: the product kernel (standard)

Take K(x, y) = x y on [0, 1], and two inputs: f(y) = 1 and f(y) = y.

  1. For f(y) = 1: (T f)(x) = integral from 0 to 1 of x y times 1 dy.
  2. Pull out x: x times integral from 0 to 1 of y dy = x times 1/2. The output is x/2.
  3. For f(y) = y: (T f)(x) = integral from 0 to 1 of x y times y dy = x times 1/3. The output is x/3.
  4. Compare: the first input is a constant 1, and its output x/2 rises with x. The second input rises with y, and its output x/3 is smaller.
  5. Check linearity: the input f(y) = 1 + y should give x/2 + x/3 = 5x/6. Direct computation gives integral from 0 to 1 of x y (1 + y) dy = x (1/2 + 1/3) = 5x/6, which matches.
  6. Interpretation: this kernel is rank one. Every output is a multiple of x, because the kernel is a product of a function of x and a function of y, and that structure is what makes the operator simple.
Example
Example 3: the covariance of a random walk (realistic)

Take the kernel K(x, y) = min(x, y) on [0, 1]. This is the covariance of Brownian motion, the random walk in continuous time. The operator with this kernel applied to the input f(y) = 1 gives a function of x that shows how the walk's values are tied together.

  1. Write the operator: (T f)(x) = integral from 0 to 1 of min(x, y) times 1 dy.
  2. Split the integral at y = x. For y less than x, the minimum is y. For y greater than x, the minimum is x.
  3. The first part is integral from 0 to x of y dy = x^2 / 2. Check: at x = 1 this is 1/2.
  4. The second part is integral from x to 1 of x dy = x (1 - x). Check: at x = 1 this is 0, and at x = 0 it is 0.
  5. Add the parts: (T f)(x) = x^2/2 + x - x^2 = x - x^2/2.
  6. Check the endpoints: at x = 0, the output is 0; at x = 1, it is 1/2, which equals the integral of min(1, y) over [0, 1].
  7. At x = 0.5 the output is 0.5 - 0.125 = 0.375.

Try it: take the same kernel and the input f(y) = 2. What is the output at x = 0.5? Answer: the operator is linear, so the output is twice the previous result, 2 times 0.375 = 0.75.

Common mistakes and tradeoffs

It is tempting to think an integral operator is just a function applied pointwise, like squaring each value. In fact the output at x depends on the input at every y in the interval, because the integral sums over all of them. The operator is nonlocal: changing f far away from x can change (T f)(x), unless the kernel is zero there.

It is tempting to think the kernel and the operator are the same object. In fact the kernel is a function of two variables, and the operator is the rule that uses it. Two different kernels can give the same operator only when they agree almost everywhere, so the kernel is the practical description.

It is tempting to think an integral operator must be symmetric. In fact it is symmetric only when the kernel satisfies K(x, y) = K(y, x). The matrix analogue of a symmetric kernel is a symmetric matrix, and the spectral theory is cleaner for symmetric kernels, but the operator itself is defined for any kernel.

When to use it: when a linear relation between two functions is naturally a weighted total over the whole domain, as in Green's functions, covariance structures and convolution. When not to use it: when the relation is local, such as a derivative. A derivative is a differential operator, and it depends only on nearby values. The alternatives are differential operators for local relations, and matrices when the domain is finite.

History

Integral equations, equations in which the unknown function appears inside an integral, were studied in the nineteenth century, and the work of Fredholm and Volterra around 1900 made them a systematic subject. Fredholm's equation has an integral operator on the left-hand side, and its theory set up many of the ideas that later appear in functional analysis.

Mercer's 1909 theorem connected positive kernels to eigenfunction expansions, which made the operator a central object for analysing kernels. Later, in the twentieth century, the same ideas became part of the theory of Hilbert spaces, where an integral operator with a suitable kernel is a bounded linear map.

In the last decades, kernels became central to statistics and machine learning, and integral operators became a way to study them. Learned integral operators are now used in models that map functions to functions, which is a recent development and still an active area.

Recap

  • An integral operator maps a function f to a new function T f, using a kernel K(x, y) and an integral over y.
  • It is linear, so it respects adding functions and multiplying them by constants.
  • Replacing the integral by a sum turns the operator into a matrix. A matrix is a finite integral operator.
  • The kernel K is the object that changes from one application to another: a Green's function, a covariance, a convolution filter or a learned weight.
  • Eigenfunctions of the operator generalise eigenvectors, and Mercer's theorem expands positive kernels in terms of them.

What to read next: Convolution is the special case where the kernel depends only on x - y. Eigenvalues and Eigenvectors explains the matrix version of the eigenfunction idea. Gaussian Process Regression shows the kernel in use.

Check yourself

QuestionIn one sentence, what does an integral operator take as input and what does it return?Show answer

It takes a function f on an interval and returns a new function T f, where each value (T f)(x) is the integral over y of the kernel K(x, y) times f(y).

QuestionCompute the integral operator with kernel K(x, y) = x + y on [0, 1] applied to f(y) = 1, at x = 0.Show answer

The output is (T f)(0) = integral from 0 to 1 of (0 + y) times 1 dy = integral from 0 to 1 of y dy = 1/2.

QuestionWhy is the output of an integral operator at x not determined by the value of f at x alone?Show answer

The integral adds up the kernel times f(y) over every y in the interval, so the output at x uses the input at all points. Only if the kernel is concentrated at y = x, as a delta function would be, does the operator reduce to a local rule.

QuestionUse the kernel K(x, y) = x y on [0, 1] with input f(y) = y^2. What is (T f)(x), and what is it at x = 1?Show answer

The integral is x times integral from 0 to 1 of y times y^2 dy = x times integral from 0 to 1 of y^3 dy = x times 1/4. So (T f)(x) = x/4, and at x = 1 the value is 1/4.

QuestionA matrix A has entries A_ij = K(x_i, y_j) h_j. Explain in one sentence why multiplying A by a vector of function values is a discrete approximation of the integral operator.Show answer

Multiplying by A gives, for each x_i, the sum over j of K(x_i, y_j) times the value f(y_j) times the spacing h_j, which is a Riemann sum (adding up rectangles of width h_j under the integrand), and the sum becomes the integral as the spacing shrinks.

Sources

  • Wikipedia, "Integral operator".
  • Wikipedia, "Fredholm integral equation".
  • Wikipedia, "Mercer's theorem".
Integral Operator — explained simply · ungoon.me