Suppose $(X,d)$ is a compact metric space and $f:X\to X$ a continuous map. Show that $f (A)=A$ for some nonempty $A\subseteq X.$
I start this by supposing that $A_0:=X$ and $A_{n+1}:=f(A_n)$ for all $n \geq 0$. If $A_n=A_ {n+1}$ for some $n$ then the purpose is done. But if not, how can we think further?
First, show that each of your $A_n$ is closed in $X$. It is also useful to note that $A_{n+1}\subseteq A_n$ for all $n$.
Then let $A=\cap_{i=1}^n A_n$ using $A_n$ from your definition.
Show that $f(A)=A$.
Finally, if $A$ is empty, show that $\cup_n (X\setminus A_n)$ is an open cover of $X$. Can we find a finite sub-cover of this cover?
(Alternatively, you could also use the sequence definition for compactness in metric spaces. Pick any $x_0\in X= A_0$. Define $x_{n+1}=f(x_n)$. Then $x_n\in A_n$. The sequence must have a convergent subsequence - show that limit of that subsequence is in $A_n$ for all $n$.)