Maximum of absolute value difference

85 Views Asked by At

I know this is a very simple question, but I wonder if the following equality holds for any $(x,y)\in \mathbb{R}^2$ and any functions $f_a(x,y)$ and $f_b(x,y)$:

$$ \max_{x,y} |f_a(x,y) - f_b(x,y)| = \max_{x,y} \{ f_a(x,y) - f_b(x,y), f_b(x,y) - f_a(x,y)\},$$

where the maximum on the right-hand side takes the maximum of the two arguments.

Any help would be appreciated.

2

There are 2 best solutions below

0
On

By definition, $|x-y| = \max(x-y, y-x)$.

So what you wrote is true.

0
On

We have

$|f_a(x,y) - f_b(x,y)|=f_a(x,y) - f_b(x,y)$ if $f_a(x,y) \ge f_b(x,y)$

amd

$|f_a(x,y) - f_b(x,y)|=f_b(x,y) - f_a(x,y)$ if $f_a(x,y) \le f_b(x,y)$.