*Cartesian Form**Polar or Exponential Form**Euler's Identities**Conjugate**Operations on two complex numbers**nth power and nth roots of a complex number**Functions of a complex variable**Complex functions of a real variable**Magnitude and Phase Plot**Examples and References**History**Why use complex numbers?*

We will use the letter $j$ to refer to the imaginary number $\sqrt{-1}$. Even though $j$ is not a real number, we can perform all arithmetic operations such as addition, subtraction, multiplication, division with $j$ using the algebra of real numbers.

A complex number $z$ is any number of the form $z = x+jy$, where $x$ is called the real part of $z$ and $y$ is called the imaginary part of $z$. Note: The imaginary part is not $jy$, rather it is only $y$. It is important to stick to this terminology, otherwise computations can go wrong. Often, it is useful to think of a complex number $z = x + j y$ as a vector in a two-dimensional plane as shown in the figure below, where $x$ is the $X$-coordinate and $y$ is $Y$-coordinate of the vector. Due to this relationship between a complex number and the corresponding vector, we will abuse the terminology and use the terms complex number and vector interchangeably, if the context should resolve any possible ambiguity. For example, a complex number is said to lie in the first quadrant (or, second quadrant etc) if the corresponding vector lies in the first quadrant (or, second quadrant etc).

When a complex number is thought of as a vector in two dimensions, the $X$ coordinate $x$ and the $Y$ coordinate $y$ can be expressed in terms of the length of the vector $r$ and the angle made by this vector with the positive $X$-axis, namely $\theta$. Since $x = r \cos \theta$ and $y = r \sin \theta$, $z$ can be expressed as

(1)where $\theta$ can be in degrees or radians (usually radians) and recall that $2 \pi \mbox{ rad } = 360\,^\circ$. $r$ is called the magnitude of $z$, denoted by $|z|$ and $\theta$ is called the phase of the complex number $z$, denoted by $\mbox{arg}{z}$ or $\angle z$.

Using Euler's identities $z$ can be written as

(2)This is known as the polar form or exponential form and it is very important to be able to convert a complex number from cartesian form to exponential form and vice versa. It is easy to see that $x,y,r$ and $\theta$ are related according to

(3)**Example:**

It is very useful to know the polar form for often used complex numbers such as $1,j,-j,-1$. They are given by $1 = e^{j0}, -1 = e^{j \pi}, j = e^{j \frac{\pi}{2}}, -j = e^{-j \frac{\pi}{2}}$.

**Caution:** $r$ must be positive in the above expression. For example, if $z = -2 e^{j \frac{\pi}{4}}$, we must rewrite $z$ as $z = 2 e^{j \frac{5 \pi}{4}}$ and interpret $r$ as $2$ instead of $-2$.

**Caution:** The above expression for $\theta$ in (3) does not identify $\theta$ uniquely, since $\tan(\theta) = \frac{y}{x}$ also implies that $\tan(\theta \pm \pi) = \frac{y}{x}$. It is best think of the vector $(x,y)$ and determine which quadrant this vector lies in based on the signs of $x,y$ and then make sure $\theta$ corresponds to an angle in the correct quadrant.

**Example:**

Suppose $z_1 = \frac{\sqrt{3}}{2}+j\frac{1}{2}$ and $z_2 = -\frac{\sqrt{3}}{2}-j\frac{1}{2}$. It is easy to see that $\tan^{-1}\left(\frac{y_1}{x_1} \right)=\tan^{-1}\left(\frac{y_2}{x_2} \right)$. However, $z_1$ is complex number in the first quadrant, whereas $z_2$ is a complex number is the 3rd quadrant. Therefore, $\theta_1$ should be $\pi/6$ and $\theta_2$ should be $7 \pi/6$.

One important aspect of the polar form for a complex number is that adding $2 \pi$ to the angle does not change the complex number. Particularly,

(4)This fact will be repeatedly used in the course. An immediate example of where this is useful is given in section of nth root of a complex number.

**Example:**

Express $e^{j 2 \pi}, e^{-j \pi}, e^{j \frac{3 \pi}{2}}, e^{j \frac{9 \pi}{2}}$ in Cartesian form.

In the expansion of $e^{j\theta}$ if one replaces $\theta$ by $j \theta$ and $-j \theta$, we get the following two equations, respectively.

(5)From the above equations and along with the expansions of $cos \theta$ and $sin \theta$ the following relationship can be seen to be true:

(6)The conjugate of a complex number $z = x + j y$ is given by $z^* = x - j y$. When $z$ is written in polar form as $z = r e^{j \theta}$, the complex conjugate is given by $z^* = r e^{-j \theta}$. In general, to compute the conjugate of a complex number, replace $j$ by $-j$ everywhere.

Let $z = x + j y = r e^{j \theta}$, $z_1 = x_1 + j y_1 = r_1 e^{j \theta_1}$ and $z_2 = x_2 + j y_2 = r_2 e^{j \theta_2}$

(7)Based on the above operations, the following facts about complex number can be verified.

(8)Let $z_0 = x_0 + j y_0 = r_0 e^{j \theta_0}$. For any integer $n$, the $n$th power of $z$, $z^n$ is simply obtained by using multiplication operation $n$ times. In the polar form, $z_0^n = r_0^n e^{j n \theta_0}$. Just like how the two real numbers $1$ and $-1$ have the same square, different complex numbers can have the same $n$th power.

Consider the set of distinct complex numbers $z_k = e^{j \theta_0 + \frac{2 \pi k}{n}}$. All the $z_k$s are different have the same $n$th power for $k=0,1,2,\ldots,n-1$. We can see this by raising $z_k$ to the $n$th power to get

(9)The $n$th root of $z$ is a bit more interesting and tricky. Any complex number $z$ which is the solution to the $n$th degree equation

$z^n - z_0 = 0$

is an $n$th root of $z_0$. The fundamental theorem of algebra states that an $n$th degree equation has exactly $n$ (possibly complex) roots. Hence, every complex number $z_0$ has exactly $n$, $n$th roots. These roots can be found by using the fact $e^{j \theta} = e^{j (\theta + 2 \pi k)}$.

(10)Clearly, computing $n$th roots is much easier in the polar form than in the cartesian form.

**Example:**

Find the third roots of unity $\sqrt[3]{1}$.

Since $1 = 1 e^{j0}$, this corresponds to $r_0 = 1, \theta_0 = 0$. Hence, the three roots of unity are given by

$r = 1, \ \ \theta = 0,\frac{2\pi}{3},\frac{4\pi}{3}$

In cartesian coordinates, they are $(1+j0)$, $\left(-\frac{1}{2}+j\frac{\sqrt{3}}{2}\right)$,$\left(-\frac{1}{2}-j\frac{\sqrt{3}}{2}\right)$. These are referred to as $1,\omega,\omega^2$ sometimes. The three roots are shown in the figure.

Let $f(z)$ be a complex function of a complex variable $z$, i.e., for every $z$, $f(z)$ is a complex number. Note that a real number is also considered as a complex number and, hence, $f(z)$ could have a zero imaginary part. Examples of functions include $f(z) = |z|, f(z) = \mbox{arg}(z), f(z) = z^n, f(z) = \exp(z)$, etc.

The exponential functions can be interpreted using Euler's identity as follows.

$f(z) = \exp(z) = e^xe^{jy} = e^x\cos y + je^x\sin y$

The real part of $f(z)$ is plotted as a function of the real part of $z$, namely $x$ for the case $x<0$ in Figure.

The logarithm of a complex number $\ln z$ can be also interpreted using Euler's identity as

$\ln(z) = \ln\left(r e^{j (\theta + 2 k \pi) } \right) = \ln r + j (\theta + 2 k \pi)$

It can be seen from the above expression that $\ln z$is not a function of $z$. However, if we set $k=0$ in the above expression, then we get what is called the principal value of $\ln z$, denoted by Ln $z$, which is a function.

Similarly, it is important to realize that for any integer $n$, the $n$th power of a complex number is a function of the complex number, i.e., for every complex number $z$, there is only one complex number $z^n$. However, for an integer $n$, the $n$th root of a complex number is not uniquely defined and hence, is not a function. Often, one may take the root corresponding to $k=0$ in the previous section as the default root and hence the principal value. Then, the principal value becomes a function. This is similar to square roots of positive real numbers being defined as the positive numbers. There are interesting examples where careless use of just the principal value as the $n$th root can lead to fallacious arguments.

You may be used to dealing with functions of a variable such as $y = f(x)$, where $x$ is called the independent variable and $y$ is called the dependent variable and typically, $y$ takes real values when $x$ takes real values. In this course, we will be interested in complex functions of a real variable. Often the real variable will represent time or frequency. Such a function, normally denoted as $x(t)$ or $X(\omega)$ is a function which takes a complex value for every real value of the independent variable $t$ or $\omega$. Pay attention to the notation carefully - $t$ or $\omega$ now becomes the independent variable and $x(t)$ or $X(\omega)$ now becomes the dependent variable. We can also think of the complex function as the combination of two real functions of the independent variable, one for the real part of $x(t)$ and one for the imaginary part of $x(t)$.

When dealing with real functions of a real variable, you may be used to plotting the function $x(t)$ as a function of $t$. However, when $x(t)$ is a complex function, there is a problem in plotting this function since for every value of $t$, we need to plot a complex number. In this case, we do one of two things - either we plot the real part of $x(t)$ versus $t$ and plot the imaginary part of $x(t)$ versus $t$, or we plot $|x(t)|$ versus $t$ and $\mbox{arg}(x(t))$ versus $t$. Either of these is fine, but we do need two plots to effectively understand how $x(t)$ changes with $t$.

**Example:**

Consider the function $x(t) = e^{j2\pi t} = \cos {2\pi t} + j \sin {2\pi t}$ for all real values of $t$.

This is clearly a complex function of a real variable $t$. $\Re\{x(t)\}, \Im\{x(t)\}, |x(t)|, \mbox{arg}(x(t))$ are all real functions of the real variable $t$. Hence, we can plot $\Re\{x(t)\}$ versus $t$ and $\Im\{x(t)\}$ versus $t$ or we can plot $|x(t)$ versus $t$ and $\mbox{arg}(x(t))$ versus $t$ as shown in figure.

**Example:**

Consider the function $H(\omega) = \frac{1}{1+j\omega}$, where $\omega$ is a real variable. Roughly sketch the magnitude and phase of $H(\omega)$ as a function of $\omega$.

(11)A plot of $|H(\omega)|$ versus $\omega$ and $\angle(H(\omega))$ versus $\omega$ is shown in Figure.

**Example:**

Consider the function $X(\omega) = \frac{j \omega}{1+j\omega}$, where $\omega$ is a real variable. Roughly sketch the magnitude and phase of $X(\omega)$ as a function of $\omega$.

(12)A plot of $|X(\omega)|$ versus $\omega$ and $\angle(X(\omega))$ versus $\omega$ is shown in figure.

To plot the magnitude and phase of $H(j \omega) = e^{j a_1 \omega} + e^{j a_2 \omega}$ vs $\omega$, one of the tricks is to express $e^{j a_1 \omega} + e^{j a_2 \omega}$ as follows

(13)Now, it is easy to see that $|H(j \omega)| = 2 |e^{j \left(\frac{a_1+a_2}{2} \omega \right)}| \cdot |\cos \left[ \left( \frac{a_1 - a_2}{2} \right) \omega \right]|$ which is simply $2 |\cos \left[ \left( \frac{a_1 - a_2}{2} \right) \omega \right]|$.

1. Let $z_1 = 2 e^{j\pi/4}$ and $z_2 = 8 e^{j\pi/3}$. Find

a) $2z_1-z_2$

b) $\frac{1}{z_1}$

c) $\frac{z_1}{z_2^2}$

d) $\sqrt[3]{z_2}$

2. What is $j^j$?

3. Let $z$ be any complex number. Is it true that $(e^z)^\star= e^{z^\star}$?

4. Plot the magnitude and phase of the function $X(f) = e^{j\pi f}+e^{j 3 \pi f}$, for $-1 \leq f \leq 1$.

5. Prove that

$\int e^{ax} \ \cos(bx) \ dx = \frac{e^{ax}}{a^2+b^2} \left(a \cos(bx) + b \sin(bx) \right)$

**References**:

A good online reference for complex numbers is the wiki page http://en.wikipedia.org/wiki/Complex_number.

A short history of complex numbers can be found here.