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](https://i.stack.imgur.com/N0jpr.png)
[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$.