This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
 Mathematica Tutorial Functions »|Tutorials »

# Input Syntax

## Entering Characters

 • Enter it directly (e.g. +) • Enter it by full name (e.g. \[Alpha]) • Enter it by alias (e.g. Esc a Esc) (notebook front end only) • Enter it by choosing from a palette (notebook front end only) • Enter it by character code (e.g. \:03b1)

Typical ways to enter characters.

All printable ASCII characters can be entered directly. Those that are not alphanumeric are assigned explicit names in Mathematica, allowing them to be entered even on keyboards where they do not explicitly appear.
 \[RawSpace] ! \[RawExclamation] " \[RawDoubleQuote] # \[RawNumberSign] \$ \[RawDollar] % \[RawPercent] & \[RawAmpersand] ' \[RawQuote] ( \[RawLeftParenthesis] ) \[RawRightParenthesis] * \[RawStar] + \[RawPlus] , \[RawComma] - \[RawDash] . \[RawDot] / \[RawSlash] : \[RawColon]
 ; \[RawSemicolon] < \[RawLess] = \[RawEqual] > \[RawGreater] ? \[RawQuestion] @ \[RawAt] [ \[RawLeftBracket] \ \[RawBackslash] ] \[RawRightBracket] ^ \[RawWedge] _ \[RawUnderscore] ` \[RawBackquote] { \[RawLeftBrace] | \[RawVerticalBar] } \[RawRightBrace] ~ \[RawTilde]

Full names for non-alphanumeric printable ASCII characters.

All characters which are entered into the Mathematica kernel are interpreted according to the setting for the CharacterEncoding option for the stream from which they came.
 \[Name] a character with the specified full name \nnn a character with octal code nnn \.nn a character with hexadecimal code nn \:nnnn a character with hexadecimal code nnnn

Ways to enter characters.

Codes for characters can be generated using ToCharacterCode. The Unicode standard is followed, with various extensions.
8-bit characters have codes less than 256; 16-bit characters have codes between 256 and 65535. Approximately 900 characters are assigned explicit names in Mathematica. Other characters must be entered using their character codes.
 \\ single backslash (decimal code 92) \b backspace or Ctrl+H (decimal code 8) \t tab or Ctrl+I (decimal code 9) \n newline or Ctrl+J (decimal code 10; full name \[NewLine]) \f form feed or Ctrl+L (decimal code 12) \r carriage return or Ctrl+M (decimal code 13) \000 null byte (code 0)

Some special 8-bit characters.

## Types of Input Syntax

The standard input syntax used by Mathematica is the one used by default in InputForm and StandardForm. You can modify the syntax by making definitions for MakeExpression[expr, form].
Options can be set to specify what form of input should be accepted by a particular cell in a notebook or from a particular stream.
The input syntax in TraditionalForm, for example, is different from that in InputForm and StandardForm.
In general, what input syntax does is to determine how a particular string or collection of boxes should be interpreted as an expression. When boxes are set up, say with the notebook front end, there can be hidden InterpretationBox or TagBox objects which modify the interpretation of the boxes.

## Character Strings

 "characters" a character string \" a literal " in a character string \\ a literal \ in a character string \ (at end of line) ignore the following newline \!\(...\) a substring representing two-dimensional boxes

Entering character strings.

Character strings can contain any sequence of 8- or 16-bit characters. Characters entered by name or character code are stored the same as if they were entered directly.
In a notebook front end, text pasted into a string by default automatically has appropriate \ characters inserted so that the string stored in Mathematica reproduces the text that was pasted.
Within \!\(...\) any box structures represented using backslash sequences can be used.
StringExpression objects can be used to represent strings that contain symbolic constructs, such as pattern elements.

## Symbol Names and Contexts

 name symbol name `name symbol name in current context context`name symbol name in specified context context` context name context1`context2` compound context name `context` context relative to the current context

Symbol names and contexts.

Symbol names and contexts can contain any characters that are treated by Mathematica as letters or letter-like forms. They can contain digits but cannot start with them. Contexts must end in a backquote `.

## Numbers

 digits integer digits.digits approximate number base^^digits integer in specified base base^^digits.digits approximate number in specified base mantissa*^n scientific notation (mantissa×10n) base^^mantissa*^n scientific notation in specified base (mantissa×basen) number` machine-precision approximate number number`s arbitrary-precision number with precision s number``s arbitrary-precision number with accuracy s

Input forms for numbers.

Numbers can be entered with the notation base^^digits in any base from 2 to 36. The base itself is given in decimal. For bases larger than 10, additional digits are chosen from the letters a-z or A-Z. Upper- and lower-case letters are equivalent for these purposes. Floating-point numbers can be specified by including . in the digits sequence.
In scientific notation, mantissa can contain ` marks. The exponent n must always be an integer, specified in decimal.
The precision or accuracy s can be any real number; it does not need to be an integer.
In the form base^^number`s the precision s is given in decimal, but it gives the effective number of digits of precision in the specified base, not in base 10.
An approximate number x is taken to be machine precision if the number of digits given in it is or less. If more digits are given, then x is taken to be an arbitrary-precision number. The accuracy of x is taken to be the number of digits that appear to the right of the decimal point, while its precision is taken to be Log[10, Abs[x]]+Accuracy[x].
A number entered in the form 0``s is taken to have precision 0 and accuracy s.

## Bracketed Objects

Bracketed objects use explicit left and right delimiters to indicate their extent. They can appear anywhere within Mathematica input, and can be nested in any way.
The delimiters in bracketed objects are matchfix operators. But since these delimiters explicitly enclose all operands, no precedence need be assigned to such operators.
 (*any text*) comment (expr) parenthesization: grouping of input

Bracketed objects without comma-separated elements.

Comments can be nested, and can continue for any number of lines. They can contain any 8- or 16-bit characters.
Parentheses must enclose a single complete expression; neither (e, e) nor () are allowed.
 {e1,e2,...} List[e1,e2,...] e1,e2,... AngleBracket[e1,e2,...] expr Floor[expr] expr Ceiling[expr] e1,e2,... BracketingBar[e1,e2,...] e1,e2,... DoubleBracketingBar[e1,e2,...] \(input\) input or grouping of boxes

Bracketed objects that allow comma-separated elements.

The notation ... is used to stand for any sequence of expressions.
{e1, e2, ...} can include any number of elements, with successive elements separated by commas.
{} is List[], a list with zero elements.
e1, e2, ... can be entered as \[LeftAngleBracket]e1, e2, ...\[RightAngleBracket].
The character \[InvisibleComma] can be used interchangeably with ordinary commas; the only difference is that \[InvisibleComma] will not be displayed.
When the delimiters are special characters, it is a convention that they are named \[LeftName] and \[RightName].
\(...\) is used to enter boxes using one-dimensional strings. Note that within the outermost \(...\) in a piece of input the syntax used is slightly different from outside, as described in "Input of Boxes".
 h[e1,e2,...] standard expression e[[i1,i2,...]] Part[e,i1,i2,...] ei1,i2,... Part[e,i1,i2,...]

Bracketed objects with heads explicitly delimit all their operands except the head. A precedence must be assigned to define the extent of the head.
The precedence of h[e] is high enough that !h[e] is interpreted as Not[h[e]]. However, h_s[e] is interpreted as (h_s)[e].

## Operator Input Forms

Characters that are not letters, letter-like forms or structural elements are treated by Mathematica as operators. Mathematica 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.
 expr and expri any expression symb any symbol patt any pattern object string and stringi "cccc" or a sequence of letters, letter-like forms and digits filename like string, but can include additional characters described below built-in meanings exist

Objects used in the tables of operator input forms.

operator form
full form
grouping
forms representing numbers (see Numbers)
forms representing symbols (see Symbol Names and Contexts)
forms representing character strings (see Character Strings)
 e11 e12 ... e21 e22 ... ...
{{e11,e12,...},{e21,e22,...},...}
 e11 e12 e21 e22 ...
Piecewise[{{e11,e12},{e21,e22},...}]
expr::stringMessageName[expr,"string"]
expr::string1::string2MessageName[expr,"string1","string2"]
forms containing # (see additional input forms)
forms containing % (see additional input forms)
forms containing _ (see additional input forms)
<<filenameGet["filename"]
Overscript[expr1,expr2]
expr1\&expr2Overscript[expr1,expr2]e\&(e\&e)
Underscript[expr1,expr2]
expr1\+expr2Underscript[expr1,expr2]e\+(e\+e)
Underoverscript[expr1,expr2,expr3]
expr1\+expr2\%expr3Underoverscript[expr1,expr2,expr3]
expr1\&expr2\%expr3Underoverscript[expr1,expr3,expr2]
expr1expr2Subscript[expr1,expr2]e(ee)
expr1\_expr2Subscript[expr1,expr2]e\_(e\_e)
expr1\_expr2\%expr3Power[Subscript[expr1,expr2],expr3]
\!boxes(interpreted version of boxes)
expr1?expr2PatternTest[expr1,expr2]
expr1[expr2,...]expr1[expr2,...](e[e])[e]
expr1[[expr2,...]]Part[expr1,expr2,...](e[[e]])[[e]]
expr1expr2,...Part[expr1,expr2,...](ee)e
expr1expr2Part[expr1,expr2,...](ee)e
\*expr(boxes constructed from expr)
expr++Increment[expr]
expr--Decrement[expr]
++exprPreIncrement[expr]
--exprPreDecrement[expr]
expr1@expr2expr1[expr2]e@(e@e)
expr1 expr2(invisible application, input as expr1 Esc @ Esc expr2)
expr1[expr2]
expr1~expr2~expr3expr2[expr1,expr3](e~e~e)~e~e
expr1/@expr2Map[expr1,expr2]e/@(e/@e)
expr1//@expr2MapAll[expr1,expr2]e//@(e//@e)
expr1@@expr2Apply[expr1,expr2]e@@(e@@e)
expr1@@@expr2Apply[expr1,expr2,{1}]e@@@(e@@@e)
expr!Factorial[expr]
expr!!Factorial2[expr]
expr*Conjugate[expr]
exprTranspose[expr]
exprConjugateTranspose[expr]
exprConjugateTranspose[expr]
expr'Derivative[1][expr]
expr''...' (n times)Derivative[n][expr]
expr1<>expr2<>expr3StringJoin[expr1,expr2,expr3]e<>e<>e
expr1^expr2Power[expr1,expr2]e^(e^e)
expr1expr2Power[expr1,expr2]e(ee)
Power[Subscript[expr1,expr2],expr3]
expr1\^expr2\%expr3Power[Subscript[expr1,expr3],expr2]
vertical arrow and vector operators
Sqrt[expr]
\@ exprSqrt[expr]\@(\@ e)
\@ expr\%nPower[expr,1/n]
expr1 expr2Integrate[expr1,expr2] ( e e) e
e3e4Integrate[e3,{e4,e1,e2}] ( e e) e
other integration operators (see Operator Input Forms)
expr1expr2D[expr2,expr1]e(ee)
exprDel[expr](e)
exprSquare[expr]( e)
expr1 expr2 expr3SmallCircle[expr1,expr2,expr3]e e e
expr1 expr2 expr3CircleDot[expr1,expr2,expr3]e e e
expr1**expr2**expr3NonCommutativeMultiply[expr1,expr2,expr3]e**e**e
expr1expr2expr3Cross[expr1,expr2,expr3]eee
expr1.expr2.expr3Dot[expr1,expr2,expr3]e.e.e
-exprTimes[-1,expr]
+exprexpr
±exprPlusMinus[expr]
exprMinusPlus[expr]
expr1/expr2expr1(expr2)^-1(e/e)/e
expr1÷expr2Divide[expr1,expr2](e÷ee
expr1\/expr2Divide[expr1,expr2](e\/e)\/e
expr1\expr2\expr3Backslash[expr1,expr2,expr3]e\e\e
expr1expr2expr3Diamond[expr1,expr2,expr3]eee
expr1expr2expr3Wedge[expr1,expr2,expr3]eee
expr1expr2expr3Vee[expr1,expr2,expr3]eee
expr1expr2expr3CircleTimes[expr1,expr2,expr3]eee
expr1expr2expr3CenterDot[expr1,expr2,expr3]eee
expr1 expr2 expr3Times[expr1,expr2,expr3]e e e
expr1*expr2*expr3Times[expr1,expr2,expr3]e*e*e
expr1×expr2×expr3Times[expr1,expr2,expr3]e×e×e
expr1expr2expr3Star[expr1,expr2,expr3]eee
e4Product[e4,{e1,e2,e3}]( e)
expr1expr2expr3VerticalTilde[expr1,expr2,expr3]eee
expr1expr2expr3Coproduct[expr1,expr2,expr3]eee
expr1expr2expr3Cap[expr1,expr2,expr3]eee
expr1expr2expr3Cup[expr1,expr2,expr3]eee
expr1 expr2 expr3CirclePlus[expr1,expr2,expr3]eee
expr1 expr2CircleMinus[expr1,expr2](e e) e
e4Sum[e4,{e1,e2,e3}]( e)
expr1+expr2+expr3Plus[expr1,expr2,expr3]e+e+e
expr1-expr2expr1+(-1expr2)(e-e)-e
expr1±expr2PlusMinus[expr1,expr2](e±ee
expr1expr2MinusPlus[expr1,expr2](ee)e
expr1expr2Intersection[expr1,expr2]eee
other intersection operators
expr1expr2Union[expr1,expr2]eee
other union operators
i;;j;;kSpan[i,j,k]e;;e;;e
expr1expr2Equal[expr1,expr2]eee
expr1expr2Equal[expr1,expr2]eee
expr1expr2Equal[expr1,expr2]eee
expr1 expr2Unequal[expr1,expr2]eee
expr1expr2Unequal[expr1,expr2]eee
other equality and similarity operators
expr1>expr2Greater[expr1,expr2]e>e>e
expr1>=expr2GreaterEqual[expr1,expr2]e>=e>=e
expr1expr2GreaterEqual[expr1,expr2]eee
expr1expr2GreaterEqual[expr1,expr2]eee
expr1<expr2Less[expr1,expr2]e<e<e
expr1<=expr2LessEqual[expr1,expr2]e<=e<=e
expr1expr2LessEqual[expr1,expr2]eee
expr1expr2LessEqual[expr1,expr2]eee
other ordering operators
expr1|expr2VerticalBar[expr1,expr2]e|e|e
expr1expr2NotVerticalBar[expr1,expr2]eee
expr1expr2DoubleVerticalBar[expr1,expr2]eee
expr1expr2NotDoubleVerticalBar[expr1,expr2]eee
horizontal arrow and vector operators
diagonal arrow operators
expr1expr2SameQ[expr1,expr2]eee
expr1expr2UnsameQ[expr1,expr2]eee
expr1expr2Element[expr1,expr2]eee
expr1expr2NotElement[expr1,expr2]eee
expr1expr2Subset[expr1,expr2]eee
expr1expr2Superset[expr1,expr2]eee
other set relation operators
expr1expr2ForAll[expr1,expr2]e(ee)
expr1expr2Exists[expr1,expr2]e(ee)
expr1expr2NotExists[expr1,expr2]e(ee)
!exprNot[expr]!(!e)
¬exprNot[expr]¬(¬e)
expr1&&expr2&&expr3And[expr1,expr2,expr3]e&&e&&e
expr1expr2expr3And[expr1,expr2,expr3]eee
expr1expr2expr3Nand[expr1,expr2,expr3]eee
expr1expr2expr3Xor[expr1,expr2,expr3]eee
expr1||expr2||expr3Or[expr1,expr2,expr3]e||e||e
expr1expr2expr3Or[expr1,expr2,expr3]eee
expr1expr2expr3Nor[expr1,expr2,expr3]eee
expr1expr2Implies[expr1,expr2]e(ee)
expr1expr2Implies[expr1,expr2]eee
expr1expr2RightTee[expr1,expr2]e(ee)
expr1expr2DoubleRightTee[expr1,expr2]e(ee)
expr1expr2LeftTee[expr1,expr2](ee)e
expr1expr2DoubleLeftTee[expr1,expr2](ee)e
expr1expr2SuchThat[expr1,expr2]e(ee)
expr..Repeated[expr]
expr...RepeatedNull[expr]
expr1|expr2Alternatives[expr1,expr2]e|e|e
symb:exprPattern[symb,expr]
patt:exprOptional[patt,expr]
expr1~~expr2~~expr3StringExpression[expr1,expr2,expr3]e~~e~~e
expr1/;expr2Condition[expr1,expr2](e/;e)/;e
expr1->expr2Rule[expr1,expr2]e->(e->e)
expr1expr2Rule[expr1,expr2]e→(ee)
expr1:>expr2RuleDelayed[expr1,expr2]e:>(e:>e)
expr1expr2RuleDelayed[expr1,expr2]e⧴(ee)
expr1/.expr2ReplaceAll[expr1,expr2](e/.e)/.e
expr1//.expr2ReplaceRepeated[expr1,expr2](e//.e)//.e
expr1-=expr2SubtractFrom[expr1,expr2]e-=(e-=e)
expr1*=expr2TimesBy[expr1,expr2]e*=(e*=e)
expr1/=expr2DivideBy[expr1,expr2]e/=(e/=e)
expr&Function[expr]
expr1:expr2Colon[expr1:expr2]e:e:e
expr1//expr2expr2[expr1](e//e)//e
expr1expr2VerticalSeparator[expr1,expr2]eee
expr1expr2Therefore[expr1,expr2]e(ee)
expr1expr2Because[expr1,expr2](ee)e
expr1=expr2Set[expr1,expr2]e=(e=e)
expr1:=expr2SetDelayed[expr1,expr2]e:=(e:=e)
expr1^=expr2UpSet[expr1,expr2]e^=(e^=e)
expr1^:=expr2UpSetDelayed[expr1,expr2]e^:=(e^:=e)
symb/:expr1=expr2TagSet[symb,expr1,expr2]
symb/:expr1:=expr2TagSetDelayed[symb,expr1,expr2]
expr=.Unset[expr]
symb/:expr=.TagUnset[symb,expr]
expr>>filenamePut[expr,"filename"]
expr>>>filenamePutAppend[expr,"filename"]
expr1;expr2;expr3CompoundExpression[expr1,expr2,expr3]
expr1;expr2;CompoundExpression[expr1,expr2,Null]
expr1\`expr2FormBox[expr2,expr1]e\`(e\`e)

Operator input forms, in order of decreasing precedence.

 special input form full form # Slot[1] #n Slot[n] ## SlotSequence[1] ##n SlotSequence[n] % Out[ ] %% Out[-2] %%...% (n times) Out[-n] %n Out[n] _ Blank[ ] _expr Blank[expr] __ BlankSequence[ ] __expr BlankSequence[expr] ___ BlankNullSequence[ ] ___expr BlankNullSequence[expr] _. Optional[Blank[ ]] symb_ Pattern[symb,Blank[ ]] symb_expr Pattern[symb,Blank[expr]] symb__ Pattern[symb,BlankSequence[ ]] symb__expr Pattern[symb,BlankSequence[expr]] symb___ Pattern[symb,BlankNullSequence[ ]] symb___expr Pattern[symb,BlankNullSequence[expr]] symb_. Optional[Pattern[symb,Blank[ ]]]

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 name \[CirclePlus] and yields the function CirclePlus. Exceptions are \[GreaterSlantEqual], \[LessSlantEqual] and \[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 characters special character -> \[Rule] → :> \[RuleDelayed] ⧴ \[Equal] = \[NotEqual] ≠
 keyboard characters special character >= \[GreaterEqual] ≥ >= \[GreaterSlantEqual] <= \[LessEqual] ≤ <= \[LessSlantEqual]

Keyboard and special characters with the same interpretations.

 keyboard character special character \[RawColon] : \[Colon] : \[RawTilde] ~ \[Tilde] \[RawWedge] ^ \[Wedge] \[RawWedge] ^ \[And] \[RawStar] * \[Star] \[RawBackslash] \ \[Backslash] \
 keyboard character special character \[RawDot] . \[CenterDot] \[RawVerticalBar] | \[VerticalBar] | \[RawVerticalBar] | \[VerticalSeparator] \[RawVerticalBar] | \[LeftBracketingBar] \[RawDash] - \[Dash] - ... \[Ellipsis] ...

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 Mathematica groups terms in input expressions. The general rule is that if has higher precedence than , then abc is interpreted as a (bc), and abc is interpreted as (ab)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 Plus is fully associative, as represented by the attribute Flat.

### Precedence of Integration Operators

Forms such as expr1 expr2 have an "outer" precedence just below Power, as indicated in the table above, but an "inner" precedence just above . The outer precedence determines when expr2 needs to be parenthesized; the inner precedence determines when expr1 needs to be parenthesized.
See "Two-Dimensional Input Forms" for two-dimensional input forms associated with integration operators.

### Spaces and Multiplication

Spaces in Mathematica denote multiplication, just as they do in standard mathematical notation. In addition, Mathematica takes complete expressions that are adjacent, not necessarily separated by spaces, to be multiplied together.
 • x y z x*y*z • 2x 2*x • 2(x+1) 2*(x+1) • c(x+1) c*(x+1) • (x+1)(y+2) (x+1)*(y+2) • x! y x!*y • x!y x!*y

Alternative forms for multiplication.

An expression like x!y could potentially mean either (x!)*y or x*(!y). The first interpretation is chosen because Factorial has higher precedence than 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.)
 • x^2y, like x^2 y, means (x^2) y • x/2y, like x/2 y, means (x/2) y • xy is a single symbol, not x*y

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_, Mathematica 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

 • Ordinary keyboard space (\[RawSpace])

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, Greater, b, 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, special 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 ), ], }, as well as semicolon and comma.

## Two-Dimensional Input Forms

xyPower[x,y]
Divide[x,y]
Sqrt[x]
Power[x,1/n]
 a11 a12 ... a21 a22 ...
{{a11,a12,...},{a21,a22,...}}
xyD[y,x]
x,...yD[y,x,...]
 y x Integrate[y,{x,xmin,xmax}] x Integrate[y w/z,{x,xmin,xmax}] y Sum[y,{x,xmin,xmax}] y Product[y,{x,xmin,xmax}]

Two-dimensional input forms with built-in evaluation rules.

Any array of expressions represented by a GridBox is interpreted as a list of lists. Even if the GridBox has only one row, the interpretation is still {{a1, a2, ...}}.
In the form the limits xmin and xmax can be omitted, as can y and w.
 xy Subscript[x,y] x+ SubPlus[x] x- SubMinus[x] x* SubStar[x] x+ SuperPlus[x] x- SuperMinus[x] x* SuperStar[x] x† SuperDagger[x]
 Overscript[x,y] Underscript[x,y] OverBar[x] OverVector[x] OverTilde[x] OverHat[x] OverDot[x] UnderBar[x]

Two-dimensional input forms without built-in evaluation rules.

There is no issue of precedence for forms such as and in which operands are effectively spanned by the operator. For forms such as xy and x a left precedence does need to be specified, so such forms are included in the main table of precedences above.

## Input of Boxes

 • Use a palette • Use control keys

Ways to input boxes.

### Control Keys

 Ctrl+2 or Ctrl+@ square root Ctrl+5 or Ctrl+% switch to alternate position (e.g. subscript to superscript) Ctrl+6 or Ctrl+^ superscript Ctrl+7 or Ctrl+& overscript Ctrl+9 or Ctrl+( begin a new cell within an existing cell Ctrl+0 or Ctrl+) end a new cell within an existing cell Ctrl+- or Ctrl+_ subscript Ctrl+= or Ctrl+Plus underscript Ctrl+Enter create a new row in a table Ctrl+, create a new column in a table Ctrl+. expand current selection Ctrl+/ fraction Ctrl+Space return from current position or state Ctrl+, Ctrl+, Ctrl+, Ctrl+ move an object by minimal increments on the screen

Standard control keys.

On English-language keyboards both forms will work where alternates are given. On other keyboards the first form should work but the second may not.

### Boxes Constructed from Text

When textual input that you give is used to construct boxes, as in StandardForm or TraditionalForm cells in a notebook, the input is handled slightly differently from when it is fed directly to the kernel.
The input is broken into tokens, and then each token is included in the box structure as a separate character string. Thus, for example, xx+yyy is broken into the tokens "xx", "+", "yyy".
 • symbol name (e.g. x123) • number (e.g. 12.345) • operator (e.g. +=) • spacing (e.g. ) • character string (e.g. "text")

Types of tokens in text used to construct boxes.

A RowBox is constructed to hold each operator and its operands. The nesting of RowBox objects is determined by the precedence of the operators in standard Mathematica syntax.
Note that spacing characters are not automatically discarded. Instead, each sequence of consecutive such characters is made into a separate token.

### String-Based Input

 \(...\) input raw boxes \!\(...\) input and interpret boxes

Inputting raw and interpreted boxes.

Any textual input that you give between \( and \) is taken to specify boxes to construct. The boxes are only interpreted if you specify with \! that this should be done. Otherwise x\^y is left for example as SuperscriptBox[x, y], and is not converted to Power[x, y].
Within the outermost \(...\), further \(...\) specify grouping and lead to the insertion of RowBox objects.
 \(box1,box2,...\) RowBox[box1,box2,...] box1\^box2 SuperscriptBox[box1,box2] box1\_box2 SubscriptBox[box1,box2] box1\_box2\%box3 SubsuperscriptBox[box1,box2,box3] box1\&box2 OverscriptBox[box1,box2] box1\+box2 UnderscriptBox[box1,box2] box1\+box2\%box3 UnderoverscriptBox[box1,box2,box3] box1\/box2 FractionBox[box1,box2] \@box SqrtBox[box] form\` box FormBox[box,form] \*input construct box by interpreting input \ insert a space \n insert a newline \t indent at the beginning of a line

String-based ways of constructing raw boxes.

In string-based input between \( and \) spaces, tabs and newlines are discarded. \ can be used to insert a single space. Special spacing characters such as \[ThinSpace], \[ThickSpace] or \[NegativeThinSpace] are not discarded.
When you input typesetting forms into a string, the internal representation of the string uses the above forms. The front end displays the typeset form, but uses the \(...\) notation when saving the content to a file or when sending the string to the kernel for evaluation.

## The Extent of Input Expressions

Mathematica will treat all input that you give on a single line as being part of the same expression.
Mathematica allows a single expression to continue for several lines. In general, it treats the input that you give on successive lines as belonging to the same expression whenever no complete expression would be formed without doing this.
Thus, for example, if one line ends with =, then Mathematica will assume that the expression must continue on the next line. It will do the same if for example parentheses or other matchfix operators remain open at the end of the line.
If at the end of a particular line the input you have given so far corresponds to a complete expression, then Mathematica will normally begin immediately to process that expression.
You can however explicitly tell Mathematica that a particular expression is incomplete by putting a \ or a (\[Continuation]) at the end of the line. Mathematica will then include the next line in the same expression, discarding any spaces or tabs that occur at the beginning of that line.

## Special Input

 ?symbol get information ??symbol get more information ?s1s2... get information on several objects !command execute an external command (text-based interface only) !!file display the contents of an external file (text-based interface only)

Special input lines.

In most implementations of Mathematica, you can give a line of special input anywhere in your input. The only constraint is that the special input must start at the beginning of a line.
Some implementations of Mathematica may not allow you to execute external commands using !command.

## Front End Files

Notebook files as well as front end initialization files can contain a subset of standard Mathematica language syntax. This syntax includes:
• Lists in {...} form. The operators ->, :> and &. Function slots in # form.
• Various Mathematica operators such as +, *, ;, etc.
• Special characters in \[Name], \:nnnn or \.xx form.
• String representation of boxes involving \(, \) and other backslash operators.
• Mathematica comments delimited by (* and *).