**Other math topics**

# Introduction to complex numbers

*schedule*May 20, 2023

*toc*Table of Contents

*expand_more*

**mathematics behind data science**with 100+ top-tier guides

Start your free 7-days trial now!

# Motivation behind complex numbers

Suppose we wanted to solve the equation:

Clearly, squaring any two real numbers will give us a positive value, which means that this equation is not solvable using real numbers. However, instead of leaving the equation unsolved, mathematicians have come up with a way to express the solution using so-called complex numbers.

Let's go ahead and take the square root of both sides of \eqref{eq:ZvlzW1j1xNtuGdJrjiE} to get:

Again, it does not make sense to take the square root of a negative number. At the heart of complex numbers is the imaginary number $i$ defined below:

The solution \eqref{eq:O3x7ZSRvNzraAw1ynGS} can now be expressed as:

The reason we somewhat forcefully solve these equations using complex numbers is to understand more about the nature of the equation instead of marking it as unsolvable. As we shall explore in the latter chapters, complex numbers are required to prove important theorems such as the fundamental theorem of algebra and the central limit theorem.

# Complex numbers

If $a$ and $b$ are real numbers while $i=\sqrt{-1}$, then any number of the form $a+bi$ is called a complex number.

we often denote a complex number as $z$.

some textbooks define the imaginary number as $i^2=-1$.

## Some complex number

The following are all examples of complex numbers:

Notice how $z_2=3$ which appears to be just a real number is also a complex number. This is because $z_2$ can be written as $z_2=3+0i$. In this way, all real numbers including $\pi$ can be written as a complex number. Therefore, real numbers are considered to be a subset of complex numbers.

# Set of all complex numbers

Just like how $\mathbb{R}$ is the set of all real numbers, we can define $\mathbb{C}$ as the set of all complex numbers. Since real numbers are a subset of complex numbers, we have that $\mathbb{R}\subset\mathbb{C}$.

# Real and imaginary part of complex numbers

If $z=a+bi$ is any complex number, then:

$a$ is known as the real part of $z$, denoted by $\mathcal{Re}(z)$.

$b$ is known as the imaginary part of $z$, denoted by $\mathcal{Im}(z)$.

## Finding the real and imaginary part of a complex number

Consider the following complex numbers:

$z_1=2+3i$.

$z_2=5$.

Find the real parts and imaginary parts of $z_1$ and $z_2$.

Solution. Let's first tackle $z_1$. The real part of $z_1$ is $2$ and the imaginary part of $z_1$ is $3$, that is:

Next, the real and imaginary parts of $z_2$ are:

## Purely real and purely imaginary complex numbers

Suppose we have a complex number $z=a+bi$.

if $a\ne0$ and $b=0$, then the complex number is called purely real.

if $a=0$ and $b\ne0$, then the complex number is called purely imaginary.

# Arithmetic operations of complex numbers

Just like for real numbers, we can also add, subtract, multiply and divide between complex numbers.

## Addition

Adding two complex numbers:

It is always a good idea to explicitly split the complex number into its real and imaginary parts as we did here.

## Subtraction

Subtracting a complex number from another complex number:

## Multiplication

Multiplying two complex numbers:

Here, we used the fact that $i^2=-1$.

## Division

Dividing two complex numbers is slightly tricky. We multiply both the numerator and denominator by $c-di$ so that the imaginary part disappears from the denominator:

## Performing arithmetic operations on complex numbers

Consider the following complex numbers:

Compute the following:

$z_1+z_2$.

$z_1-z_2$.

$z_1z_2$.

$z_1/z_2$.

Solution. 1. Addition is:

2. Subtraction is:

3. Multiplication is:

4. Division is:

# Properties of arithmetic operations of complex numbers

## Commutative property of multiplication of complex numbers

If $z_1$ and $z_2$ are complex numbers, then:

This means that we can perform the multiplication in either order.

Proof. Let $z_1=a+b_i$ and $z_2=c+d_i$. Now, the product $z_1z_2$ is:

This completes the proof.

## Associativity property of multiplication of complex numbers

If $z_1$, $z_2$ and $z_3$ are complex numbers, then:

Proof. We define complex numbers $z_1$, $z_2$ and $z_3$ like so:

We start from the left-hand side:

This completes the proof.

# Visualizing complex numbers using the Argand plane

We can plot complex numbers on a so-called complex plane or the Argand plane. For instance, the complex number $z=3+2i$ can be visualized as:

The key difference between the traditional Cartesian plane and the Argand plane is what the axis lines represent. In Cartesian plane:

the horizontal axis represents the $x$-axis.

the vertical axis represents the $y$-axis.

In contrast, for an Argand plane:

the horizontal axis represents the real part of the complex number.

the vertical axis represents the imaginary part of the complex number.

In fact, there is a one-to-map mapping between the Cartesian plane and the Argand plane. For instance, the point $(3,2)$ in the Cartesian plane corresponds to the complex number $z=3+2i$ in the Argand plane.

# Modulus of a complex number

Let $z$ be a complex number defined as $z=a+bi$. The modulus of $z$ is denoted as $\vert{z}\vert$ and is defined as:

Note that the modulus is always a real number since $a^2+b^2$ is always non-negative.

Discussion. The reason we use the absolute value symbol to indicate the modulus is that if $b=0$, then:

Here, the right-hand side represents the absolute value of the real number $a$. This means that if the imaginary part of the complex number is zero, then the modulus can be interpreted as the absolute value.

## Finding the modulus of a complex number

Let $z=4+3i$. Find the modulus of $z$.

Solution. The modulus of $z$ is:

Let's also visualize $z$ on the Argand plane:

Here, the modulus $\vert{z}\vert$ represents the length of this vector.