# Maximum value and the absolute value

Let $f\colon X \rightarrow \mathbb{R}$ be a function such that $\max_{x\in X} f(x) + \min_{x\in X} f(x) = 0$. Does it then follow that $\max_{x\in X} f(x) = \max_{x\in X} |f(x)|$?

I'm quite sure it does but I don't know how to prove it. Here's what I tried: First of all, $\max_{x\in X} f(x)$ and $\min_{x\in X} f(x)$ cannot be both negative, and since $\max_{x\in X} f(x) \geq \min_{x\in X} f(x)$, we have $\max_{x\in X} f(x) \geq 0$.

Case 1: $\max_{x\in X} f(x) = 0$. Then $\min_{x\in X} f(x) = 0$, so $f(x) = 0$ for all $x$ and thus $\max_{x\in X} f(x) = \max_{x\in X} |f(x)|$.

Case 2: $\max_{x\in X} f(x) > 0$. Then $\min_{x\in X} f(x) < 0$, so $-\min_{x\in X} f(x) > 0$ and thus $\max_{x\in X} (-f(x)) > 0$.

How could I proceed? Thanks.

EDIT: Following Michael Burr's advice, I'll try to prove the three steps:

Step 3: $\max_{x\in X} f(x) + \min_{x\in X} f(x) = 0$ implies $\max_{x\in X} f(x) = -\min_{x\in X} f(x)$, and with step 2 we get $\max_{x\in X} f(x) = \max_{x\in X} -f(x)$.

Step 2: Let $x'\in X$ be such that $-f(x') = \max_{x\in X} -f(x)$. Then \begin{align*} & &-f(x') &\geq -f(x) &\quad \forall x\in X \\ &\Rightarrow &f(x') &\leq f(x) &\quad \forall x\in X \\ &\Rightarrow &\min_{x\in X} f(x) &= f(x') \\ &\Rightarrow &-\min_{x\in X} f(x) &= -f(x') = \max_{x\in X} -f(x) \\ \end{align*}

Okay so far? I have no clue how to prove step 1.

• Your case $2$ seems to be going on a tangent. The results don't seem closely related to the goal. – Michael Burr Apr 22 '16 at 10:21

• Step 1: Show that, in general, $\max\limits_{x\in X}|f(x)|=\max\left\{\max\limits_{x\in X}f(x),\max\limits_{x\in X}-f(x)\right\}$
• Step 2: Show that, in general, $\max\limits_{x\in X}-f(x)=-\min\limits_{x\in X}f(x)$.
• Step 3: Show that, in the present case, $\max\limits_{x\in X}f(x)=\max\limits_{x\in X}-f(x)$.
Just for fun, here is a proof using alternative definitions (which are actually the briefest definitions I've seen).\newcommand{\calc}{\begin{align} \quad &} \newcommand{\op}[1]{\\ #1 \quad & \quad \unicode{x201c}} \newcommand{\hints}[1]{\mbox{#1} \\ \quad & \quad \phantom{\unicode{x201c}} } \newcommand{\hint}[1]{\mbox{#1} \unicode{x201d} \\ \quad & } \newcommand{\endcalc}{\end{align}} \newcommand{\Ref}[1]{\text{(#1)}} \newcommand{\then}{\Rightarrow} \newcommand{\when}{\Leftarrow} \newcommand{\true}{\text{true}} \newcommand{\false}{\text{false}} \newcommand{\abs}[1]{\left| #1 \right|} \newcommand{\maxx}{\text{max}_{x}} \newcommand{\minx}{\text{min}_{x}} Specifically, I will use the following definitions of $\;\abs{\quad}\;$, $\;\maxx f(x)\;$, and $\;\minx f(x)\;$: for all $\;z\;$,\begin{align} \abs{x} \le z & \;\equiv\; x \le z \land -x \le z \\ \maxx f(x) \le z & \;\equiv\; \langle \forall x :: f(x) \le z \rangle \\ z \le \minx f(x) & \;\equiv\; \langle \forall x :: z \le f(x) \rangle \end{align} (To avoid boilerplate notation, I'm implicitly assuming $\;x \in X\;$ and $\;z \in \mathbb R\;$.)
Now we start at the most complex side of the statement that we want to prove, which is the right hand side, and we try to simplify: for all $\;z\;$, $$\calc \maxx \abs{f(x)} \le z \op\equiv\hint{definition of \;\maxx\;} \langle \forall x :: \abs{f(x)} \le z \rangle \op\equiv\hint{definition of \;\abs\;} \langle \forall x :: f(x) \le z \land -f(x) \le z \rangle \op\equiv\hints{logic: \;\land\; distributes over \;\forall\;}\hints{-- this seems the only way forward, and lets us}\hint{introduce the desired \;\maxx f(x) \le z\;} \langle \forall x :: f(x) \le z \rangle \;\land\; \langle \forall x :: -f(x) \le z \rangle \op\equiv\hints{LHS: definition of \;\maxx\;;}\hint{RHS: negate both sides of \;\le\;, definition of \;\minx\;} \maxx f(x) \le z \;\land\; -z \le \minx f(x) \op\equiv\hints{RHS is equivalent to LHS by given}\hint{\;\maxx f(x) + \minx f(x) = 0\;} \maxx f(x) \le z \endcalc$$ Now, by $$x = y \;\equiv\; \langle \forall z :: x \le z \;\equiv\; y \le z \rangle$$ it follows imediately that $$\maxx \abs{f(x)} \;=\; \maxx f(x)$$ is indeed true.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 2, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/1753999/maximum-value-and-the-absolute-value", "fetch_time": 1563690410000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2019-30/segments/1563195526931.25/warc/CC-MAIN-20190721061720-20190721083720-00489.warc.gz", "warc_record_offset": 467523315, "warc_record_length": 37222, "token_count": 1578, "char_count": 4027, "score": 4.46875, "int_score": 4, "crawl": "CC-MAIN-2019-30", "snapshot_type": "latest", "language": "en", "language_score": 0.5802335143089294, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00029-of-00064.parquet"}