### 17.2 Complex Arithmetic

The following functions are available for working with complex numbers. Each expects a single argument. Given a matrix they work on an element by element basis. In the descriptions of the following functions, z is the complex number x + iy, where i is defined as `sqrt (-1)`.

— Mapping Function: abs (z)

> Compute the magnitude of z, defined as |z| = `sqrt (x^2 + y^2)`.

> For example,

>               abs (3 + 4i)
>                     5

— Mapping Function: arg (z)
— Mapping Function: angle (z)

> Compute the argument of z, defined as theta = `atan (`y`/`x`)`. in radians.

> For example,

>               arg (3 + 4i)
>                     0.92730

— Mapping Function: conj (z)

> Return the complex conjugate of z, defined as `conj (`z`)` = x - iy.

> See also: real, imag.

— Mapping Function: imag (z)

> Return the imaginary part of z as a real number.

> See also: real, conj.

— Mapping Function: real (z)

> Return the real part of z.

> See also: imag, conj.