Abs

Abs[expr] calculates the absolute value of expr.

Attributes[Abs] := {Listable, NumericFunction, Protected, ReadProtected}

Simple examples

In[1]:= Abs[-5]
Out[1]= 5
In[2]:= Abs[5]
Out[2]= 5

Absolute values of unspecified inputs will be left unevaluated:

In[3]:= Abs[a]
Out[3]= Abs[a]

But sometimes simplifications can occur:

In[4]:= Abs[Sin[x]*-1]
Out[4]= Abs[Sin[x]]