As we saw here, the minimum of two quantities can be written using elementary functions and the absolute value function.

min(a,b)=a+b2−|a−b|2

There’s even a nice intuitive explanation to go along with this: If we go to the point half way between two numbers, then going down by half their difference will take us to the smaller one. So my question is: “Is there a similar formula for three numbers?”

Obviously min(a,min(b,c)) will work, but this gives us the expression:

a+(b+c2−|b−c|2)2−|a−(b+c2−|b−c|2)|2,

which isn’t intuitively the minimum of three numbers, and isn’t even symmetrical in the variables, even though its output is. Is there some nicer way of expressing this function?

**Answer**

This probably isn’t what you were thinking of, but if a1,...an are non-negative, then

min(a1,...an)=limk→−∞k√ak1+...+akn

whereas

max(a1,...an)=limk→∞k√ak1+...+akn.

There are several applications of these identities (at least the second one), e.g. to functional analysis. They are also related to the way in which tropical arithmetic arises as a “limit” of ordinary arithmetic.

**Attribution***Source : Link , Question Author : Oscar Cunningham , Answer Author : Qiaochu Yuan*