Operator Input Forms

Characters that are not letters, letter-like forms, or structural elements are treated by the Wolfram Language as operators. The Wolfram Language has built-in rules for interpreting all operators. The functions to which these operators correspond may or may not, however, have built-in evaluation or other rules. Cases in which built-in meanings are by default defined are indicated by ⊲ in the tables below.

Operators that construct two-dimensional boxes—all of which have names beginning with backslash—can only be used inside \(…\). The table below gives the interpretations of these operators within ∖!∖(…∖). "Input of Boxes" gives interpretations when no \! is included.

Objects used in the tables of operator input forms.

Operator Precedence

Operator input forms, in order of decreasing precedence. Operators of equal precedence are grouped together.

Additional input forms, in order of decreasing precedence.

Special Characters

Special characters that appear in operators usually have names that correspond to the names of the functions they represent. Thus the character ⊕ has the name (RefLink[\[CirclePlus], paclet:ref/character/CirclePlus]) and yields the function (RefLink[CirclePlus, paclet:ref/CirclePlus]). Exceptions are (RefLink[\[GreaterSlantEqual], paclet:ref/character/GreaterSlantEqual]), (RefLink[\[LessSlantEqual], paclet:ref/character/LessSlantEqual]) and (RefLink[\[RoundImplies], paclet:ref/character/RoundImplies]).

The delimiters in matchfix operators have names \[LeftName] and \[RightName].

"Listing of Named Characters" gives a complete listing of special characters that appear in operators.

Keyboard and special characters with the same interpretations.

Some keyboard and special characters with different interpretations.

Precedence and the Ordering of Input Forms

The tables of input forms are arranged in decreasing order of precedence. Input forms in the same box have the same precedence. Each page in the table begins a new box. As discussed in "Special Ways to Input Expressions", precedence determines how the Wolfram Language groups terms in input expressions. The general rule is that if ⊗ has higher precedence than ⊕, then a⊕b⊗c is interpreted as a⊕(b⊗c), and a⊗b⊕c is interpreted as (a⊗b)⊕c.

Grouping of Input Forms

The third columns in the tables show how multiple occurrences of a single input form, or of several input forms with the same precedence, are grouped. For example, a/b/c is grouped as (a/b)/c ("left associative"), while a^b^c is grouped as a^(b^c) ("right associative"). No grouping is needed in an expression like a+b+c, since (RefLink[Plus, paclet:ref/Plus]) is fully associative, as represented by the attribute (RefLink[Flat, paclet:ref/Flat]).

Precedence of Integration Operators

Forms such as ∫(Subscript[expr, 1])d(Subscript[expr, 2]) involve two operators: (RefLink[\[Integral], paclet:ref/character/Integral]) and (RefLink[\[DifferentialD], paclet:ref/character/DifferentialD]). The former has a precedence just above ∑, while the latter has one just below (RefLink[Power, paclet:ref/Power]). The precedence of d determines when (Subscript[expr, 2]) needs to be parenthesized, while the precedence of ∫ determines when (Subscript[expr, 1]) needs to be parenthesized. Note that the form (∫_(vars∈reg))expr does not involve d, and therefore ∫ behaves like a normal prefix operator in this case.

(RefLink[\[ContourIntegral], paclet:ref/character/ContourIntegral]), (RefLink[\[ClockwiseContourIntegral], paclet:ref/character/ClockwiseContourIntegral]) and (RefLink[\[DoubleContourIntegral], paclet:ref/character/DoubleContourIntegral]) work the same as (RefLink[\[Integral], paclet:ref/character/Integral]).

See "Two-Dimensional Input Forms" for two-dimensional input forms associated with integration operators.

Spaces and Multiplication

Spaces in the Wolfram Language denote multiplication, just as they do in standard mathematical notation. In addition, the Wolfram Language takes complete expressions that are adjacent, not necessarily separated by spaces, to be multiplied together.

Alternative forms for multiplication.

An expression like x!y could potentially mean either (x!)*y or x*(!y). The first interpretation is chosen because (RefLink[Factorial, paclet:ref/Factorial]) has higher precedence than (RefLink[Not, paclet:ref/Not]).

Spaces within single input forms are ignored. Thus, for example, a + b is equivalent to a+b. You will often want to insert spaces around lower precedence operators to improve readability.

You can give a "coefficient" for a symbol by preceding it with any sequence of digits. When you use numbers in bases larger than 10, the digits can include letters. (In bases other than 10, there must be a space between the end of the coefficient and the beginning of the symbol name.)

Some cases to be careful about.

Spaces to Avoid

You should avoid inserting any spaces between the different characters in composite operators such as /., =., and >=. Although in some cases such spaces are allowed, they are liable to lead to confusion.

Another case where spaces must be avoided is between the characters of the pattern object x_. If you type x_, the Wolfram Language will interpret this as x*_, rather than the single named pattern object x_.

Similarly, you should not insert any spaces inside pattern objects like x_:value.

Spacing Characters

Spacing characters equivalent to an ordinary keyboard space.

Relational Operators

Relational operators can be mixed. An expression like a>b>=c is converted to Inequality[a,(RefLink[Greater, paclet:ref/Greater]),b,(RefLink[GreaterEqual, paclet:ref/GreaterEqual]),c], which effectively evaluates as (a>b)&&(b>=c). (The reason for the intermediate Inequality form is that it prevents objects from being evaluated twice when input like a>b>=c is processed.)

File Names

Any file name can be given in quotes after <<, >>, and >>>. File names can also be given without quotes if they contain only alphanumeric characters and the characters `, /, ., ∖, !, -, _, :, $, *, ~, and ?, together with matched pairs of square brackets enclosing any characters other than spaces, tabs, and newlines. Note that file names given without quotes can be followed only by spaces, tabs, or newlines, or by the characters ), ], or }, as well as semicolons and commas.