Prove that a function from a compact interval in R to itself has at least one fixed point without the intermediate value theorem. Hey I'm studying for my qualifying exam using Carothers' Real Analysis. I came across this problem. Let $f: [a, b] \rightarrow [a, b]$ be continuous. Prove that $f$ has at least one fixed point without using the intermediate value theorem. I'm guessing it has something to do with compactness as it is in the compactness chapter. As a hint it says consider $g(x) = \lvert x - f(x)\rvert$. Now I know this function is continuous as it is a distance function, so $g([a,b])$ is a compact interval of $[0, b-a]$, but why must it contain 0?
 A: Let $d(x) = x - f(x)$ and $g(x) = \lvert d(x) \rvert$. Both functions are continuous.
$g([a,b])$ is compact, hence it attains its minimum $m \ge 0$ at some $\xi \in [a,b]$.
Assume that $m > 0$. Then $q(x) = d(x)/g(x)$ is well-defined and continuous. We have $\lvert q(x) \rvert \equiv 1$, thus $q(x) \in \{-1,+1\}$ for all $x$. We conclude that the preimages $q^{-1}(\pm 1)$ are disjoint open subsets of $[a,b]$. Hence one of these sets must be empty since $[a,b]$ is connected. In other words, $q(x) \equiv c \in \{-1,+1\}$. Thus
$$d(x) = cg(x) .$$
If $c = +1$, then $a - f(a) = d(a) = g(a) \ge m > 0$, i.e. $f(a) < a$ which is impossible.
If $c = -1$, then $b - f(b) = d(b) = -g(b) \le -m < 0$, i.e. $f(b) > b$ which is impossible.
Therefore $m > 0$ leads to a contradiction and we conclude $m = 0$. Hence $\xi$ is a fixed point of $f$.
Edited:
The use of $g(x)$ seems to be artificial and unnecessary. It was an attempt to use the hint in your question.
A: Questions like this one, and their solutions, are so deeply interwoven with the intermediate value theorem, and it itself is such a fundamental result, the proof of which depends on fundamental properties of the reals $\Bbb R$ and its usual topology, that addressing such problems as this almost inevitability leads to the IVT or an equivalent.  Here I will use the connectedness of the interval $[a, b]$, which may also be used to prove the IVT--see this Wikipedia page.
So let 
$f:[a, b] \to [a, b] \tag 1$ 
be continuous; if we assume 
$\not \exists x \in [a, b], \; f(x) = x, \tag 2$
then we must indeed have
$f(a) > a, \; f(b) < b; \tag 3$
thus the continuous function
$g(x) = f(x) - x \tag 4$
satisfies
$g(a) > 0, \; g(b) < 0, \tag 5$
and
$g(x) \ne 0, \; \forall x \in [a, b]. \tag 6$
We next introduce the two sets
$A = \{x \in [a, b], \; g(x) > 0\} \tag 7$
and 
$B = \{x \in [a, b], \; g(x) < 0\}; \tag 8$
it follows from (5) that 
$A \ne \emptyset \ne B; \tag 9$
the continuity of $g(x)$ implies that $A$ and $B$ are open; furthermore, 
$A \cap B = \emptyset, \tag{10}$
since $g(x)$ takes on opposite signs on $A$ and $B$; finally, $g(x) \ne 0$ implies every $x \in [a, b]$ is in either $A$ or $B$; thus
$A \cup B = [a, b]. \tag{11}$
We have now exhibited $[a, b]$ as a disjoint union of the two opens $A$ and $B$; but this contradicts the connectedness of $[a, b]$; therefore we must have some $x \in [a, b]$ with
$g(x) = f(x) - x = 0; \tag{12}$
that is,
$\exists x \in [a, b], \; f(x) = x. \tag{13}$
Note Added in Edit, Tuesday 17 September 2019 9:58 AM PST:  I fail to see how the compactness of the interval $[a, b]$ is essential to this demonstration.  Connectedness, yes; compactness, ???.  End of Note.
A: As Robert Lewis has pointed out in his answer, the IVT can be regarded as an immediate consequence of the connectedness of intervals.
Let us have a systematic look at the relationship between connectedness, fixed point property and IVT.
Proposition 1. The following are equivalent for a compact subset $C \subset \mathbb R$:


*

*$C$ is connected.

*Each continuous map $f : C \to C$ has a fixed point.
Note that this does not involve the notion of an interval.
$1. \Rightarrow 2.$ : Since $C$ is compact, $m_+ = \max C, m_- = \min C$ are well-defined points of $C$. Let $C_+ = \{ x \in C \mid x < f(x) \}$, $C_- = \{ x \in C \mid x > f(x) \}$, $C_0 = \{ x \in C \mid x = f(x) \}$. Then $C$ is the disjoint union of $C_+, C_-, C_0$. It is easy to verify that $C_+, C_-$ are open in $C$. Now assume that $C_0 = \emptyset$. Then, since $C$ is connected, either $C_+ = C$ or $C_- = C$. If $C_+ = C$ we have $m_+ < f(m_+) \in C$ which is impossible, and if $C_- = C$ we have $m_- > f(m_-) \in C$ which is also impossible. We conclude that $C_0$ must be non-empty.
$2. \Rightarrow 1.$ : Assume that $C$ is not connected. Then $C = U \cup V$ with disjoint non-empty open $U, V \subset C$. Choose $u  \in U,v \in V$ and define $f : C \to C, f(x) = \begin{cases} v & x  \in U \\ u & x \in V \end{cases} \quad$. This is a continuous map without a fixed point, a contradiction.
Now we come to intervals. A subset $J \subset \mathbb R$ is an interval if any number that lies between two numbers in $J$ also belongs to $J$. See https://en.wikipedia.org/wiki/Interval_(mathematics).
Fact 1. Each interval is connected.
The (a bit technical) proof is well-known.
Fact 2. Each connected subset of $\mathbb R$ is an interval.
This is obvious. If $J$ is connected and $a < \xi  < b$ with $a, b \in J$, then if $\xi \notin J$ we would get $C = J \cap (-\infty,\xi) \cup J \cap (\xi,\infty)$ which is impossible.
With these two facts we can prove
Proposition 2. The following are equivalent for a subset $C \subset \mathbb R$:


*

*$C$ is compact and connected.

*$C$ is a closed interval $[a,b]$.

*Each continuous map $f : C \to C$ has a fixed point.
$1.$ and $2.$ are clearly equivalent and imply $3$.
$3. \Rightarrow 1.$ : Assume that $C$ is not connected or not compact. If it is not connected, then the proof of Proposition 1 produces a contradiction. So it remains to consider a connected, but not compact $C$. It must be an open or half-open interval (which may be bounded or unbounded). If $C = \langle a,\infty)$, where $\langle$ stands for $[$ or $($, then $f : C \to C, f(x) = x+1$, does not have a fixed point. If $C = \langle a,b)$, then define a homeomorphism $h : C \to \langle 0,\infty), h(x) = \dfrac{x-a}{b-x}$. Now $f(x) = h^{-1}(h(x) +1)$ does not have a fixed point. The other cases are treated similar and show that our assumption leads to a contradiction.
So far we did not explicitly consider images of connected sets under continuous maps.
Fact 3. Let $f : X \to Y$ be a continuous map between topological spaces. If $X$ is connected, then $f(X)$ is connected.
This is well-known.
Fact 4. Let $f : X \to \mathbb R$ be a continuous map. If $X$ is connected, then $f(X)$ is an interval.
This follows from Facts 2 and 3. It can also be viewed as a generalization of Fact 2 (the latter is obtained from Fact 4 by considering the subspace-inclusion $i : C \to \mathbb R$). Fact 4 can alternatively be proved as Fact 2 (without using Fact 3): Let $a < \xi < b$ with $a, b \in f(X)$. If $\xi \notin f(X)$, then we get $X = U \cup V$, where $U = f^{-1}((-\infty,\xi))$ and $V = f^{-1}((\xi,\infty))$ are nonempty open subsets of $X$. This is impossible.
Proposition 3. The following are equivalent for a subset $C \subset \mathbb R$:


*

*$C$ is connected.

*$C$ is an interval.

*For each continuous $f : C \to \mathbb R$, the set $f(C)$ is connected.

*For each continuous $f : C \to \mathbb R$, the set $f(C)$ is an interval.

*(IVT for $C$) For each continuous $f : C \to \mathbb R$, if $a, b \in C$ and $y$ is between $f(a)$ and $f(b)$, then $y \in f(C)$.
$1. \Leftrightarrow 2.$ and $3. \Leftrightarrow  4.$ are reformulations of Facts 1,2.
$4. \Leftrightarrow 5.$ is obvious by the definition of an interval.
$5. \Rightarrow 1.$ : We can use the same proof as in Proposition 1, $2. \Rightarrow 1.$
In my opinion Propositions 1,2 are independent from the IVT. Their proofs are based only on compactness and connectedness and the characterization of intervals as connected subsets of $\mathbb  R$, but do not invoke Fact 3 or Fact 4. The proof of the IVT is based on connectedness, the characterization of intervals as connected subsets of $\mathbb  R$ and Fact 3 resp. Fact 4. Putting it bold and simple: The IVT is a special case of Fact 4.
Thus, your request of giving a proof "without using the IVT" should be interpreted in the sense "without using Fact 3 resp. Fact 4". This applies to all previous answers except my first answer. 
Remark:
Usually the IVT is stated in the following form:
If $f : [a,b] \to \mathbb R$ is continuous, then for each $y$ between $f(a)$ and $f(b)$ there exists $x \in [a,b]$ such that $f(x) = y$.
This is the IVT for closed intervals $C$, but this special case immediately implies the IVT for arbitrary intervals $C$.
A: If $f(a) = a$ or $f(b) = b$, we are done. So let us assume that $f(a) > a$ and $f(b) < b$. Define $g(x) = x - f(x)$. This is a continuous map, hence $J = g([a,b])$ is a (compact) interval. We have $g(a) < 0$ and $g(b) > 0$. Since $[g(a),g(b)] \subset J$, we see that $0  \in J$.
