$\sup \limits_{t\in[a,b]}f(t)-\inf \limits_{t\in[a,b]}f(t)=\sup \limits_{t,s\in[a,b]}|f(t)-f(s)|$ In many books and papers on analysis I met this equality without proof:
$$\sup \limits_{t\in[a,b]}f(t)-\inf \limits_{t\in[a,b]}f(t)=\sup \limits_{t,s\in[a,b]}|f(t)-f(s)|$$
Can anyone show strict and nice proof of that equality?
I would really grateful foe your help!
 A: $$
\begin{align}
\sup_{t\in[a,b]}f(t)-\inf_{s\in[a,b]}f(s)
&=\sup_{t\in[a,b]}f(t)+\sup_{s\in[a,b]}(-f(s))\\
&=\sup_{s,t\in[a,b]}\big(f(t)+(-f(s))\big)\\
&=\sup_{s,t\in[a,b]}\big(f(t)-f(s)\big)\\
&=\sup_{s,t\in[a,b]}\left|f(t)-f(s)\right|
\end{align}
$$
The last equality follows since $\big\{f(t)-f(s):s,t\in[a,b]\big\}$ is symmetric about $0$.
A: We have
$$\sup_{t\in[a,b]}f(t)\geq f(t)\quad\quad\quad\forall t\in[a,b]$$
and
$$\inf_{t\in[a,b]}f(t)\leq f(t)\quad\quad\quad\forall t\in[a,b]$$
so
$$-\inf_{t\in[a,b]}f(t)\geq -f(t)\quad\quad\quad\forall t\in[a,b]$$
whence
$$\sup_{t\in[a,b]}f(t)-\inf_{t\in[a,b]}f(t)\geq f(t)-f(s)\quad\quad\quad\forall s,t\in[a,b].$$
As
$$\sup_{t\in[a,b]}f(t)\geq\inf_{t\in[a,b]}f(t),$$
we have $$|\sup_{t\in[a,b]}f(t)-\inf_{t\in[a,b]}f(t)|=\sup_{t\in[a,b]}f(t)-\inf_{t\in[a,b]}f(t)$$
and then
$$\sup_{t\in[a,b]}f(t)-\inf_{t\in[a,b]}f(t)\geq |f(t)-f(s)|\quad\quad\quad\forall s,t\in[a,b].$$
We thus have got the inequality
$$\sup_{t\in[a,b]}f(t)-\inf_{t\in[a,b]}f(t)\geq \sup_{s,t\in[a,b]}|f(t)-f(s)|.$$
For the he converse, we start with the inequality
$$f(t)-f(s)\leq|f(t)-f(s)|\leq \sup_{s,t\in[a,b]}|f(t)-f(s)|\quad\quad\quad\forall s,t\in[a,b].$$
For all $\varepsilon>0$, there are $s,t\in[a,b]$ such that
$$\sup_{t\in[a,b]}f(t)-\varepsilon/2\leq f(t),\quad\quad\inf_{t\in[a,b]}f(t)+\varepsilon/2\geq f(s),$$
thus
$$\sup_{t\in[a,b]}f(t)-\inf_{t\in[a,b]}f(t)\leq f(t)-f(s)+\varepsilon$$
whence
$$\sup_{t\in[a,b]}f(t)-\inf_{t\in[a,b]}f(t)\leq \sup_{s,t\in[a,b]}|f(t)-f(s)|+\varepsilon$$
and we have done.
A: For every $ε>0$ there are $s$ and $t$ such that 
$$
\inf f\le f(s)\le \inf f+ε
$$
and
$$
\sup f -ε \le f(t) \le \sup f
$$
Combine this to
$$
\sup f - \inf f-2ε \le f(t)-f(s)\le \sup f - \inf f
$$
to see that indeed the claimed identity holds.
