Intereting Posts

A stronger version of discrete “Liouville's theorem”
Short calculation of the dilogarithm?
How to analyze convergence and sum of a telescopic series? I can't find a generic form
How can $p^{q+1}+q^{p+1}$ be a perfect square?
Indefinite summation of polynomials
Nth root of Unity
A Bernoulli number identity and evaluating $\zeta$ at even integers
Geometric basis for the real numbers
sum of this series: $\sum_{n=1}^{\infty}\frac{1}{4n^2-1}$
Integer induction without infinity
What is the class of topological spaces $X$ such that the functors $\times X:\mathbf{Top}\to\mathbf{Top}$ have right adjoints?
Jacobian matrix rank and dimension of the image
Most efficient way to integrate $\int_0^\pi \sqrt{4\sin^2 x – 4\sin x + 1}\,dx$?
The extension of a premeasure on a semiring $J$ to the borel sets
Is $M_g$ NEVER proper? And why does $T_g$ contain products?

Assume that $(X,d)$ is compact, and that $f: X \to X$ is continuous. Show that the function $g(x) = d(x,f(x))$ is continuous and has a minimum point.

Consider the function $g(x) = d(x,f(x))$. If $g$ is continuous, then $\forall \epsilon >0 \ \exists \delta > 0$ such that $$d(x,y) < \delta \implies d(g(x), g(y)) < \epsilon.$$ Since $f$ is continuous and that $X$ is compact, we have that $f: X \to X$ is uniformly continuous. Therefore, $\forall \epsilon > 0 \ \exists \delta > 0 \ \text{such that} \ d(x,y) < \delta \implies d(f(x),f(y))< \epsilon.$

But how do we go on from here, considering $d(g(x),g(y)) = d(d(x,f(x)),d(y,f(y)))$ gets quite messy?

- How to prove that the closed convex hull of a compact subset of a Banach space is compact?
- compact and locally Hausdorff, but not locally compact
- the diameter of nested compact sequence
- Need a unique convergence (UC) space's Alexandrov extension be a UC space?
- Prove that $ S=\{0\}\cup\left(\bigcup_{n=0}^{\infty} \{\frac{1}{n}\}\right)$ is a compact set in $\mathbb{R}$.
- Is a discrete set inside a compact space necessarily finite?

- Show that $f(x) = 0$ for all $x \in \mathbb{R}$
- Uses of step functions
- To show that the supremum of any collection of lower semicontinuous functions is lower semicontinuous
- Why is $\lim_{x \to c}g(f(x)) = g(\lim_{x \to c}f(x))$
- $\varepsilon - \delta$ proof that $f(x) = x^2 - 2$ is continuous - question concerning the initial choice of $\delta$
- Proving that the Union of Two Compact Sets is Compact
- Continuous function from a connected set?
- Quasicomponents and components in compact Hausdorff space
- Example of a function $f$ which is nowhere continuous but $|f|$ should be continuous at all points
- Metrizability of a compact Hausdorff space whose diagonal is a zero set

As noted in the comments, $g: X \rightarrow \mathbb R$. Drawing a picture can be helpful. Since $f$ is continuous, when $x$ and $y$ are close to eachother $f(x)$ and $f(y)$ are close to each other, so $d(x, f(x))$ and $d(y,f(y))$ cannot differ by a large amount. We can formalize an argument as follows, using the triangle inequality, naturally:

$d(x,f(x)) \leq d(f(x), f(y)) + d(x,f(y)) \leq d(f(x), f(y)) + d(x,y) + d(y,f(y)).$

Similarly,

$d(y,f(y))) \leq d(f(x), f(y)) + d(x,y) + d(x,f(x)).$

It follows that

$|d(x,f(x)) – d(y,f(y))| \leq d(f(x), f(y)) + d(x,y).$

Now take $\min(\epsilon, \delta)$ as your $\delta$ (the $\delta$ comes from the uniform continuity of $f$). So $g$ is continuous. Since $X$ is compact, it attains a minimum.

You could also do this in steps:

- First you could show that the map $$(x,x)\mapsto (x,f(x))$$ is a continuous function from $X\times X$ to $X\times X$.
- Then you could show that $$(x,y)\mapsto d(x,y)$$ is a continuous function from $X\times X$ to $\mathbb R$.
- Your function $g$ is the composition of the above two functions. Composition of continuous function is continuous.

Remark: If this is your first encounter with metric spaces, then you are probably expected to use $\epsilon$-$\delta$ definition and work directly with the map $g(x)$. Later, as you learn more about topological space (in particular, when you learn about products spaces) this approach will seem more natural to you.

The claim from the first bullet point can be generalized: Show that if $f,g$ are continuous then so is $f\times g$.

The claim from the second bullet point was discussed in several posts here on math.SE. For example, Metric is continuous function.

- Unions and intersections: $(A \cup B = A ∪ C) \land (A \cap B = A ∩ C) \implies B = C.$
- Is $\lim_{n \rightarrow \infty} a_{n+1}/a_n=L \implies \lim_{n \rightarrow \infty} \sqrt {a_n}=L$ true? If not, is there a counter example?
- difference between maximal element and greatest element
- How do I prove this method of determining the sign for acute or obtuse angle bisector in the angle bisector formula works?
- How to find the closed form of the integral$\int_{0}^{\infty}f(x)\frac{\sin^nx}{x^m}dx$
- Why is the condition enough for a matrix to be diagonalizable?
- Partitions of $n$ into distinct odd and even parts proof
- Interesting calculus problems of medium difficulty?
- Modulus of Fraction
- Integration with exponential constant
- Value of Summation of $\log(n)$
- Does there exist an unbounded function that is uniformly continuous?
- Do all Groups have a representation?
- About the proof that lebesgue measure is a premeasure.
- On the spectrum of a product in a Banach algebra, in specific case