# Domain of a continuous function

Question: Let $S \subset \mathbb{R}$ . Consider the statement :

"There exists a continuous function $f : S \to S$ such that $f(x) \neq x$ for all $x \in S$"

This statement is false if $S$ equals :

A) $[2,3]$ B) $(2,3]$ C) $[-3,-2] \cup [2,3]$ D) $(-\infty, \infty)$

My approach:

I am able to verify that for Options C) and D), there exist continuous functions $f : S \to S$ satisfying the criteria.

For C), let $f(x)=-x$, then $f:S \to S$ and $f(x) \neq x$ for all $x \in S$, hence the statement is true.

For D), let $f(x)=x+1$, which clearly makes the statement true.

In case of Option A), I visualise the function as any continuous curve that is enclosed between the lines $x=2, x=3$ and $y=2, y=3$. Clearly, it has to cut the line $y=x$ hence for every $f$, there is one $x \in S$ such that $f(x)=x$ and hence the statement is false.

[The hand-drawn red-blue-green curves in the square are the examples of continuous functions $f: [2,3] \to [2,3]$ which demonstrably cut the $y=x$ line]

However, the same line of reasoning fails to discern the subtle difference between Option A) and Option B).

Hence, I am confused between options A) and B). How does the difference of a open-vs-closed interval make a difference in the falsity of the statement?

For B consider $f(x)=2+\frac12(x-2)$. This avoids the intersection that must occur in case A by pushing it to the missing point $2$.

• (+1) Aha! This is really beautiful. It just shoots above $2$ and never intersects the $y=x$ line. Commented Apr 22, 2018 at 17:33
• With D, C and B all excluded, we can safely pick A. But if we want to make sure the problem is posed correctly, we need proof that any continuous function from a compact interval to the same interval has a fixed point. This is a bit hard to prove but follows from the intermediate value theorem, see Wikipedia Brouwer fixed-point theorem § One-dimensional case. Commented Apr 22, 2018 at 17:56
• @JeppeStigNielsen Thanks! I've looked into it Commented Apr 22, 2018 at 18:49

Let $f:[2,3]\to [2,3]$ and $g:x\mapsto f (x)-x$.

$f$ is continuous at the compact $S=[2,3]$ then $g$ is continuous.

$$g (2)=f (2)-2\ge 0$$ $$g (3)=f (3)-3\le 0$$ thus by IVT, there exists $c\in S \;:g (c)=0$.

Let $F:(2,3]\to (2,3]$ defined by $$F (x)=1+\frac {x}{2}$$

then $$(\forall x\in (2,3])\;\; F (x)\neq x$$

• This clears up things, but I'm afraid I still fail to understand why $(2,3]$ should satisfy. As you can see, I did intuit that there exists a function for $S=[2,3]$ for which $f(x)=x$. Commented Apr 22, 2018 at 17:30
• (+1)Thanks, I get it now! Commented Apr 22, 2018 at 17:34