Continuity of functions is one of the core concepts of topology, which is treated in full generality in a more advanced article. This introductory article focuses on the special case where the inputs and outputs of functions are real numbers. In addition, this article discusses the definition for the more general case of functions between two metric spaces. In order theory, especially in domain theory, one considers a notion of continuity known as Scott continuity.
As an example, consider the function h(t) which describes the height of a growing flower at time t. This function is continuous. In fact, there is a dictum of classical physics which states that in nature everything is continuous. By contrast, if M(t) denotes the amount of money in a bank account at time t, then the function jumps whenever money is deposited or withdrawn, so the function M(t) is discontinuous.
To be more precise, we say that the function f is continuous at some point c when the following two requirements are satisfied:
We call the function everywhere continuous, or simply continuous, if it is continuous at every point of its domain. More generally, we say that a function is continuous on some subset of its domain if it is continuous at every point of that subset. If we simply say that a function is continuous, we usually mean that it is continuous for all real numbers.
The notation C(Ω) or C0(Ω) is sometimes used to denote the set of all continuous functions with domain Ω. Similarly, C1(Ω) is used to denote the set of differentiable functions whose derivative is continuous, C²(Ω) for the twice-differentiable functions whose second derivative is continuous, and so on. In the field of computer graphics, these three levels are sometimes called g0 (continuity of position), g1 (continuity of tangency), and g2 (continuity of curvature). The notation C(n, α)(Ω) occurs in the definition of a more subtle concept, that of Hölder continuity.
Again consider a function f that maps a set of real numbers to another set of real numbers, and suppose c is an element of the domain of f. The function f is said to be continuous at the point c if the following holds: For any number ε > 0, however small, there exists some number δ > 0 such that for all x in the domain with c − δ < x < c + δ, the value of f(x) satisfies
Alternatively written: Given subsets I, D of R, continuity of f : I → D at c ∈ I means that for all ε > 0 there exists a δ > 0 such that for all x ∈ I :
More intuitively, we can say that if we want to get all the f(x) values to stay in some small neighborhood around f(c), we simply need to choose a small enough neighborhood for the x values around c, and we can do that no matter how small the f(x) neighborhood is; f is then continuous at c.
One can say, briefly, that a function is continuous if and only if it preserves limits.
Cauchy's and Heine's definitions of continuity are equivalent on the reals. The usual (easier) proof makes use of the axiom of choice, but in the case of global continuity of real functions it was proved by Wacław Sierpiński that the axiom of choice is not actually needed.
In more general setting of topological spaces, the concept analogous to Heine definition of continuity is called sequential continuity. In general, the condition of sequential continuity is weaker than the analogue of Cauchy continuity, which is just called continuity (see continuity (topology) for details).
The composition f o g of two continuous functions is continuous.
If a function is differentiable at some point c of its domain, then it is also continuous at c. The converse is not true: a function that's continuous at c need not be differentiable there. Consider for instance the absolute value function at c = 0.
For example, if a child grows from 1m to 1.5m between the ages of 2 years and 6 years, then, at some time between 2 years and 6 years of age, the child's height must have been 1.25m.
The function is said to be right-continuous at the point c if and only if the following holds: For any number ε > 0 however small, there exists some number δ > 0 such that for all x in the domain with c < x < c + δ, the value of f(x) will satisfy
Likewise a left-continuous function is a function which is continuous at all points when approached from the left.
A function is continuous if and only if it is both right-continuous and left-continuous.
This can also be formulated in terms of sequences and limits: the function f is continuous at the point c if for every sequence (xn) in X with limit lim xn = c, we have lim f(xn) = f(c). Continuous functions transform limits into limits.
This latter condition can be weakened as follows: f is continuous at the point c if and only if for every convergent sequence (xn) in X with limit c, the sequence (f(xn)) is a Cauchy sequence, and c is in the domain of f. Continuous functions transform convergent sequences into Cauchy sequences.
The set of points at which a function between metric spaces is continuous is a Gδ set – this follows from the ε-δ definition of continuity.
The above definitions of continuous functions can be generalized to functions from one topological space to another in a natural way; a function f : X → Y, where X and Y are topological spaces, is continuous if and only if for every open set V ⊆ Y, the inverse image
However, this definition is often difficult to use directly. Instead, suppose we have a function f from X to Y, where X,Y are topological spaces. We say f is continuous at x for some if for any neighborhood V of f(x), there is a neighborhood U of x such that . Although this definition appears complex, the intuition is that no matter how "small" V becomes, we can always find a U containing x that will map inside it. If f is continuous at every , then we simply say f is continuous.
In a metric space, it is equivalent to consider the neighbourhood system of open balls centered at x and f(x) instead of all neighborhoods. This leads to the standard ε-δ definition of a continuous function from real analysis, which says roughly that a function is continuous if all points close to x map to points close to f(x). This only really makes sense in a metric space, however, which has a notion of distance.
Note, however, that if the target space is Hausdorff, it is still true that f is continuous at a if and only if the limit of f as x approaches a is f(a). At an isolated point, every function is continuous.