Complex Numbers
Complex Numbers
Complex numbers extend the real number system by introducing the imaginary unit,
allowing us to solve equations like x
2
+1=0, which have no real solutions.
x
2
+1=0
Rearranging:
x
2
=−1
i=
−1
i
2
=−1
z=a+bi
where:
a = real part
b = imaginary part
i=
−1
Example:
5+3i
Real part = 5
Imaginary part = 3
Examples:
5
-3
0
π
5+0i
Pure Imaginary Number
Examples:
5i
−3i
0.2i
Complex Number
Examples:
2+3i
−4−8i
7−i
Equality of Complex Numbers
Two complex numbers are equal only if their corresponding parts are equal.
If
a+bi=c+di
then
a=c
and
b=d
Example:
2+7i=x+yi
Therefore,
x=2,y=7
The Complex Plane
A complex number can be represented as a point.
Example:
3+4i
is plotted at
(3,4)
Addition
Example:
(3+2i)+(5−7i)
Real:
3+5=8
Imaginary:
2−7=−5
Answer:
8−5i
Subtraction
Example:
(7+3i)−(2+8i)
Real:
7−2=5
Imaginary:
3−8=−5
Answer:
5−5i
Multiplication
Remember:
i
2
=−1
Example:
(2+3i)(4+5i)
Expand:
8+10i+12i+15i
2
Since
i
2
=−1
8+22i−15
−7+22i
Powers of i
Power Value
i
0
1
i
1
i
i
2
-1
i
3
−i
i
4
1
i
5
i
i
6
-1
i
7
−i
Cycle:
1, i, −1, −i
Division
Example:
4−5i
3+2i
Conjugate:
4+5i
Then:
(4−5i)(4+5i)
(3+2i)(4+5i)
4
2
+5
2
=41
The numerator:
12+15i+8i+10i
2
12+23i−10
2+23i
Final answer:
41
2
+
41
23
i
Complex Conjugate
If
z=a+bi
z
=a−bi
Examples:
Number Conjugate
3+2i 3−2i
5−7i 5+7i
−4+i −4−i
Why Are Conjugates Useful?
Because
(a+bi)(a−bi)=a
2
+b
2
Example:
(5+2i)(5−2i)
25−4i
2
25+4
29
Modulus
If
z=a+bi
then
∣z∣=
a
2
+b
2
Example:
3+4i
∣z∣=
3
2
+4
2
=
25
=5
Argument
The argument is the angle the complex number makes with the positive real axis.
It is usually written as
θ=tan
−1
(
a
b
Polar Form
Instead of
a+bi
we write
r(cosθ+isinθ)
where
r = modulus
θ = argument
Example:
1+i
Modulus:
Argument:
45
∘
Polar form:
(cos45
∘
+isin45
∘
)
Euler's Formula
e
iθ
=cosθ+isinθ
Hence,
r(cosθ+isinθ)=re
iθ
Euler's Identity
Setting θ=π:
e
iπ
+1=0
e
i
π
1
0
De Moivre's Theorem
If
z=r(cosθ+isinθ)
then
z
n
=r
n
(cos(nθ)+isin(nθ))
2 square roots
3 cube roots
n nth roots
These roots are equally spaced around a circle in the complex plane.
Properties
For z=a+bi:
Real part:
Re(z)=a
Imaginary part:
Im(z)=b
Conjugate:
z
=a−bi
Modulus:
∣z∣=
a
2
+b
2
Useful identities:
z
z
=∣z∣
2
z+w
=
z
+
w
zw
=
z
w
Supported Operations in Python
Examples:
z = 3 + 4j
+ Addition
- Subtraction
* Multiplication
/ Division
** Exponentiation (including complex exponents)
== and != Comparison for equality
abs(z) Modulus
[Link] Real part
[Link] Imaginary part
[Link]() Complex conjugate
Not supported:
Complex numbers unify algebra and geometry, making it possible to solve equations
that have no real solutions and providing indispensable tools for modern
mathematics, physics, engineering, and computer science.