Subscripts - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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)

 

Index Subscript

Subscripted Variable Name

Index Subscript

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

L1.2, 3.5, 6.1

L1.2,3.5,6.1

(1)

Then you can select the second entry using square brackets.

L2

3.5

(2)

Alternatively, you can use subscript notation

 L2

3.5

(3)

which is found on the Expression palette.  Note the tooltip for it shows the equivalent square bracket notation.

 

If a matrix is defined by

M1,2,3;4,3,2

M123−4−3−2

(4)

We can select any entry using M[i,j]

M1,2

2

(5)

 

or using the subscript notation Mi,j.

M1,2

2

(6)

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.

Subscripted Variable Name

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 (__).

x1,2,3 

x1,2,3

(7)

x__1a

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

(8)

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

yi

(9)

typeyi,indexed

true

(10)

Next form a subscripted name using double underscores.  

x__i

x__i

(11)

typex__i,indexed

false

(12)

 The subscripted name is of type symbol.

typex__i,symbol

true

(13)

typeyi,symbol 

false

(14)

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