Operators for Complex Numbers

The following list of operators are specific for complex number expressions.

Syntax

Description

Example

| expr_cplx |

Magnitude (or complex modulus) of a complex number

| ( 2, 3) |

@ expr_cplx

Argument of a complex number

@ (2, 3)

~ expr_cplx

Complex conjugate of a complex number

~ (2, 3)

expr_cplx1 + expr_cplx2

Addition of two complex numbers

(2, 3) + (4, 5)

expr_cplx1 - expr_cplx2

Subtraction of two complex numbers

(2, 3) - (4, 5)

expr_cplx1 * expr_cplx2

Multiplication of two complex numbers

(2, 3)* (4, 5)

expr_cplx1 / expr_cplx2

Division of two complex numbers

(2, 3 )- (4, 5)

expr_real * expr_cplx

Multiplication by a real number

5 * (3, 4)

expr_cplx / expr_real

Division by a real number

(3, 4 ) /5

expr_cplx1 ^ expr_cplx2

Powers of complex numbers

(3, 4) ^ (2, 3)

expr_cplx . rpart

Real part of a complex number

(3,4) . rpart == 3

expr_cplx . ipart

Imaginary part of a complex number

(3,4) . ipart == 4

Where expr_cplx, expr_cplx1, and expr_cplx2 are any valid complex expression, and expr_real is any valid real number expression.

Download and open sample.