This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Plus


represents a sum of terms.
  • The default value for arguments of Plus, as used in patterns, is . »
  • Plus is taken to be .
  • x+0 evaluates to x, but x+0.0 is left unchanged.
  • In mixed fractions such as , the implicit addition can be entered as Esc + Esc or \[ImplicitPlus]. This evaluates to , but implicit addition is an operator with much higher precedence than .
  • Unlike other functions, Plus applies built-in rules before user-defined ones. As a result, it is not possible to make definitions such as .
Plus threads element-wise over lists:
Explicit FullForm:
In[1]:=
Click for copyable input
Out[1]=
 
Plus threads element-wise over lists:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Explicit FullForm:
In[1]:=
Click for copyable input
Out[1]=
If any number is approximate, the whole result will be:
Complex numbers add their components:
Plus threads element-wise over lists:
Matrices add element-wise:
Plus sorts its arguments:
Display terms in a sum in a traditional order:
Display a sum without evaluation:
Display the FullForm of a sum:
Find the length of a sum:
Total applies Plus to a list:
Pattern matching works with Plus:
Distribute a function over Plus:
Distribute Plus through a head:
Accumulate makes a cumulative sum:
New in 1 | Last modified in 6