Show that if $K_1$ and $K_2$ are compact subsets of $\mathbb R^p$, then there exist points $x_1$ in $K_1$ and $x_2$ in $K_2$ such that if $z_1$ belongs to $K_1$ and $z_2$ belongs to $K_2$, then $|z_1-z_2| \geq |x_1-x_2|$.
Attempt:
Since, $K_1$ and $K_2$ are two compact subsets of $\mathbb R^p \implies K_1.K_2$ are closed and bounded.
Then, by using the nearest point theorem :If $x_1 \in K_1. \exists~ x_2 \in K_2$ such that
$|x_1-x_2| \leq |x_1-z_2|~\forall~z_2 \in K_2$
How do I move forward? I have not been able to use the fact that $K_1,K_2$ are compact.
Thank you for your help
Let $f(x) = d(x,K_1) = \inf_{z \in K_1} d(x,z)$, then this is a continuous on $\mathbb{R}^p$. Restricting $f$ to $K_2$, there exists $x_2 \in K_2$ such that $\inf_{y \in K_2} d(y,K_1) = d(x_2,K_1)$, since a continuous function on a compact set achieves a minimum on the compact set. Similarly, define $g(x) = d(x_2,x)$, then restricting $g$ to $K_1$ gives the existence of $x_1 \in K_1$ such that $d(x_2,x_1) = \inf_{y \in K_1} d(x_1,y)$. In particular, $d(x_1,x_2) = \inf_{\substack{y \in K_1 \\ z \in K_2 }} d(y,z)$, so given any $z_1 \in K_1$ and $z_2 \in K_2$, $$ d(x_1,x_2) = \inf_{\substack{y \in K_1 \\ z \in K_2}} d(y,z) \leq d(z_1,z_2). $$