# Complex number functions

Release: 4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3

As a general rule, you can pass a complex number to nearly any of the built-in mathematical functions described elsewhere in this manual for which a complex variation of the function is meaningful. For example, you can evaluate Sqrt(3 + 2j), Exp(4 - 1j), Ln(-1 - 3j), ArcCos(1 - 2j), (3 + 2j)^(1 - 3j), and so on.

## EnableComplexNumbers

There are several standard mathematical functions that produce a complex number when passed a real-valued parameter -- for example, Sqrt(-1) or ArcCos(2). These will produce a warning and return NaN unless you have enabled complex numbers. To enable complex numbers, make sure you are in edit mode with no object selected, then select Definition → System Variables → Settings → EnableComplexNumbers. Change the definition to 1. After it is changed, these functions return a complex result without a warning.

Degrees or radians?: Analytica’s trigonometric functions operate using degrees rather than radians, but exponential and logarithm functions, when applied to complex numbers, operate in radians so as to produce the conventional results. Hence, Euler’s identity becomes

Exp(1j*x) = Cos(Degrees(x)) + 1j * Sin(Degrees(x))

The scalar functions listed here are specific to complex numbers. For more details on using complex numbers, Complex Numbers and Complex Numbers.

## Abs(x)

The magnitude of a complex number.

Abs(3 - 4j) → 5

See more at Abs().

## ComplexDegrees(x)

The phase of a complex number in degrees, between -180 and 180.

ComplexDegrees(-1 + 1j) → 135

See more at ComplexDegrees().

The phase of a complex number in radians, between -π and π.

ComplexRadians(-1j) → -1.571

## Conj(x)

The complex conjugate on a number.

Conj(4 + 8j) → 4 - 8j

See more at Conj().

## ImPart(x)

The imaginary part of a complex number.

ImPart(3+4j) → 4

See more at ImPart().

## RealPart(x)

The real part of a complex number.

RealPart(3 + 4j) → 3

See more at RealPart().