# Complex

## Constants

Symbol Description
ImaginaryUnit $$\imaginaryI$$ The imaginary unit, solution of $$x^2+1=0$$

## Functions

### Real

["Real", z]

\Re(3+4\imaginaryI)
$\Re(3+4\imaginaryI)$

Evaluate to the real part of a complex number.

["Real", ["Complex", 3, 4]]
// ➔ 3


### Imaginary

["Imaginary", z]

\Im(3+4\imaginaryI)
$\Im(3+4\imaginaryI)$

Evaluate to the imaginary part of a complex number. If z is a real number, the imaginary part is zero.

["Imaginary", ["Complex", 3, 4]]
// ➔ 4

["Imaginary", "Pi"]
// ➔ 0


### Conjugate

["Conjugate", z]

z^\ast
$z^\ast$

Evaluate to the complex conjugate of a complex number. The conjugates of complex numbers give the mirror image of the complex number about the real axis.

$z^\ast = \Re z - \imaginaryI \Im z$

["Conjugate", ["Complex", 3, 4]]
// ➔ ["Complex", 3, -4]


### Abs

["Abs", z]

|z|
$|z|$
\operatorname{abs}(z)
$\operatorname{abs}(z)$

Evaluate to the magnitude of a complex number.

The magnitude of a complex number is the distance from the origin to the point representing the complex number in the complex plane.

$|z| = \sqrt{(\Im z)^2 + (\Re z)^2}$

["Abs", ["Complex", 3, 4]]
// ➔ 5


### Arg

["Arg", z]

\arg(z)
$\arg(z)$

Evaluate to the argument of a complex number.

The argument of a complex number is the angle between the positive real axis and the line joining the origin to the point representing the complex number in the complex plane.

$\arg z = \tan^{-1} \frac{\Im z}{\Re z}$

["Arg", ["Complex", 3, 4]]
// ➔ 0.9272952180016122


### AbsArg

["AbsArg", z]

Return a tuple of the magnitude and argument of a complex number.

This corresponds to the polar representation of a complex number.

["AbsArg", ["Complex", 3, 4]]
// ➔ [5, 0.9272952180016122]


$3+4\imaginaryI = 5 (\cos 0.9272 + \imaginaryI \sin 0.9272) = 5 \exponentialE^{0.9272}$

### ComplexRoots

["ComplexRoots", z, n]

\operatorname{ComplexRoot}(1, 3)
$\operatorname{ComplexRoot}(1, 3)$

Retrurn a list of the nth roots of a number z.

The complex roots of a number are the solutions of the equation $$z^n = a$$.

// The three complex roots of unity (1)
["ComplexRoots", 1, 3]
// ➔ [1, -1/2 + sqrt(3)/2, -1/2 - sqrt(3)/2]