In mathematics, a continuous function is a function such that a small variation of the argument induces a small variation of the value of the function. This implies there are no abrupt changes in value, known as "discontinuities". More precisely, a function is continuous if arbitrarily small changes in its value can be assured by restricting to sufficiently small changes of its argument. A discontinuous function is a function that is . Until the 19th century, mathematicians largely relied on intuitive notions of continuity and considered only continuous functions. The epsilon–delta definition of a limit was introduced to formalize the definition of continuity. Continuity is one of the core concepts of calculus and mathematical analysis, where arguments and values of functions are real and complex numbers. The concept has been generalized to functions between metric spaces and between topological spaces. The latter are the most general continuous functions, and their definition is the basis of topology. A stronger form of continuity is uniform continuity. In order theory, especially in domain theory, a related concept of continuity is Scott continuity. As an example, the function denoting the height of a growing flower at time would be considered continuous. In contrast, the function denoting the amount of money in a bank account at time would be considered discontinuous since it "jumps" at each point in time when money is deposited or withdrawn. History. A form of the epsilon–delta definition of continuity was first given by Bernard Bolzano in 1817. Augustin-Louis Cauchy defined continuity of formula_1 as follows: an infinitely small increment formula_2 of the independent variable "x" always produces an infinitely small change formula_3 of the dependent variable "y" (see e.g. "Cours d'Analyse", p. 34). Cauchy defined infinitely small quantities in terms of variable quantities, and his definition of continuity closely parallels the infinitesimal definition used today (see microcontinuity). The formal definition and the distinction between pointwise continuity and uniform continuity were first given by Bolzano in the 1830s, but the work wasn't published until the 1930s. Like Bolzano, Karl Weierstrass denied continuity of a function at a point "c" unless it was defined at and on both sides of "c", but Édouard Goursat allowed the function to be defined only at and on one side of "c", and Camille Jordan allowed it even if the function was defined only at "c". All three of those nonequivalent definitions of pointwise continuity are still in use. Eduard Heine provided the first published definition of uniform continuity in 1872, but based these ideas on lectures given by Peter Gustav Lejeune Dirichlet in 1854. Real functions. Definition. A real function that is a function from real numbers to real numbers can be represented by a graph in the Cartesian plane; such a function is continuous if, roughly speaking, the graph is a single unbroken curve whose domain is the entire real line. A more mathematically rigorous definition is given below. Continuity of real functions is usually defined in terms of limits. A function with variable is "continuous at" the real number , if the limit of formula_4 as tends to , is equal to formula_5 There are several different definitions of the (global) continuity of a function, which depend on the nature of its domain. A function is continuous on an open interval if the interval is contained in the function's domain and the function is continuous at every interval point. A function that is continuous on the interval formula_6 (the whole real line) is often called simply a continuous function; one also says that such a function is "continuous everywhere". For example, all polynomial functions are continuous everywhere. A function is continuous on a semi-open or a closed interval; if the interval is contained in the domain of the function, the function is continuous at every interior point of the interval, and the value of the function at each endpoint that belongs to the interval is the limit of the values of the function when the variable tends to the endpoint from the interior of the interval. For example, the function formula_7 is continuous on its whole domain, which is the closed interval formula_8 Many commonly encountered functions are partial functions that have a domain formed by all real numbers, except some isolated points. Examples include the reciprocal function formula_9 and the tangent function formula_10 When they are continuous on their domain, one says, in some contexts, that they are continuous, although they are not continuous everywhere. In other contexts, mainly when one is interested in their behavior near the exceptional points, one says they are discontinuous. A partial function is "discontinuous" at a point if the point belongs to the topological closure of its domain, and either the point does not belong to the domain of the function or the function is not continuous at the point. For example, the functions formula_11 and formula_12 are discontinuous at , and remain discontinuous whichever value is chosen for defining them at . A point where a function is discontinuous is called a "discontinuity". Using mathematical notation, several ways exist to define continuous functions in the three senses mentioned above. Let formula_13 be a function whose domain formula_14 is contained in formula_15 of real numbers. Some (but not all) possibilities for formula_14 are: In the case of an open interval, formula_23 and formula_24 do not belong to formula_14, and the values formula_26 and formula_27 are not defined, and if they are, they do not matter for continuity on formula_14. Definition in terms of limits of functions. The function is "continuous at some point" of its domain if the limit of formula_4 as "x" approaches "c" through the domain of "f", exists and is equal to formula_5 In mathematical notation, this is written as formula_31 In detail this means three conditions: first, has to be defined at (guaranteed by the requirement that is in the domain of ). Second, the limit of that equation has to exist. Third, the value of this limit must equal formula_5 Definition in terms of neighborhoods. A neighborhood of a point "c" is a set that contains, at least, all points within some fixed distance of "c". Intuitively, a function is continuous at a point "c" if the range of "f" over the neighborhood of "c" shrinks to a single point formula_33 as the width of the neighborhood around "c" shrinks to zero. More precisely, a function "f" is continuous at a point "c" of its domain if, for any neighborhood formula_34 there is a neighborhood formula_35 in its domain such that formula_36 whenever formula_37 As neighborhoods are defined in any topological space, this definition of a continuous function applies not only for real functions but also when the domain and the codomain are topological spaces and is thus the most general definition. It follows that a function is automatically continuous at every isolated point of its domain. For example, every real-valued function on the integers is continuous. Definition in terms of limits of sequences. One can instead require that for any sequence formula_38 of points in the domain which converges to "c", the corresponding sequence formula_39 converges to formula_5 In mathematical notation, formula_41 Weierstrass and Jordan definitions (epsilon–delta) of continuous functions. Explicitly including the definition of the limit of a function, we obtain a self-contained definition: Given a function formula_42 as above and an element formula_43 of the domain formula_14, formula_45 is said to be continuous at the point formula_43 when the following holds: For any positive real number formula_47 however small, there exists some positive real number formula_48 such that for all formula_49 in the domain of formula_45 with formula_51 the value of formula_52 satisfies formula_53 Alternatively written, continuity of formula_42 at formula_55 means that for every formula_47 there exists a formula_48 such that for all formula_58: formula_59 More intuitively, we can say that if we want to get all the formula_52 values to stay in some small neighborhood around formula_61 we need to choose a small enough neighborhood for the formula_49 values around formula_63 If we can do that no matter how small the formula_64 neighborhood is, then formula_45 is continuous at formula_63 In modern terms, this is generalized by the definition of continuity of a function with respect to a basis for the topology, here the metric topology. Weierstrass had required that the interval formula_67 be entirely within the domain formula_14, but Jordan removed that restriction. Definition in terms of control of the remainder. In proofs and numerical analysis, we often need to know how fast limits are converging, or in other words, control of the remainder. We can formalize this to a definition of continuity. A function formula_69 is called a control function if A function formula_71 is "C"-continuous at formula_43 if there exists such a neighbourhood formula_73 that formula_74 A function is continuous in formula_43 if it is "C"-continuous for some control function "C". This approach leads naturally to refining the notion of continuity by restricting the set of admissible control functions. For a given set of control functions formula_76 a function is if it is for some formula_77 For example, the Lipschitz, the Hölder continuous functions of exponent and the uniformly continuous functions below are defined by the set of control functions formula_78 formula_79 formula_80 respectively. Definition using oscillation. Continuity can also be defined in terms of oscillation: a function "f" is continuous at a point formula_43 if and only if its oscillation at that point is zero; in symbols, formula_82 A benefit of this definition is that it discontinuity: the oscillation gives how the function is discontinuous at a point. This definition is helpful in descriptive set theory to study the set of discontinuities and continuous points – the continuous points are the intersection of the sets where the oscillation is less than formula_83 (hence a formula_84 set) – and gives a rapid proof of one direction of the Lebesgue integrability condition. The oscillation is equivalent to the formula_85 definition by a simple re-arrangement and by using a limit (lim sup, lim inf) to define oscillation: if (at a given point) for a given formula_86 there is no formula_87 that satisfies the formula_85 definition, then the oscillation is at least formula_89 and conversely if for every formula_83 there is a desired formula_91 the oscillation is 0. The oscillation definition can be naturally generalized to maps from a topological space to a metric space. Definition using the hyperreals. Cauchy defined the continuity of a function in the following intuitive terms: an infinitesimal change in the independent variable corresponds to an infinitesimal change of the dependent variable (see "Cours d'analyse", page 34). Non-standard analysis is a way of making this mathematically rigorous. The real line is augmented by adding infinite and infinitesimal numbers to form the hyperreal numbers. In nonstandard analysis, continuity can be defined as follows. (see microcontinuity). In other words, an infinitesimal increment of the independent variable always produces an infinitesimal change of the dependent variable, giving a modern expression to Augustin-Louis Cauchy's definition of continuity. Rules for continuity. Proving the continuity of a function by a direct application of the definition is generaly a noneasy task. Fortunately, in practice, most functions are built from simpler functions, and their continuity can be deduced immediately from the way they are defined, by applying the following rules: These rules imply that every polynomial function is continuous everywhere and that a rational function is continuous everywhere where it is defined, if the numerator and the denominator have no common zeros. More generally, the quotient of two continuous functions is continuous outside the zeros of the denominator. An example of a function for which the above rules are not sufficirent is the sinc function, which is defined by and for . The above rules show immediately that the function is continuous for , but, for proving the continuity at , one has to prove formula_92 As this is true, one gets that the sinc function is continuous function on all real numbers. Examples of discontinuous functions. An example of a discontinuous function is the Heaviside step function formula_93, defined by formula_94 Pick for instance formula_95. Then there is no around formula_96, i.e. no open interval formula_97 with formula_98 that will force all the formula_99 values to be within the of formula_100, i.e. within formula_101. Intuitively, we can think of this type of discontinuity as a sudden jump in function values. Similarly, the signum or sign function formula_102 is discontinuous at formula_96 but continuous everywhere else. Yet another example: the function formula_104 is continuous everywhere apart from formula_96. Besides plausible continuities and discontinuities like above, there are also functions with a behavior, often coined pathological, for example, Thomae's function, formula_106 is continuous at all irrational numbers and discontinuous at all rational numbers. In a similar vein, Dirichlet's function, the indicator function for the set of rational numbers, formula_107 is nowhere continuous. Properties. A useful lemma. Let formula_52 be a function that is continuous at a point formula_109 and formula_110 be a value such formula_111 Then formula_112 throughout some neighbourhood of formula_63 "Proof:" By the definition of continuity, take formula_114 , then there exists formula_115 such that formula_116 Suppose there is a point in the neighbourhood formula_117 for which formula_118 then we have the contradiction formula_119 Intermediate value theorem. The intermediate value theorem is an existence theorem, based on the real number property of completeness, and states: If the real-valued function "f" is continuous on the closed interval formula_120 and "k" is some number between formula_26 and formula_122 then there is some number formula_123 such that formula_124 For example, if a child grows from 1 m to 1.5 m between the ages of two and six years, then, at some time between two and six years of age, the child's height must have been 1.25 m. As a consequence, if "f" is continuous on formula_125 and formula_26 and formula_27 differ in sign, then, at some point formula_123 formula_33 must equal zero. Extreme value theorem. The extreme value theorem states that if a function "f" is defined on a closed interval formula_125 (or any closed and bounded set) and is continuous there, then the function attains its maximum, i.e. there exists formula_131 with formula_132 for all formula_133 The same is true of the minimum of "f". These statements are not, in general, true if the function is defined on an open interval formula_134 (or any set that is not both closed and bounded), as, for example, the continuous function formula_135 defined on the open interval (0,1), does not attain a maximum, being unbounded above. Relation to differentiability and integrability. Every differentiable function formula_136 is continuous, as can be shown. The converse does not hold: for example, the absolute value function formula_137 is everywhere continuous. However, it is not differentiable at formula_96 (but is so everywhere else). Weierstrass's function is also everywhere continuous but nowhere differentiable. The derivative "f′"("x") of a differentiable function "f"("x") need not be continuous. If "f′"("x") is continuous, "f"("x") is said to be "continuously differentiable". The set of such functions is denoted formula_139 More generally, the set of functions formula_140 (from an open interval (or open subset of formula_15) formula_142 to the reals) such that "f" is formula_143 times differentiable and such that the formula_143-th derivative of "f" is continuous is denoted formula_145 See differentiability class. In the field of computer graphics, properties related (but not identical) to formula_146 are sometimes called formula_147 (continuity of position), formula_148 (continuity of tangency), and formula_149 (continuity of curvature); see Smoothness of curves and surfaces. Every continuous function formula_150 is integrable (for example in the sense of the Riemann integral). The converse does not hold, as the (integrable but discontinuous) sign function shows. Pointwise and uniform limits. Given a sequence formula_151 of functions such that the limit formula_152 exists for all formula_153, the resulting function formula_52 is referred to as the pointwise limit of the sequence of functions formula_155 The pointwise limit function need not be continuous, even if all functions formula_156 are continuous, as the animation at the right shows. However, "f" is continuous if all functions formula_156 are continuous and the sequence converges uniformly, by the uniform convergence theorem. This theorem can be used to show that the exponential functions, logarithms, square root function, and trigonometric functions are continuous. Directional Continuity. Discontinuous functions may be discontinuous in a restricted way, giving rise to the concept of directional continuity (or right and left continuous functions) and semi-continuity. Roughly speaking, a function is if no jump occurs when the limit point is approached from the right. Formally, "f" is said to be right-continuous at the point "c" if the following holds: For any number formula_158 however small, there exists some number formula_48 such that for all "x" in the domain with formula_160 the value of formula_52 will satisfy formula_162 This is the same condition as continuous functions, except it is required to hold for "x" strictly larger than "c" only. Requiring it instead for all "x" with formula_163 yields the notion of functions. A function is continuous if and only if it is both right-continuous and left-continuous. Semicontinuity. A function "f" is if, roughly, any jumps that might occur only go down, but not up. That is, for any formula_47 there exists some number formula_48 such that for all "x" in the domain with formula_166 the value of formula_52 satisfies formula_168 The reverse condition is . Continuous functions between metric spaces. The concept of continuous real-valued functions can be generalized to functions between metric spaces. A metric space is a set formula_169 equipped with a function (called metric) formula_170 that can be thought of as a measurement of the distance of any two elements in "X". Formally, the metric is a function formula_171 that satisfies a number of requirements, notably the triangle inequality. Given two metric spaces formula_172 and formula_173 and a function formula_174 then formula_45 is continuous at the point formula_176 (with respect to the given metrics) if for any positive real number formula_47 there exists a positive real number formula_48 such that all formula_179 satisfying formula_180 will also satisfy formula_181 As in the case of real functions above, this is equivalent to the condition that for every sequence formula_182 in formula_169 with limit formula_184 we have formula_185 The latter condition can be weakened as follows: formula_45 is continuous at the point formula_187 if and only if for every convergent sequence formula_182 in formula_169 with limit formula_187, the sequence formula_191 is a Cauchy sequence, and formula_187 is in the domain of formula_45. The set of points at which a function between metric spaces is continuous is a formula_84 set – this follows from the formula_85 definition of continuity. This notion of continuity is applied, for example, in functional analysis. A key statement in this area says that a linear operator formula_196 between normed vector spaces formula_197 and formula_198 (which are vector spaces equipped with a compatible norm, denoted formula_199) is continuous if and only if it is bounded, that is, there is a constant formula_200 such that formula_201 for all formula_202 Uniform, Hölder and Lipschitz continuity. The concept of continuity for functions between metric spaces can be strengthened in various ways by limiting the way formula_87 depends on formula_83 and "c" in the definition above. Intuitively, a function "f" as above is uniformly continuous if the formula_87 does not depend on the point "c". More precisely, it is required that for every real number formula_158 there exists formula_48 such that for every formula_208 with formula_209 we have that formula_210 Thus, any uniformly continuous function is continuous. The converse does not generally hold but holds when the domain space "X" is compact. Uniformly continuous maps can be defined in the more general situation of uniform spaces. A function is Hölder continuous with exponent α (a real number) if there is a constant "K" such that for all formula_211 the inequality formula_212 holds. Any Hölder continuous function is uniformly continuous. The particular case formula_213 is referred to as Lipschitz continuity. That is, a function is Lipschitz continuous if there is a constant "K" such that the inequality formula_214 holds for any formula_215 The Lipschitz condition occurs, for example, in the Picard–Lindelöf theorem concerning the solutions of ordinary differential equations. Continuous functions between topological spaces. Another, more abstract, notion of continuity is the continuity of functions between topological spaces in which there generally is no formal notion of distance, as there is in the case of metric spaces. A topological space is a set "X" together with a topology on "X", which is a set of subsets of "X" satisfying a few requirements with respect to their unions and intersections that generalize the properties of the open balls in metric spaces while still allowing one to talk about the neighborhoods of a given point. The elements of a topology are called open subsets of "X" (with respect to the topology). A function formula_174 between two topological spaces "X" and "Y" is continuous if for every open set formula_217 the inverse image formula_218 is an open subset of "X". That is, "f" is a function between the sets "X" and "Y" (not on the elements of the topology formula_219), but the continuity of "f" depends on the topologies used on "X" and "Y". This is equivalent to the condition that the preimages of the closed sets (which are the complements of the open subsets) in "Y" are closed in "X". An extreme example: if a set "X" is given the discrete topology (in which every subset is open), all functions formula_220 to any topological space "T" are continuous. On the other hand, if "X" is equipped with the indiscrete topology (in which the only open subsets are the empty set and "X") and the space "T" set is at least T0, then the only continuous functions are the constant functions. Conversely, any function whose codomain is indiscrete is continuous. Continuity at a point. The translation in the language of neighborhoods of the formula_221-definition of continuity leads to the following definition of the continuity at a point: This definition is equivalent to the same statement with neighborhoods restricted to open neighborhoods and can be restated in several ways by using preimages rather than images. Also, as every set that contains a neighborhood is also a neighborhood, and formula_222 is the largest subset of such that formula_223 this definition may be simplified into: As an open set is a set that is a neighborhood of all its points, a function formula_224 is continuous at every point of if and only if it is a continuous function. If "X" and "Y" are metric spaces, it is equivalent to consider the neighborhood system of open balls centered at "x" and "f"("x") instead of all neighborhoods. This gives back the above formula_85 definition of continuity in the context of metric spaces. In general topological spaces, there is no notion of nearness or distance. If, however, the target space is a Hausdorff space, 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. Given formula_226 a map formula_224 is continuous at formula_49 if and only if whenever formula_229 is a filter on formula_169 that converges to formula_49 in formula_232 which is expressed by writing formula_233 then necessarily formula_234 in formula_235 If formula_236 denotes the neighborhood filter at formula_49 then formula_224 is continuous at formula_49 if and only if formula_240 in formula_235 Moreover, this happens if and only if the prefilter formula_242 is a filter base for the neighborhood filter of formula_52 in formula_235 Alternative definitions. Several equivalent definitions for a topological structure exist; thus, several equivalent ways exist to define a continuous function. Sequences and nets. In several contexts, the topology of a space is conveniently specified in terms of limit points. This is often accomplished by specifying when a point is the limit of a sequence. Still, for some spaces that are too large in some sense, one specifies also when a point is the limit of more general sets of points indexed by a directed set, known as nets. A function is (Heine-)continuous only if it takes limits of sequences to limits of sequences. In the former case, preservation of limits is also sufficient; in the latter, a function may preserve all limits of sequences yet still fail to be continuous, and preservation of nets is a necessary and sufficient condition. In detail, a function formula_224 is sequentially continuous if whenever a sequence formula_182 in formula_169 converges to a limit formula_248 the sequence formula_191 converges to formula_250 Thus, sequentially continuous functions "preserve sequential limits." Every continuous function is sequentially continuous. If formula_169 is a first-countable space and countable choice holds, then the converse also holds: any function preserving sequential limits is continuous. In particular, if formula_169 is a metric space, sequential continuity and continuity are equivalent. For non-first-countable spaces, sequential continuity might be strictly weaker than continuity. (The spaces for which the two properties are equivalent are called sequential spaces.) This motivates the consideration of nets instead of sequences in general topological spaces. Continuous functions preserve the limits of nets, and this property characterizes continuous functions. For instance, consider the case of real-valued functions of one real variable: "Proof." Assume that formula_253 is continuous at formula_43 (in the sense of formula_255 continuity). Let formula_256 be a sequence converging at formula_43 (such a sequence always exists, for example, formula_258); since formula_45 is continuous at formula_43 formula_261 For any such formula_262 we can find a natural number formula_263 such that for all formula_264 formula_265 since formula_182 converges at formula_43; combining this with formula_268 we obtain formula_269 Assume on the contrary that formula_45 is sequentially continuous and proceed by contradiction: suppose formula_45 is not continuous at formula_43 formula_273 then we can take formula_274 and call the corresponding point formula_275: in this way we have defined a sequence formula_276 such that formula_277 by construction formula_278 but formula_279, which contradicts the hypothesis of sequential continuity. formula_280 Closure operator and interior operator definitions. In terms of the interior and closure operators, we have the following equivalences, "Proof."i ⇒ ii. Fix a subset formula_281 of formula_235 Since formula_283 is open. and formula_45 is continuous, formula_285 is open in formula_286 As formula_287 we have formula_288 By the definition of the interior, formula_289 is the largest open set contained in formula_290 Hence formula_291 ii ⇒ iii. Fix formula_292 and let formula_293 Suppose to the contrary that formula_294 then we may find some open neighbourhood formula_197 of formula_52 that is disjoint from formula_297. By ii, formula_298 hence formula_222 is open. Then we have found an open neighbourhood of formula_49 that does not intersect formula_301, contradicting the fact that formula_293 Hence formula_303 iii ⇒ i. Let formula_304 be closed. Let formula_305 be the preimage of formula_306 By iii, we have formula_307 Since formula_308 we have further that formula_309 Thus formula_310 Hence formula_311 is closed and we are done. If we declare that a point formula_49 is a subset formula_313 if formula_314 then this terminology allows for a plain English description of continuity: formula_45 is continuous if and only if for every subset formula_316 formula_45 maps points that are close to formula_318 to points that are close to formula_319 Similarly, formula_45 is continuous at a fixed given point formula_179 if and only if whenever formula_49 is close to a subset formula_316 then formula_52 is close to formula_319 Instead of specifying topological spaces by their open subsets, any topology on formula_169 can alternatively be determined by a closure operator or by an interior operator. Specifically, the map that sends a subset formula_318 of a topological space formula_169 to its topological closure formula_301 satisfies the Kuratowski closure axioms. Conversely, for any closure operator formula_330 there exists a unique topology formula_331 on formula_169 (specifically, formula_333) such that for every subset formula_316 formula_335 is equal to the topological closure formula_336 of formula_318 in formula_338 If the sets formula_169 and formula_340 are each associated with closure operators (both denoted by formula_341) then a map formula_224 is continuous if and only if formula_343 for every subset formula_344 Similarly, the map that sends a subset formula_318 of formula_169 to its topological interior formula_347 defines an interior operator. Conversely, any interior operator formula_348 induces a unique topology formula_331 on formula_169 (specifically, formula_351) such that for every formula_316 formula_353 is equal to the topological interior formula_354 of formula_318 in formula_338 If the sets formula_169 and formula_340 are each associated with interior operators (both denoted by formula_359) then a map formula_224 is continuous if and only if formula_361 for every subset formula_362 Filters and prefilters. Continuity can also be characterized in terms of filters. A function formula_224 is continuous if and only if whenever a filter formula_229 on formula_169 converges in formula_169 to a point formula_226 then the prefilter formula_368 converges in formula_340 to formula_250 This characterization remains true if the word "filter" is replaced by "prefilter." Properties. If formula_224 and formula_372 are continuous, then so is the composition formula_373 If formula_224 is continuous and The possible topologies on a fixed set "X" are partially ordered: a topology formula_375 is said to be coarser than another topology formula_376 (notation: formula_377) if every open subset with respect to formula_375 is also open with respect to formula_379 Then, the identity map formula_380 is continuous if and only if formula_377 (see also comparison of topologies). More generally, a continuous function formula_382 stays continuous if the topology formula_383 is replaced by a coarser topology and/or formula_384 is replaced by a finer topology. Homeomorphisms. Symmetric to the concept of a continuous map is an open map, for which of open sets are open. If an open map "f" has an inverse function, that inverse is continuous, and if a continuous map "g" has an inverse, that inverse is open. Given a bijective function "f" between two topological spaces, the inverse function formula_385 need not be continuous. A bijective continuous function with a continuous inverse function is called a . If a continuous bijection has as its domain a compact space and its codomain is Hausdorff, then it is a homeomorphism. Defining topologies via continuous functions. Given a function formula_386 where "X" is a topological space and "S" is a set (without a specified topology), the final topology on "S" is defined by letting the open sets of "S" be those subsets "A" of "S" for which formula_387 is open in "X". If "S" has an existing topology, "f" is continuous with respect to this topology if and only if the existing topology is coarser than the final topology on "S". Thus, the final topology is the finest topology on "S" that makes "f" continuous. If "f" is surjective, this topology is canonically identified with the quotient topology under the equivalence relation defined by "f". Dually, for a function "f" from a set "S" to a topological space "X", the initial topology on "S" is defined by designating as an open set every subset "A" of "S" such that formula_388 for some open subset "U" of "X". If "S" has an existing topology, "f" is continuous with respect to this topology if and only if the existing topology is finer than the initial topology on "S". Thus, the initial topology is the coarsest topology on "S" that makes "f" continuous. If "f" is injective, this topology is canonically identified with the subspace topology of "S", viewed as a subset of "X". A topology on a set "S" is uniquely determined by the class of all continuous functions formula_389 into all topological spaces "X". Dually, a similar idea can be applied to maps formula_390 Related notions. If formula_391 is a continuous function from some subset formula_392 of a topological space formula_169 then a of formula_45 to formula_169 is any continuous function formula_396 such that formula_397 for every formula_398 which is a condition that often written as formula_399 In words, it is any continuous function formula_396 that restricts to formula_45 on formula_402 This notion is used, for example, in the Tietze extension theorem and the Hahn–Banach theorem. If formula_391 is not continuous, then it could not possibly have a continuous extension. If formula_340 is a Hausdorff space and formula_392 is a dense subset of formula_169 then a continuous extension of formula_391 to formula_232 if one exists, will be unique. The Blumberg theorem states that if formula_409 is an arbitrary function then there exists a dense subset formula_14 of formula_15 such that the restriction formula_412 is continuous; in other words, every function formula_413 can be restricted to some dense subset on which it is continuous. Various other mathematical domains use the concept of continuity in different but related meanings. For example, in order theory, an order-preserving function formula_224 between particular types of partially ordered sets formula_169 and formula_340 is continuous if for each directed subset formula_318 of formula_232 we have formula_419 Here formula_420 is the supremum with respect to the orderings in formula_169 and formula_422 respectively. This notion of continuity is the same as topological continuity when the partially ordered sets are given the Scott topology. In category theory, a functor formula_423 between two categories is called if it commutes with small limits. That is to say, formula_424 for any small (that is, indexed by a set formula_425 as opposed to a class) diagram of objects in formula_426. A is a generalization of metric spaces and posets, which uses the concept of quantales, and that can be used to unify the notions of metric spaces and domains. In measure theory, a function formula_427 defined on a Lebesgue measurable set formula_428 is called approximately continuous at a point formula_429 if the approximate limit of formula_45 at formula_43 exists and equals formula_64. This generalizes the notion of continuity by replacing the ordinary limit with the approximate limit. A fundamental result known as the Stepanov-Denjoy theorem states that a function is measurable if and only if it is approximately continuous almost everywhere.