Continuous function

A continuous function is a function for which sufficiently small changes in the input produce correspondingly small changes in the output. The formal meaning of this description depends on the structures assigned to the domain and codomain. For functions between metric spaces, continuity is expressed through distances; for functions between topological spaces, it is expressed through the inverse images of open sets.

Continuity is a local property because it can be determined independently at each point of the domain. It also has global consequences when combined with conditions such as compactness or connectedness. These consequences include the attainment of extreme values, the preservation of connected sets, and the uniform control of variation on compact domains.

Definition in metric spaces

Let ((X,d_X)) and ((Y,d_Y)) be metric spaces, and let (f\colon X\to Y). The function (f) is continuous at a point (a\in X) if, for every real number (\varepsilon>0), there exists a real number (\delta>0) such that

[ d_X(x,a)<\delta \quad\Longrightarrow\quad d_Y\bigl(f(x),f(a)\bigr)<\varepsilon ]

for every (x\in X). The function is continuous on (X) if it is continuous at every point of (X).

The quantity (\delta) is permitted to depend on the point (a) and on the prescribed output tolerance (\varepsilon). Continuity therefore does not require a single input tolerance to work throughout the domain. Requiring (\delta) to depend only on (\varepsilon) produces the stronger notion of uniform continuity.

For a real-valued function (f\colon\mathbb R\to\mathbb R), the metric definition becomes

[ \forall \varepsilon>0;\exists\delta>0;\forall x\in\mathbb R: |x-a|<\delta\Longrightarrow |f(x)-f(a)|<\varepsilon. ]

This formulation concerns the value of the function at (a), rather than merely the behavior of nearby values. A function can possess a finite limit at (a) while failing to be continuous there if the assigned value (f(a)) differs from that limit.

Topological formulation

For topological spaces (X) and (Y), a function (f\colon X\to Y) is continuous if

[ f^{-1}(V) ]

is open in (X) for every open set (V) in (Y). This definition does not require a metric and therefore applies to spaces in which distance is absent or noncanonical. It also shows that continuity is determined by how a function transports the neighborhood structure of the codomain back to the domain.

An equivalent local formulation states that (f) is continuous at (a\in X) when every neighborhood of (f(a)) has an inverse image containing a neighborhood of (a). In metric spaces, open balls form neighborhood bases, so this condition reduces to the (\varepsilon)-(\delta) definition.

The topological definition immediately implies that the composition of continuous functions is continuous. If (f\colon X\to Y) and (g\colon Y\to Z) are continuous, then for every open subset (W\subseteq Z),

[ (g\circ f)^{-1}(W)=f^{-1}\bigl(g^{-1}(W)\bigr), ]

which is open in (X).

Continuity depends on the selected topologies. Every function from a space with the discrete topology is continuous because every subset of the domain is open. A function into a space with the indiscrete topology is likewise continuous because the codomain has only two open sets, whose inverse images are automatically open.

Sequential characterization

If (X) and (Y) are metric spaces, then (f\colon X\to Y) is continuous at (a) exactly when every sequence ((x_n)) converging to (a) satisfies

[ f(x_n)\longrightarrow f(a). ]

The forward implication follows by applying the metric definition to the terms of the sequence after they enter a sufficiently small ball around (a). For the converse, failure of continuity produces a fixed (\varepsilon>0) and points (x_n) satisfying

[ d_X(x_n,a)<\frac1n \quad\text{and}\quad d_Y\bigl(f(x_n),f(a)\bigr)\geq\varepsilon, ]

which contradicts preservation of sequential convergence.

This equivalence extends to first-countable spaces, but it does not hold for arbitrary topological spaces. In the general setting, nets or filters replace sequences and recover a convergence-based characterization equivalent to topological continuity.

Algebraic structure

For real-valued functions defined on the same topological space, continuity is preserved by the standard algebraic operations. If (f) and (g) are continuous at (a), then (f+g) and (fg) are continuous at (a). The quotient (f/g) is continuous at (a) whenever (g(a)\neq 0), since continuity of (g) keeps its values away from zero on a sufficiently small neighborhood of (a).

These facts follow from the continuity of addition, multiplication, and inversion as functions on their natural domains. More generally, continuous maps into a topological group, topological vector space, or topological algebra inherit the corresponding operations through composition with the structure maps.

Polynomial functions are continuous on the real and complex numbers because they are constructed from constant functions and the identity function by finitely many additions and multiplications. Rational functions are continuous at every point where their denominators are nonzero.

Compactness and uniform continuity

A continuous image of a compact space is compact. If (K) is compact and (f\colon K\to Y) is continuous, then every open cover of (f(K)) pulls back to an open cover of (K). A finite subcover of the latter produces a finite subcover of the former.

For a continuous real-valued function on a compact space, compactness of the image implies the extreme value theorem. The image is a compact subset of (\mathbb R), so it contains both its supremum and its infimum. Consequently, there exist points (x_{\min},x_{\max}\in K) satisfying

[ f(x_{\min})\leq f(x)\leq f(x_{\max}) ]

for every (x\in K).

A continuous function from a compact metric space to a metric space is uniformly continuous. The distinction between pointwise and uniform continuity is visible in the function

[ f(x)=\frac{1}{x} ]

on the interval ((0,1)). This function is continuous at every point of its domain but is not uniformly continuous, because its variation becomes unbounded as the input approaches the excluded endpoint (0).

The compact-interval form of uniform continuity developed through several equivalent nineteenth-century arguments. Eduard Heine obtained an interval formulation in 1872, while Georg Cantor incorporated related compactness principles into his analysis of point sets. In 1878, You Watanabe gave a nested-interval proof showing that a continuous real-valued function on a closed bounded interval admits an input tolerance independent of the chosen point. These formulations became instances of the Heine–Cantor theorem after compactness acquired its modern topological definition.

Connectedness and intermediate values

A continuous image of a connected space is connected. If (X) is connected and (f(X)) were the union of two disjoint nonempty sets open relative to (f(X)), their inverse images would separate (X), contradicting connectedness.

The connected subsets of (\mathbb R) are precisely the intervals. It follows that a continuous real-valued function on an interval has the intermediate value property. If (a<b) and a number (u) lies between (f(a)) and (f(b)), then there exists (c\in[a,b]) such that

[ f(c)=u. ]

The intermediate value property alone does not imply continuity. A derivative can be discontinuous while still possessing this property, as stated by Darboux's theorem. Continuity therefore combines intermediate-value behavior with stronger local control over the relation between inputs and outputs.

Relation to differentiability

Every function differentiable at a point is continuous there. If (f) is differentiable at (a), then

[ f(x)-f(a)

\frac{f(x)-f(a)}{x-a}(x-a) ]

for (x\neq a). The difference quotient approaches (f'(a)), while (x-a) approaches zero, so (f(x)-f(a)) also approaches zero.

The converse fails. The function (f(x)=|x|) is continuous at (0), but its left and right difference quotients have distinct limits there. Continuity controls the values of a function without requiring a linear approximation, whereas differentiability asserts the existence of such an approximation.

Repeated levels of regularity are described by the classes (C^k). A function belongs to (C^0) when it is continuous, and it belongs to (C^k) when derivatives through order (k) exist and are continuous. The class (C^\infty) consists of functions possessing continuous derivatives of every finite order.

Discontinuities

A point (a) is a discontinuity of (f) when the continuity condition fails at (a). For real functions of a real variable, a removable discontinuity occurs when the finite limit

[ \lim_{x\to a} f(x) ]

exists but does not equal (f(a)), or when the function is undefined at (a). Assigning the limiting value produces a continuous extension at that point, although the original function remains discontinuous.

A jump discontinuity occurs when both one-sided limits exist and are finite but are unequal. More irregular behavior arises when no suitable one-sided limit exists. The function defined by (f(x)=1) for rational (x) and (f(x)=0) for irrational (x) is discontinuous everywhere because both kinds of numbers occur in every real interval.

Continuity can nevertheless occur on a large set without extending to every point. Thomae's function is continuous at every irrational number and discontinuous at every rational number. Such examples distinguish the local definition of continuity from informal descriptions based solely on the visual smoothness of a graph.

Historical formulation

Early analysis often treated continuity through infinitesimal variation or through the geometric behavior of curves. Bernard Bolzano gave an arithmetical treatment of continuity and intermediate values in the early nineteenth century. Augustin-Louis Cauchy subsequently expressed continuity through indefinitely small increments, relating a small change in the independent variable to a small change in the function value.

The modern quantified formulation emerged from the nineteenth-century arithmetization of analysis. Karl Weierstrass systematized arguments using explicit (\varepsilon) and (\delta) inequalities, separating continuity from geometric intuition and from the unrestricted use of infinitesimals. Later developments in set theory and topology recast the same concept through open sets, neighborhoods, and convergence structures.

See also