Linear Circuit Analysis


Complex numbers

Representation of complex numbers

Complex numbers ofen appear in AC analysis problems. Therefore, before starting the AC analsysis module it is good to get familiar with the different ways to represent complex numbers, how to convert from one representation to another, and how to perform simple mathematical operations such as addition, subtraction, multiplication, and division with complex numbers.

The two most common representations of complex numbers are in rectangular and in polar form. When represented in rectangular form complex number are written as the sum of a real and an imaginary part, such as $$\begin{equation}z=a+b j\end{equation}$$ where $a$ and $b$ are the real and imaginary parts of the complex number and $\textcolor{blue}{j} = \sqrt{-1}$

When represented in polar form (also called phasor form or exponential form), the complex numbers are written as a combination of their magnitude (also called modulus or absolute value) $r$ and argument (also called angle) $\theta$, such as z=magangle(r,theta)=r*exp(theta) = r e^theta = r(cos(theta)+j sin(theta)) Note that:

  1. No matter what form we use to express a complex number, we will always need two real values (either the real and imaginary parts or the magnitude and argument).
  2. The magnitude of a complex number is always positive or zero (if the number is equal to $0$).
  3. The argument (angle) of a complex number can vary between $-\pi \lt \theta \le \pi$ (or $-180^{\textcolor{gray}\circ} \lt \theta \le 180^{\textcolor{gray}\circ}$). Since adding $360^{\textcolor{gray}\circ}$ to the angle does not change the location of the vector represented by it, sometimes the argument is expressed in the interval $0 \le \theta \lt 2\pi$ (or $0 \le \theta \lt 360^{\textcolor{gray}\circ}$)

Complex numbers can be represented by points in the two-dimensional plane as shown in Fig. 1. The $x$ and $y$ coordinates of the two point are the real and imaginary part of the complex number. The distance from the origin to the point is the magnitude of the complex number, while the angle between the vector connecting the origin with the point and the horizontal axis is the argument.

Fig. 1. Graphical representation of a complex number in the plane. The horizontal axis denotes the real coordinate of the complex number, while the vertical axis is the imaginary part.

Converting from polar to rectangular form

One can always convert from polar to rectangular form using the following equations $$\begin{equation}x=r \sin{\theta}\end{equation}$$ $$\begin{equation}y=r \cos{\theta}\end{equation}$$

For instance, z=magangle(5,30) can be represented as $z=5 (\cos{30^{\textcolor{gray}\circ}} + \textcolor{blue}{j} \sin{30^{\textcolor{gray}\circ}})=4.33 + 2.5 j$. Whenever converting a complex from rectangular to polar form it is useful to represent the complex number in graphically to find in which quadrant it lies (see image below).

Converting from rectangular to polar form

One can also convert from rectangular to polar form using the following equations $$\begin{equation}r=\sqrt{x^2+y^2}\end{equation}$$ $$\begin{equation}\theta=atan2(y, x)\end{equation}$$ where $atan2$ is the 2-argument arctangent function.

The $atan2$ function takes into consideration the sign of the real and imaginary parts of the real number and correctly provides and answer between $-\pi$ and $\pi$. For instance, z=3-4 j = magangle(sqrt(3^2+4^2),-53.13)=5 magangle(5,-53.13) because $atan2(-4,3)=-4.76\,{\textcolor{gray}{rad}}=-53.13^{\textcolor{gray}\circ}$ (see Fig. 2).

Fig. 2. Graphical representation of z=3-4 j=magangle(5,-53.13) in the plane.
Mathematical operations with complex numbers in rectangular form

Consider two complex numbers expressed in rectangular form: $z_1=a+\textcolor{blue}{j} b$ and $z_2=c+\textcolor{blue}{j} d$.

  1. Addition.
    $$\begin{equation}z_1+z_2=a+c+\textcolor{blue}{j} (b+d)\end{equation}$$
  2. Subtraction.
    $$\begin{equation}z_1-z_2=a-c+\textcolor{blue}{j} (b-d)\end{equation}$$
  3. Multiplication.
    $$\begin{equation}z_1 z_2=a c - b d+\textcolor{blue}{j} (b c+a d)\end{equation}$$ where we used $\textcolor{blue}{j} \cdot \textcolor{blue}{j}=-1$
  4. Division.
    $$\begin{equation}\frac{z_1}{z_2}=\frac{a+\textcolor{blue}{j} b}{c+\textcolor{blue}{j} d}=\frac{(a+\textcolor{blue}{j} b)(c-\textcolor{blue}{j} d)}{(c+\textcolor{blue}{j} d)(c-\textcolor{blue}{j} d)}=\frac{a c + b d+\textcolor{blue}{j} (b c-a d)}{c^2+d^d}\end{equation}$$ which can next be separated into real and imaginary part.

The complex conjugate of a complex number $z=a+\textcolor{blue}{j} b$ is denoted by $z^*$ and is defined as

$$\begin{equation}z^*=(a+\textcolor{blue}{j} b)^* = a-\textcolor{blue}{j} b\end{equation}$$

The complex conjugate has the folowing important properties

$$z \cdot z^*=(a+\textcolor{blue}{j} b)(a-\textcolor{blue}{j} b) = a^2 + b^2$$ $$(z_1 + z_2)^*= z_1^* + z_2^*$$ $$(z_1 - z_2)^*= z_1^* - z_2^*$$ $$(z_1 z_2)^*= z_1^* z_2^*$$ $$\left(\frac{z_1}{z_2}\right)^*= \frac{z_1^*}{z_2^*}$$

The magnitude (also called modulus or absolute value) of a complex number $z=a+\textcolor{blue}{j} b$ has the following properties which we often use to compute the magnitude or voltages and currents in linear circuits

$$|z|=\sqrt{z \cdot z^*}=\sqrt{a^2+b^2}$$ $$\left|z_1 z_2\right|= |z_1|\cdot |z_2|$$ $$\left|\frac{z_1}{z_2}\right|= \frac{|z_1|}{|z_2|}$$
Mathematical operations with complex numbers in polar form

Most often, in linear circuits, we prefer to perform mathematical operations with complex numbers in rectangular form. However, sometimes, it might be more convenient to perform these operations in polar form. For instance, consider two complex numbers expressed in polar form: magangler(r_1,theta_1) and magangler(r_2,theta_2). We have:

  1. Multiplication.
    magangler(r_1,theta1) * magangler(r_2,theta2)= magangler(r_1 r_2,theta1+theta2)
  2. Division.
    magangler(r_1,theta1) / magangler(r_2,theta2)= magangler(r_1/r_2,theta1-theta2)

The complex conjugate of magangler(r,theta) is magangler(r,-theta) while the $n$-th power can be computed using de Moivre's formula

$$\begin{equation}z^n= \left[r(\cos\theta + \textcolor{blue}{j} \sin \theta)\right]^n=r^n(\cos{n\theta} + \textcolor{blue}{j} \sin{n\theta})\end{equation}$$ or, in more concise form (magangler(r,theta))^n=magangler(r^n,n theta).
Sample Solved Problems
See also
Read more

Complex number
The 2-argument arctangent function (atan2)
De Moivre's formula