Complex Functions (4)

Complex number operations

arg
Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).
Syntax
arg(x)
Parameters
NameTypeDescription
xnumber | BigNumber | Complex | Array | Matrix
Returns
number | BigNumber | Array | Matrix — The argument of x
Examples
arg(2 + 2i)
atan2(3
2)
arg(2 + 3i)
See Also
re im conj abs
conj
Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.
Syntax
conj(x)
Parameters
NameTypeDescription
xnumber | BigNumber | Complex | Array | Matrix | Unit
Returns
number | BigNumber | Complex | Array | Matrix | Unit —
Examples
conj(2 + 3i)
conj(2 - 3i)
conj(-5.2i)
See Also
re im abs arg
im
Get the imaginary part of a complex number.
Syntax
im(x)
Parameters
NameTypeDescription
xnumber | BigNumber | Complex | Array | Matrix
Returns
number | BigNumber | Array | Matrix — The imaginary part of x
Examples
im(2 + 3i)
re(2 + 3i)
im(-5.2i)
im(2.4)
See Also
re conj abs arg
re
Get the real part of a complex number.
Syntax
re(x)
Parameters
NameTypeDescription
xnumber | BigNumber | Complex | Array | Matrix
Returns
number | BigNumber | Array | Matrix — The real part of x
Examples
re(2 + 3i)
im(2 + 3i)
re(-5.2i)
re(2.4)
See Also
im conj abs arg