Applying Extreme Value Theorem to prove existence of unique fixed point

Let $K$ be a non-empty compact subset of $\mathbb{R}^n$, and let $f:K \to K$ be a function which satisfies that $\|f(x) - f(y)\|<\|x - y \|$ for all $x,y\in K$ where $x \neq y$.

I want to prove that there exists a unique point $p \in K$ such that $f(p)= p$.

I know that the extreme value theorem can be applied in this case, but I don't see how. Would appreciate a hint.

• Uniqueness is trivial. To prove the existence, you can apply the extreme value theorem to the continuous function $\varphi(x) := \| x - f(x)\|$. – Rigel May 31 '17 at 12:23
• same as Rigel... – mwomath May 31 '17 at 12:25

Write $g(x)=\|f(x)-x\|$, there exists $p$ such that $g(p)=min_{x\in K} g(x)$. Suppose $g(p)>0$. We have $\|f(f(p))-f(p)\|<\|f(p)-p\|$. Contradiction Since $f(f(p))-f(p)=g(f(p))$.