[proofplan]
We prove the equality by proving both inequalities. First, the closed-neighbourhood characterization of Hausdorff distance says that every point of either set lies within the Hausdorff distance of the other set; taking dot products with unit vectors bounds the difference of the support functions. Conversely, a uniform bound for the difference of the support functions on the unit sphere controls the distance from any exterior point of one convex set to the other: compactness gives a nearest point, and convexity makes the direction from that nearest point to the exterior point a supporting direction. Applying this argument in both directions gives the full Hausdorff bound, and the two inequalities combine to give the formula.
[/proofplan]
[step:Bound the support functions by the Hausdorff distance]
Let
\begin{align*}
r := d_H(K,L).
\end{align*}
For each $x \in K$, define the distance-to-$L$ value by $\operatorname{dist}(x,L):=\inf_{y \in L}|x-y|$, and for each $y \in L$, define $\operatorname{dist}(y,K):=\inf_{x \in K}|x-y|$. Since $K$ and $L$ are compact and nonempty, these infima are attained. By the definition of Hausdorff distance,
\begin{align*}
\operatorname{dist}(x,L) \leq r \quad \text{for every } x \in K,
\qquad
\operatorname{dist}(y,K) \leq r \quad \text{for every } y \in L.
\end{align*}
Therefore, for every $x \in K$ there exists $y \in L$ such that $|x-y| \leq r$, and for every $y \in L$ there exists $x \in K$ such that $|x-y| \leq r$.
Fix $u \in S^{n-1}$. For every $x \in K$, choose $y \in L$ with $|x-y| \leq r$. Since $|u|=1$, the [Cauchy-Schwarz inequality](/theorems/432) gives
\begin{align*}
x \cdot u
&= y \cdot u + (x-y)\cdot u \\
&\leq y \cdot u + |x-y|\,|u| \\
&\leq h_L(u) + r.
\end{align*}
Taking the supremum over $x \in K$ gives
\begin{align*}
h_K(u) \leq h_L(u)+r.
\end{align*}
Interchanging the roles of $K$ and $L$ gives
\begin{align*}
h_L(u) \leq h_K(u)+r.
\end{align*}
Therefore
\begin{align*}
|h_K(u)-h_L(u)| \leq r.
\end{align*}
Taking the supremum over $u \in S^{n-1}$ yields
\begin{align*}
\sup_{u \in S^{n-1}} |h_K(u)-h_L(u)| \leq d_H(K,L).
\end{align*}
[guided]
Let
\begin{align*}
r := d_H(K,L).
\end{align*}
For each $x \in K$, define $\operatorname{dist}(x,L):=\inf_{y \in L}|x-y|$, and for each $y \in L$, define $\operatorname{dist}(y,K):=\inf_{x \in K}|x-y|$. The definition of Hausdorff distance gives
\begin{align*}
\operatorname{dist}(x,L) \leq r \quad \text{for every } x \in K,
\qquad
\operatorname{dist}(y,K) \leq r \quad \text{for every } y \in L.
\end{align*}
Because $K$ and $L$ are compact and nonempty, the distance from a point to either set is attained. Hence, for every $x \in K$, there is some $y \in L$ satisfying $|x-y| \leq r$, and for every $y \in L$, there is some $x \in K$ satisfying $|x-y| \leq r$. This is the closed-neighbourhood characterization needed for the support-function estimate.
Fix a direction $u \in S^{n-1}$. We want to compare the largest value of the linear functional $z \mapsto z \cdot u$ on $K$ with its largest value on $L$. Take an arbitrary $x \in K$ and choose $y \in L$ with $|x-y| \leq r$. Since $|u|=1$, Cauchy-Schwarz gives
\begin{align*}
x \cdot u
&= y \cdot u + (x-y)\cdot u \\
&\leq y \cdot u + |x-y|\,|u| \\
&\leq h_L(u)+r.
\end{align*}
Because this inequality holds for every $x \in K$, taking the supremum over $x \in K$ gives
\begin{align*}
h_K(u) \leq h_L(u)+r.
\end{align*}
Repeating the same argument with $K$ and $L$ interchanged gives
\begin{align*}
h_L(u) \leq h_K(u)+r.
\end{align*}
Together these two inequalities say
\begin{align*}
|h_K(u)-h_L(u)| \leq r.
\end{align*}
Since $u \in S^{n-1}$ was arbitrary, we conclude
\begin{align*}
\sup_{u \in S^{n-1}} |h_K(u)-h_L(u)| \leq d_H(K,L).
\end{align*}
[/guided]
[/step]
[step:Use nearest points to convert support bounds into distance bounds]
Define
\begin{align*}
\delta := \sup_{u \in S^{n-1}} |h_K(u)-h_L(u)|.
\end{align*}
We prove that every point of $K$ has distance at most $\delta$ from $L$. Let $x \in K$. If $x \in L$, then $\operatorname{dist}(x,L)=0 \leq \delta$. Assume $x \notin L$.
Here compactness of $L$ is the hypothesis that gives existence of a nearest point, and convexity of $L$ is the hypothesis that will turn that nearest point into a supporting direction. Since $L$ is compact and the map
\begin{align*}
\varphi_x: L &\to \mathbb{R} \\
z &\mapsto |x-z|
\end{align*}
is continuous, there exists $y \in L$ such that
\begin{align*}
|x-y| = \operatorname{dist}(x,L).
\end{align*}
Define
\begin{align*}
u := \frac{x-y}{|x-y|}.
\end{align*}
Then $u \in S^{n-1}$. We claim that $z \cdot u \leq y \cdot u$ for every $z \in L$. Indeed, for each $z \in L$ and each $t \in [0,1]$, convexity gives
\begin{align*}
y+t(z-y) \in L.
\end{align*}
The minimality of $y$ gives
\begin{align*}
|x-y|^2 \leq |x-y-t(z-y)|^2.
\end{align*}
Expanding the square in the Euclidean inner product,
\begin{align*}
|x-y|^2
&\leq |x-y|^2 - 2t(x-y)\cdot(z-y) + t^2 |z-y|^2.
\end{align*}
For $t>0$, dividing by $t$ gives
\begin{align*}
2(x-y)\cdot(z-y) \leq t |z-y|^2.
\end{align*}
Letting $t \downarrow 0$ yields
\begin{align*}
(x-y)\cdot(z-y) \leq 0.
\end{align*}
Dividing by $|x-y|>0$ gives
\begin{align*}
z \cdot u \leq y \cdot u.
\end{align*}
Therefore
\begin{align*}
h_L(u) \leq y \cdot u.
\end{align*}
Since $y \in L$, also $y \cdot u \leq h_L(u)$, so $h_L(u)=y \cdot u$. Since $x \in K$, we have $h_K(u) \geq x \cdot u$. Hence
\begin{align*}
\delta
&\geq h_K(u)-h_L(u) \\
&\geq x \cdot u - y \cdot u \\
&= (x-y)\cdot \frac{x-y}{|x-y|} \\
&= |x-y| \\
&= \operatorname{dist}(x,L).
\end{align*}
Thus every $x \in K$ satisfies $\operatorname{dist}(x,L) \leq \delta$.
[guided]
Define
\begin{align*}
\delta := \sup_{u \in S^{n-1}} |h_K(u)-h_L(u)|.
\end{align*}
We now show that $\delta$ controls how far $K$ can lie from $L$. Fix $x \in K$. If $x \in L$, then $\operatorname{dist}(x,L)=0$, so the desired estimate is immediate. Assume $x \notin L$.
The two geometric hypotheses on $L$ have different roles. Compactness gives a nearest point to $x$, while convexity ensures that every line segment from that nearest point to another point of $L$ stays inside $L$, which is what produces the supporting inequality. Because $L$ is compact and the distance-to-$x$ map
\begin{align*}
\varphi_x: L &\to \mathbb{R} \\
z &\mapsto |x-z|
\end{align*}
is continuous, the minimum of $\varphi_x$ on $L$ is attained. Choose $y \in L$ such that
\begin{align*}
|x-y|=\operatorname{dist}(x,L).
\end{align*}
The direction from the nearest point $y$ to the exterior point $x$ is the direction in which $L$ is separated from $x$. Define
\begin{align*}
u := \frac{x-y}{|x-y|}.
\end{align*}
Since $x \notin L$, we have $|x-y|>0$, so $u$ is well-defined and $u \in S^{n-1}$.
We prove that $y$ maximizes the linear functional $z \mapsto z \cdot u$ on $L$. Let $z \in L$. For every $t \in [0,1]$, convexity of $L$ gives
\begin{align*}
y+t(z-y) \in L.
\end{align*}
Since $y$ is a nearest point in $L$ to $x$, moving from $y$ toward any other point $z \in L$ cannot decrease the distance to $x$. Therefore
\begin{align*}
|x-y|^2 \leq |x-y-t(z-y)|^2.
\end{align*}
Expanding the right-hand side using the Euclidean inner product gives
\begin{align*}
|x-y|^2
&\leq |x-y|^2 - 2t(x-y)\cdot(z-y) + t^2 |z-y|^2.
\end{align*}
Canceling $|x-y|^2$ and dividing by $t>0$ gives
\begin{align*}
2(x-y)\cdot(z-y) \leq t |z-y|^2.
\end{align*}
Letting $t \downarrow 0$ gives
\begin{align*}
(x-y)\cdot(z-y) \leq 0.
\end{align*}
Dividing by $|x-y|$ yields
\begin{align*}
z \cdot u \leq y \cdot u.
\end{align*}
Since this holds for every $z \in L$, we get $h_L(u) \leq y \cdot u$. The reverse inequality $y \cdot u \leq h_L(u)$ follows from $y \in L$, so
\begin{align*}
h_L(u)=y \cdot u.
\end{align*}
Now compare the support functions in the direction $u$. Since $x \in K$, we have $h_K(u) \geq x \cdot u$. Therefore
\begin{align*}
\delta
&\geq h_K(u)-h_L(u) \\
&\geq x \cdot u - y \cdot u \\
&= (x-y)\cdot \frac{x-y}{|x-y|} \\
&= |x-y| \\
&= \operatorname{dist}(x,L).
\end{align*}
Thus every point $x \in K$ lies within distance $\delta$ of $L$.
[/guided]
[/step]
[step:Repeat the distance bound with the roles interchanged]
The preceding step used only compactness and convexity of the second set and membership of the point in the first set. Therefore, applying the same argument with $K$ and $L$ interchanged, every $y \in L$ satisfies
\begin{align*}
\operatorname{dist}(y,K) \leq \delta.
\end{align*}
Consequently
\begin{align*}
\sup_{x \in K} \operatorname{dist}(x,L) \leq \delta,
\qquad
\sup_{y \in L} \operatorname{dist}(y,K) \leq \delta.
\end{align*}
By the definition of Hausdorff distance,
\begin{align*}
d_H(K,L)
&= \max\left\{
\sup_{x \in K} \operatorname{dist}(x,L),
\sup_{y \in L} \operatorname{dist}(y,K)
\right\} \\
&\leq \delta \\
&= \sup_{u \in S^{n-1}} |h_K(u)-h_L(u)|.
\end{align*}
Combining this with the opposite inequality proved above gives
\begin{align*}
d_H(K,L)=\sup_{u \in S^{n-1}} |h_K(u)-h_L(u)|.
\end{align*}
This is the desired formula.
[/step]