27/01/2025
Complex Numbers
βͺ A number represented by π = π₯ + ππ¦ is a complex number where π₯ and π¦
are two real numbers and π =
−1
βͺ This representation is defined rectangular form
Imaginary Axis
COMPLEX NUMBERS IN MATLAB
(x, y)
z
βͺ A complex number π can be expressed as a vector
r
π = (π₯, π¦) on a plane.
ο±
π₯ = π
π π
π¦ = πΌπ(π)
Real Axis
2
1
2
Complex Numbers in Polar Form
βͺ The Polar Form represents an alternate way to express Complex numbers.
π = π = πππ π =
π₯2 + π¦ 2
π = ∠ π = πππ π = tan −1
In matlab, enter the following commands:
>> z=3-5i
Imaginary Axis
(x, y)
z
r
βͺ If we have π and π, then π₯ and π¦
are obtained by:
>> real (z)
>> imag(z)
>> conj(z)
ο±
Real Axis
π₯ = ππππ π = π
π π
π¦ = ππ πππ = πΌπ π
4
3
3
and
π¦
π₯
4
1
27/01/2025
Euler’s Formula
βͺ
Representation of Complex Numbers in MATLAB
Euler's formula, determined by the Swiss Leonhard Euler, establishes a
mathematical relationship between trigonometric functions and the complex
exponential function.
βͺ
Complex numbers can be expressed both in rectangular and polar form
•
The Rectangular form is described by a simple addition of a real and
imaginary part:
π = π + ππ
πππ = πππ π + ππ πππ
βͺ
βͺ Note: Since i in electronics is often used to describe current, some
times j is used. In MATLAB, they are equivalent
Therefore,
π = ππππ π + πππ πππ = π(πππ π + ππ πππ)
π = ππππ
βͺ
The Polar form can be described in terms of Euler’s formula;
π = π ∗ exp(π ∗ π‘βππ‘π)
βͺ
Common engineering notation of the polar form:
ππππ
≡ π∠π
5
5
6
6
Representation of Complex Numbers in MATLAB
βͺ
Example:
Example: convert the following complex number to polar form.
βͺ
Example: Convert the following complex number to rectangular form.
π = 4 + π3
π = 4ππ2
π₯2 + π¦ 2 = 4 2 + 3 2 = 5
3
π = tan−1 = 36.87 ° 0.6435 πππ
4
π = 5∠36.87 °
π=
π₯ = 4πππ 2 = −1.6646
>> z=4+3i;
>> r=abs(z)
r=5
>> theta_rad=angle(z)
heta_rad=0.6435
>> theta_degree=theta_rad*(180/pi)
theta_degree=36.87
>> a=r*exp(i*theta_rad)
a=4.0000 + 3.0000i
βͺ
In MATLAB:
>> z=4*exp(2i)
z =
-1.6646 + 3.6372i
8
7
7
π¦ = 4π ππ2 = 3.6372
π = −1.6646 + π3.6372
8
2