Loosely speaking, a residual is the error in a result.[1] To be precise, suppose we want to find x such that
f(x)=b.
Given an approximation x0 of x, the residual is
b-f(x0)
that is, "what is left of the right hand side" after subtracting f(x0)" (thus, the name "residual": what is left, the rest). On the other hand, the error is
x-x0
If the exact value of x is not known, the residual can be computed, whereas the error cannot.
Similar terminology is used dealing with differential, integral and functional equations. For the approximation
fa
f
T(f)(x)=g(x),
~g(x)~-~T(fa)(x)
maxx\in|g(x)-T(fa)(x)|
lX
fa
f
or some integral of a function of the difference, for example:
\intlX
2~ | |
|g(x)-T(f | |
a)(x)| |
dx.
In many cases, the smallness of the residual means that the approximation is close to the solution, i.e.,
\left| | fa(x)-f(x) |
f(x) |
\right|\ll1.
In these cases, the initial equation is considered as well-posed; and the residual can be considered as a measure of deviation of the approximation from the exact solution.
When one does not know the exact solution, one may look for the approximation with small residual.
Residuals appear in many areas in mathematics, including iterative solvers such as the generalized minimal residual method, which seeks solutions to equations by systematically minimizing the residual.