Why is absolute difference of max of functions less than max of absolute difference of functions Title is wordy, but the question (I believe) is simple. Why does the following inequality hold? It is used as a step in the solution key for a homework assignment of mine, but doesn't explain why. Is there a name for this property?:
$|\max f(x) - \max g(x)| \le \max|f(x) - g(x)|$
Thanks!
 A: Alternatively (to the other answer), to remember which way this inequality goes, compare $\sin(x)$ and $-\sin(x)$ (on, say , $(-\infty, \infty)$, although many non-tricky choices are equivalent).  The maximum of both functions is $1$, so the difference of the maxima is $0$.  The maxima of one coincides with the minima of the other and vice versa, so $|\sin(\pi/2) - (-\sin(\pi/2))| = 2$ is the maximum of the absolute differences.
The inobviousness of this sort of result seems to be thinking that the maxima of both functions happen at the same places in the domain.
A: We have that
$$f(x)\le |f(x)-g(x)|+g(x).$$ Thus
$$\max f(x)\le \max (|f(x)-g(x)|+g(x))\le \max |f(x)-g(x)| +\max g(x).$$ So
$$\max f(x)-\max g(x)\le \max |f(x)-g(x)|.$$ Changing the roles of $f$ and $g$ we have that
$$\max g(x)-\max f(x)\le \max |f(x)-g(x)|.$$ Thus we are done.
A: let $x^* := \arg\max_x f(x)$ and $\hat{x} := \arg\max_x g(x)$, then $f(x)\le f(x^*)$ for all $x$ and $g(x)\le g(\hat{x})$ for all x, thus we have $-g(\hat{x})\le-g(x^*)$ and $-f(x^*)\le -f(\hat{x})$. So we begin from the left hand side (LHS),
$$
LHS = max\{f(x^*) - g(\hat{x}), g(\hat{x})-f(x^*)\} \le \max\{f(x^*) - g(x^*), g(\hat{x}) - f(\hat{x})\} \le \max\{\max_x|f(x)-g(x)|,\max_x|g(x)-f(x)|\}=\max_x|f(x)-g(x)| = RHS \ .
$$
Hence the prove is completed.
A: We can also think about it in terms of optimization problems.
For instance,
\begin{align}
\max_{x\in X} f(x) - \max_{y\in X}g(y) = \max_{x\in X,y\in Y} f(x)-g(y) \leq \max_{x\in X} \big[f(x)- \max_{y\in Y,y=x} g(y)\big] = \max_{x\in X}f(x)-g(x)
\end{align}
and can swap $f$ and $g$ to get absolute values.
