If you have $\max(a,b)$ and $\min(a,b)$, how would one find expressions for these using addition, subtraction, and absolute value? Just a quick question. If you have $\max(a,b)$ and $\min(a,b)$, how would one find expressions for these using addition, subtraction, and absolute value?
My thought process was that suppose $\max(a,b) = a$. Then, $a &gt; b \Rightarrow a-b &gt; 0$. This is an idea I had that I do not know how to continue with.
$max(a,b) = \dfrac{a+b+|a-b|}{2}$

Try to get the other one.
$\max(a,b) = \frac{a}{2} + \max(\frac{a}{2}-\frac{b}{2}, \frac{b}{2}-\frac{a}{2}) + \frac{b}{2} = \frac{a + b}{2} + \frac{|a - b|}{2} = \frac{a+b+|a-b|}{2}$

This is because $\max(x,-x) = |x|$

$\min(a,b) = \frac{a}{2} + \min(\frac{a}{2}-\frac{b}{2}, \frac{b}{2}-\frac{a}{2}) + \frac{b}{2} = \frac{a + b}{2} - \frac{|a - b|}{2} = \frac{a+b-|a-b|}{2}$

This is because $\min(x,-x) = -|x|$