Minus

-x

is the arithmetic negation of x.

Details

  • -x is converted to Times[-1,x] on input.

Examples

Basic Examples  (4)

Minus automatically distributes over groupings:

In[1]:=
Click for copyable input
Out[1]=

Minus threads element-wise over lists:

In[1]:=
Click for copyable input
Out[1]=

Explicit FullForm:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]//FullForm=

Pattern match both x and -x:

In[1]:=
Click for copyable input
Out[1]=

See Also

Subtract  Plus  SubtractFrom

Tutorials

Introduced in 1988
(1.0)