In mathematical analysis, the **intermediate value theorem** states that if is a continuous function whose domain contains the interval [*a*, *b*], then it takes on any given value between and at some point within the interval.

This has two important corollaries:

This captures an intuitive property of continuous functions over the real numbers: given * continuous on with the known values and , then the graph of must pass through the horizontal line while moves from to . It represents the idea that the graph of a continuous function on a closed interval can be drawn without lifting a pencil from the paper.
*

The intermediate value theorem states the following:

Consider an interval of real numbers and a continuous function . Then

*Version I.*if is a number between and , that is,then there is a such that .*Version II.*the image set is also an interval (closed), and it contains ,

**Remark:** *Version II* states that the set of function values has no gap. For any two function values with , even if they are outside the interval between and , all points in the interval are also function values,

A subset of the real numbers with no internal gap is an interval.

The theorem depends on, and is equivalent to, the completeness of the real numbers. The intermediate value theorem does not apply to the rational numbers **Q** because gaps exist between rational numbers; irrational numbers fill those gaps. For example, the function for satisfies and . However, there is no rational number such that , because is an irrational number.

The theorem may be proven as a consequence of the completeness property of the real numbers as follows:^{[3]}

We shall prove the first case, . The second case is similar.

Let be the set of all such that . Then is non-empty since is an element of . Since is non-empty and bounded above by , by completeness, the supremum exists. That is, is the smallest number that is greater than or equal to every member of .

Note that, due to the continuity of at , we can keep within any of by keeping sufficiently close to . Since is a strict inequality, consider the implication when is the distance between and . No sufficiently close to can then make greater than or equal to , which means there are values greater than in . A more detailed proof goes like this:

Choose . Then such that ,

.

Consider the interval . Notice that and every satisfies the condition . Therefore for every we have . Hence cannot be .

Likewise, due to the continuity of at , we can keep within any of by keeping sufficiently close to . Since is a strict inequality, consider the similar implication when is the distance between and . Every sufficiently close to must then make greater than , which means there are values smaller than that are upper bounds of . A more detailed proof goes like this:

Choose . Then such that ,

.

Consider the interval . Notice that and every satisfies the condition . Therefore for every we have . Hence cannot be .

With and , it must be the case . Now we claim that .

Fix some . Since is continuous at , such that , .

Since and is open, such that . Set . Then we have

for all . By the properties of the supremum, there exists some that is contained in , and so

Picking , we know that because is the supremum of . This means that

Both inequalities

are valid for all , from which we deduce as the only possible value, as stated.

**Remark:** The intermediate value theorem can also be proved using the methods of non-standard analysis, which places "intuitive" arguments involving infinitesimals on a rigorous^{[clarification needed]} footing.^{[4]}

A form of the theorem was postulated as early as the 5th century BCE, in the work of Bryson of Heraclea on squaring the circle. Bryson argued that, as circles larger than and smaller than a given square both exist, there must exist a circle of equal area.^{[5]} The theorem was first proved by Bernard Bolzano in 1817. Bolzano used the following formulation of the theorem:^{[6]}

Let be continuous functions on the interval between and such that and . Then there is an between and such that .

The equivalence between this formulation and the modern one can be shown by setting to the appropriate constant function. Augustin-Louis Cauchy provided the modern formulation and a proof in 1821.^{[7]} Both were inspired by the goal of formalizing the analysis of functions and the work of Joseph-Louis Lagrange. The idea that continuous functions possess the intermediate value property has an earlier origin. Simon Stevin proved the intermediate value theorem for polynomials (using a cubic as an example) by providing an algorithm for constructing the decimal expansion of the solution. The algorithm iteratively subdivides the interval into 10 parts, producing an additional decimal digit at each step of the iteration.^{[8]} Before the formal definition of continuity was given, the intermediate value property was given as part of the definition of a continuous function. Proponents include Louis Arbogast, who assumed the functions to have no jumps, satisfy the intermediate value property and have increments whose sizes corresponded to the sizes of the increments of the variable.^{[9]}
Earlier authors held the result to be intuitively obvious and requiring no proof. The insight of Bolzano and Cauchy was to define a general notion of continuity (in terms of infinitesimals in Cauchy's case and using real inequalities in Bolzano's case), and to provide a proof based on such definitions.

A Darboux function is a real-valued function f that has the "intermediate value property," i.e., that satisfies the conclusion of the intermediate value theorem: for any two values a and b in the domain of f, and any y between *f*(*a*) and *f*(*b*), there is some c between a and b with *f*(*c*) = *y*. The intermediate value theorem says that every continuous function is a Darboux function. However, not every Darboux function is continuous; i.e., the converse of the intermediate value theorem is false.

As an example, take the function *f* : [0, ∞) → [−1, 1] defined by *f*(*x*) = sin(1/*x*) for *x* > 0 and *f*(0) = 0. This function is not continuous at *x* = 0 because the limit of *f*(*x*) as x tends to 0 does not exist; yet the function has the intermediate value property. Another, more complicated example is given by the Conway base 13 function.

In fact, Darboux's theorem states that all functions that result from the differentiation of some other function on some interval have the intermediate value property (even though they need not be continuous).

Historically, this intermediate value property has been suggested as a definition for continuity of real-valued functions;^{[10]} this definition was not adopted.

The Poincaré-Miranda theorem is a generalization of the Intermediate value theorem from a (one-dimensional) interval to a (two-dimensional) rectangle, or more generally, to an *n*-dimensional cube.

Vrahatis^{[11]} presents a similar generalization to triangles, or more generally, *n*-dimensional simplices. Let *D ^{n}* be an

- For all
*i*in 1,...,*n*, the sign of*f*(_{i}*v*) is opposite to the sign of_{i}*f*(_{i}*x*) for all points*x*on the face opposite to*v*;_{i} - The sign-vector of
*f*_{1},...,*f*on_{n}*v*_{0}is not equal to the sign-vector of*f*_{1},...,*f*on all points on the face opposite to_{n}*v*._{0}

Then there is a point *z* in the interior of *D ^{n}* on which

It is possible to normalize the *f _{i}* such that

- For all
*i*in 1,...,*n*,*f*(_{i}*v*)>0, and_{i}*f*(_{i}*x*)<0 for all points*x*on the face opposite to*v*. In particular,_{i}*f*(_{i}*v*)<0._{0} - For all points
*x*on the face opposite to*v*,_{0}*f*(_{i}*x*)>0 for at least one*i*in 1,...,*n.*

The theorem can be proved based on the Knaster–Kuratowski–Mazurkiewicz lemma. In can be used for approximations of fixed points and zeros.^{[12]}

The intermediate value theorem is closely linked to the topological notion of connectedness and follows from the basic properties of connected sets in metric spaces and connected subsets of **R** in particular:

- If and are metric spaces, is a continuous map, and is a connected subset, then is connected.
- A subset is connected if and only if it satisfies the following property: .

In fact, connectedness is a topological property and generalizes to topological spaces: *If and are topological spaces, is a continuous map, and is a connected space, then is connected.* The preservation of connectedness under continuous maps can be thought of as a generalization of the intermediate value theorem, a property of real valued functions of a real variable, to continuous functions in general spaces.

Recall the first version of the intermediate value theorem, stated previously:

**Intermediate value theorem** (*Version I*) — Consider a closed interval in the real numbers and a continuous function . Then, if is a real number such that , there exists such that .

The intermediate value theorem is an immediate consequence of these two properties of connectedness:^{[13]}

By , is a connected set. It follows from that the image, , is also connected. For convenience, assume that . Then once more invoking , implies that , or for some . Since , must actually hold, and the desired conclusion follows. The same argument applies if , so we are done. Q.E.D.

The intermediate value theorem generalizes in a natural way: Suppose that X is a connected topological space and (*Y*, <) is a totally ordered set equipped with the order topology, and let *f* : *X* → *Y* be a continuous map. If a and b are two points in X and u is a point in Y lying between *f*(*a*) and *f*(*b*) with respect to <, then there exists c in X such that *f*(*c*) = *u*. The original theorem is recovered by noting that **R** is connected and that its natural topology is the order topology.

The Brouwer fixed-point theorem is a related theorem that, in one dimension, gives a special case of the intermediate value theorem.

In constructive mathematics, the intermediate value theorem is not true. Instead, one has to weaken the conclusion:

- Let and be real numbers and be a pointwise continuous function from the closed interval to the real line, and suppose that and . Then for every positive number there exists a point in the unit interval such that .
^{[14]}

A similar result is the Borsuk–Ulam theorem, which says that a continuous map from the -sphere to Euclidean -space will always map some pair of antipodal points to the same place.

Take to be any continuous function on a circle. Draw a line through the center of the circle, intersecting it at two opposite points and . Define to be . If the line is rotated 180 degrees, the value −*d* will be obtained instead. Due to the intermediate value theorem there must be some intermediate rotation angle for which *d* = 0, and as a consequence *f*(*A*) = *f*(*B*) at this angle.

In general, for any continuous function whose domain is some closed convex -dimensional shape and any point inside the shape (not necessarily its center), there exist two antipodal points with respect to the given point whose functional value is the same.

The theorem also underpins the explanation of why rotating a wobbly table will bring it to stability (subject to certain easily met constraints).^{[15]}