Complex Numbers

You can enter complex numbers in the Wolfram Language just by including the constant (RefLink[I, paclet:ref/I]), equal to (Sqrt[-1]). Make sure that you type a capital (RefLink[I, paclet:ref/I]).

If you are using notebooks, you can also enter (RefLink[I, paclet:ref/I]) as i by typing Esc ii Esc (see "Mathematical Notation in Notebooks: Numerical Calculations"). The form i is normally what is used in output. Note that an ordinary i means a variable named i, not (Sqrt[-1]).

This gives the imaginary number result 2i:

Sqrt[-4]

This gives the ratio of two complex numbers:

(4+3 I)/(2-I)

Here is the numerical value of a complex exponential:

Exp[2+9 I]//N

Complex number operations.