Show that the only intervals having the fixed point property are the closed intervals. By Fixed Point Theorem, I know that it deals with closed interval, for example $[0,1]$. And this theorem will be false if $[0,1]$ is replaced by $(0,1)$. A counter-example is $f:(0,1)\rightarrow (0,1)$ and $f(x)=x/2$.
I have no idea to show the only intervals are the closed intervals. How to show that it is "ONLY"?
 A: It suffices to analyse the cases $(0,1)$, $(0,1]$ and $[0,1]$, since any other interval (including the $\infty$ cases) is homeomorphic to one of those, and the "fixed point property" is invariant under homeomorphism.*
The case $[0,1]$ follows easily from the intermediate value theorem applied to $f(x)-x$.
To see that $(0,1)$ and $(0,1]$ do not satisfy it, take your function $f(x)=x/2$.

*To see this, let $A$ be a topological space with the FPP and $B$ an homeomorphic topological space, where the homeomorphism is $f:A \to B$. Let $g: B \to B$ be a continuous map. Then $f^{-1}gf$ is a continuous map from $A$ to $A$, hence has a fixed point $p$. Therefore, $f^{-1}(g(f(p)))=p \implies g(f(p))=f(p)$ and we have that $f(p)$ is a fixed point of $g$.
A: I presume you are talking about the fact that any continuous function $f:[a,b] \to [a,b]$ has a fixed point? 
You have the right idea with your counterexample to the case $[0,1]$.
The standard proof is to let $g(x)=f(x)-x$, note that $f(a) \geq a$ and $f(b) \leq b$, from which we get $g(a) \leq 0$ and $g(b) \geq 0$, then apply the intermediate value theorem to conclude that there is some $c \in [a,b]$ for which $g(c)=0$, which implies $f(c)=c$. However, this $c$ could be one of $a$ or $b$, hence the proof fails if we are only considering the open interval $(a,b)$. 
So, if you assume that there exists an open interval $(a,b)$ for which every continuous function $f:(a,b) \to (a,b)$ has a fixed point, you can easily construct a counterexample by constructing a function for which $f(a)=a$, but $f(x) \neq x$ for any $x \in (a,b)$. For example, $f(x)=\frac{x}{2}+\frac{a}{2}$. 
Similarly for half open intervals $(a,b]$ or $[a,b)$: $f(x) = \frac{x}{2}+\frac{a}{2}$ again and $f(x)=\frac{x}{2}+\frac{b}{2}$ work, respectively. 
