lab.faris0x.dev

Complex numbers

Add, subtract, multiply, or divide two complex numbers, change to polar form, and use de Moivre for powers and roots. The Argand diagram plots the input and the result.

Complex numbers

Examples
zz = + ii
ww = + ii

Exact input: fractions such as 3/43/4 and decimals such as 0.50.5. Both parts of each number are needed.

Arithmetic

Real and imaginary parts are collected separately. Multiplication uses (a+bi)(c+di)=(ac−bd)+(ad+bc)i(a + bi)(c + di) = (ac - bd) + (ad + bc)i. Division multiplies top and bottom by the conjugate of the denominator.

Polar form

The modulus is r=∣z∣=a2+b2r = |z| = \sqrt{a^2 + b^2}, and the argument is θ=arg⁡z\theta = \arg z.

Then z=r(cos⁡θ+isin⁡θ)=reiθ.z = r(\cos\theta + i\sin\theta) = re^{i\theta}.

Powers and roots

De Moivre gives zn=rn(cos⁡nθ+isin⁡nθ)z^n = r^n(\cos n\theta + i\sin n\theta). A principal nnth root is z0=∣z∣1/neiθ/nz_0 = |z|^{1/n}e^{i\theta/n}. With ω=e2πi/n\omega = e^{2\pi i/n}, the roots are {1,ω,…,ωn−1}\{1, \omega, \ldots, \omega^{n-1}\} on the unit circle, or z0z_0 times those values for a general zz.

Argand diagram

The horizontal axis is the real part and the vertical axis is the imaginary part. Inputs are shown in a neutral colour, results and roots in the accent colour. A dashed circle marks the modulus when it is relevant.

Export

The tab previews the working and lets you copy or download the .tex source.