Why is the absolute value of #|e-pi |# = #pi-e# ?

Why is the absolute value of #|e-pi |# = #pi-e# ?

2 Answers
Feb 27, 2018

It can be either #e-pi# or #pi-e#. See below.

Explanation:

Recall that

#|x|=+-x#, because #|x|=x# and #|-x|=x# (the absolute value of a negative number becomes that same number, but positive).

Therefore, #|e-pi|=+-(e-pi)#

#+-(e-pi)# can be either:

#+(e-pi)=e-pi#

or

#-(e-pi)=-e+pi=pi-e#

Feb 28, 2018

Because #e < pi#

Explanation:

The absolute value of a number is essentially its non-negative distance from #0#.

So:

#abs(x) = { (x " if " x >= 0), (-x " if " x < 0) :}#

With #e ~~ 2.71828# and #pi ~~ 3.14159# we have:

#e < pi#

and hence:

#e - pi < 0#

So:

#abs(e-pi) = -(e-pi) = pi - e#