Search Knowledge

© 2026 LIBREUNI PROJECT

Complex Numbers

Complex Numbers

Complex numbers expand the real number system by introducing the imaginary unit ii, where i2=1i^2 = -1.

Arithmetic in the Complex Plane

A complex number zz is written as x+iyx + iy, where xx is the real part and yy is the imaginary part. Addition and multiplication follow standard algebraic rules, with i2=1i^2 = -1.

python
1# Python supports complex numbers natively using 'j'
2z1 = 3 + 4j
3z2 = 1 - 2j
4 
5# Addition
6print(f"z1 + z2 = {z1 + z2}")
7 
8# Multiplication (3+4j)*(1-2j) = 3 - 6j + 4j - 8j^2 = 3 - 2j + 8 = 11 - 2j
9print(f"z1 * z2 = {z1 * z2}")
10 
11# Magnitude (Absolute Value)
12print(f"|z1| = {abs(z1)}")

Polar Form and Euler’s Formula

Complex numbers can be represented in polar coordinates (r,θ)(r, \theta). Euler’s Formula connects the exponential function to trigonometry: eiθ=cosθ+isinθe^{i\theta} = \cos \theta + i \sin \theta Thus, z=reiθz = r e^{i\theta}.

python
1import cmath
2import math
3 
4z = 1 + 1j
5r, theta = cmath.polar(z)
6print(f"r: {r:.3f}, theta: {theta:.3f} rad")
7 
8# Euler's Identity: e^(i*pi) + 1 = 0
9identity = cmath.exp(1j * math.pi) + 1
10print(f"e^(i*pi) + 1 = {identity.real:.1f} + {identity.imag:.1f}j")

Fundamental Theorem of Algebra

The Fundamental Theorem of Algebra states that every non-constant polynomial of degree nn with complex coefficients has exactly nn complex roots (counting multiplicity).

What is the result of (1 + i)^2?

Which identity is known as Euler's Identity?