How Do I - Maple Programming Help

Home : Support : Online Help : Getting Started : How Do I... : HowDoI/EnterAComplexNumber

How Do I

 Enter a Complex Number?

In Maple, the default representation of the imaginary unit $\sqrt{-1}$ is I. Thus,  is a complex number in Maple. The example below demonstrates two ways to enter a complex number in Maple.

Maple provides a way to customize the manner in which complex numbers are displayed. For instance, you may want to use i or j as the imaginary unit instead of I.

Example: Multiply Two Complex Numbers

Maple uses $I$ for the constant $\sqrt{-1}$. Multiply   by   and display the result inline.

 Step Description Illustration 1 Type . Put a space between 2 and $I$  to signify multiplication. (Alternatively, use * for multiplication.) 2 Enter * and then type . 3 Press Ctrl + = to evaluate the expression inline.   Note that the multiplication symbol is needed between the two expressions in parentheses. = ${-5}{+}{10}{}{I}$ Using the Palette You can also enter complex numbers using the Common Symbols palette. From the palette, the symbols $i$, $ȷ$, and $I$ can all be used to enter a complex number.   Note that simply typing $i$ will not produce the imaginary unit, but typing $I$ will.

When you type the letter i or j in Maple, it is understood as the name i or j. Only I is an initially known constant. This means:

 • You can use i or j as variables. For instance, as the index in expressions such as $\mathrm{seq}\left({i}^{2},i=1..5\right)$ = ${1}{,}{4}{,}{9}{,}{16}{,}{25}$.
 • Typing $I$ results in the imaginary constant. Thus, ${I}^{2}$ = ${-}{1}$.
 • From the Common Symbols palette: $i$, $ȷ$, and $I$ all mean the imaginary constant.
 • Results are displayed using I for the constant $\sqrt{-1}$. For example, ${x}^{2}+1=0$$\stackrel{\text{solve}}{\to }$$\left\{{x}{=}{I}\right\}{,}\left\{{x}{=}{-}{I}\right\}$.

Using a Different Symbol for the Imaginary Unit

You can customize the setting that specifies which symbol represents the imaginary unit. This will enable you to simply type this symbol to get $\sqrt{-1}$. Furthermore, ordinarily in output the imaginary unit is displayed with a capital I, no matter which symbol was used for input. By changing this setting, you change the output display.

 Step Description Illustration 1 To change the symbol used for the imaginary unit, (both for input and output), use the interface command. The calling sequence is interface(imaginaryunit=symbol);   Here, we set $j$ to be the symbol for the imaginary unit. 2 Thereafter, clicking on $i$, $ȷ$, or $I$ in the Common Symbols palette, or typing the letter $j,$will produce the imaginary unit, and its symbol as displayed in any output will be $ȷ$. From the palette: By typing:   In computations: 

 Related Topics The How Do I... topics cover the essentials for doing mathematics in Maple. Learn more about available tools and features, such as palettes and the context panel. Refer to Help>Quick Reference for basic Getting Started tips.