Subscripts
Maple has two types of subscripts: index subscripts and subscripted variable names, sometimes called literal subscripts.
Action
Shortcut Key
Palette Entry
Index Subscript
Ctrl + Shift + _ (Command + Shift + _, for Mac)
Subscripted Variable Name
__(two underscores)
The first is used when you want to refer to an entry in a list or Matrix. This is referred to as an index subscript.
If a list is defined by
L≔1.2, 3.5, 6.1
L≔1.2,3.5,6.1
Then you can select the second entry using square brackets.
L2
3.5
Alternatively, you can use subscript notation
which is found on the Expression palette. Note the tooltip for it shows the equivalent square bracket notation.
If a matrix is defined by
M≔1,2,3;−4,−3,−2
M≔123−4−3−2
We can select any entry using M[i,j]
M1,2
2
or using the subscript notation Mi,j.
The shortcut key to enter an index subscript is Ctrl + Shift + _ (Command + Shift + _, Mac)
For more information, see indexed.
You can change the shortcut key for index subscripts to a simple underscore, if desired. For details, see Underscore Entry in the Options>Interface help page.
The second type of subscript is a subscripted variable name. In the example below, x__1 is a name that is not related to the name x. This is sometimes referred to as a literal subscript. To enter a subscripted variable name in Maple, use the second subscripted name shown in the Expression palette, . It is shown all in one color.
To enter a subscripted variable name using a shortcut key, type two underscores (__).
x≔1,2,3
x≔1,2,3
x__1≔a
Note we have not changed the entries of the list x because x__1 is simply a subscripted variable name that is not related to x.
x
1,2,3
In Maple, subscripted variable names are one kind of atomic variable. There is an option in the View menu that displays atomic variables in a different color, to visibly distinguish them from other math. For more information, see atomic variables.
Here, we form an indexed name, yi and then verify it is of type indexed.
yi
typeyi,indexed
true
Next form a subscripted name using double underscores.
x__i
typex__i,indexed
false
The subscripted name is of type symbol.
typex__i,symbol
typeyi,symbol
For more information, see type/indexed and type/symbol.
See Also
2-D Math Shortcut Keys and Hints
Atomic Variables
Expression Palette
indexed
type/indexed
type/symbol
Underscore Entry
Download Help Document