I know that if $f: [a,b] \to [a,b]$ is continuous then by the intermediate value theorem it must have a fixed point. However, I recently saw this theorem stating that given a continuous function $f: \mathbb{R}^n \to \mathbb{R}^n $, if there is some $M >0$ such that $x \in B(0,M): d_2(x,f(x)) < \epsilon$ for every $\epsilon > 0$. Then $f$ has a fixed point.
Intuitively I would say that the fixed point is $x$. But I wouldn't know how to actually show that $f(x) - x = 0$. Any hints?
Let's prove the following :
Let $X$ is a compact metric space, and $f : X \rightarrow X$ a continuous function such that for every $\varepsilon > 0$, there exists $x \in X$ such that $d(x,f(x)) < \varepsilon$. Then $f$ has a fixed point.
Proof : Let $F : X \rightarrow \mathbb{R}$ defined by $F(x)=d(x,f(x))$.
$F$ is continuous over the compact set $X$, therefore, $F(X)$ is compact.
But by assumption on $f$, for every $n \in \mathbb{N}^*$, there exists $x_n \in X$ such that $F(x_n) < \dfrac{1}{n}$.
The sequence $F(x_n)$ therefore converges to $0$, and since $F(X)$ is closed, then $0 \in F(X)$.
This means exactly that there exists $x \in X$ such that $F(x)=0$, i.e. such that $\boxed{f(x)=x}$.