Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Complex numbers

Updated: 18 Jun 2026

The concept of complex numbers has been introduced in the chapter on oscillations. It shows up in many places in physics, but isn’t introduced simultaneously in math classes. Hence, we provide a brief introduction to complex numbers here.

A complex number is a number that expresses both a quantity and a phase (angle) with a single number. Complex numbers are expressed in the form a+bia + bi, where aa and bb are real numbers, and ii is the imaginary unit, which satisfies the equation i2=1i^2 = -1 (see below). The real part of the complex number is aa, and the imaginary part is bb. Complex numbers can be represented in the complex plane, where the horizontal axis represents the real part and the vertical axis represents the imaginary part. The magnitude of a complex number is given by a2+b2\sqrt{a^2 + b^2}, and the angle (or argument) is given by arctan(b/a)\arctan(b/a), see Figure 1.

Source
import matplotlib.pyplot as plt
import numpy as np

data = np.array([2+2j, 4j, 4+1j, -4])
# extract the real and imaginary parts
x = data.real
y = data.imag

# plot the complex numbers
plt.scatter(x, y, color='k', marker='.')
plt.ylabel('Imaginary')
plt.xlabel('Real')
plt.show()

One of the best explanations of concepts of complex numbers is the following:

Multiplying by ii is the same as rotating by 90 degrees (in the complex plane)

We can see that this is true in the python plot below.

If we think of this sentence and imagine that we multiply twice by ii we get a 180 degree rotation, which is the same as multiplying by -1. This is consistent with the definition of ii as the square root of -1, or i2=1i^2 = -1.

Let’s think along this line, than we can also see that a rotation of 180 degrees, is the same as the rotation of π\pi radians.

Source
import matplotlib.pyplot as plt
import numpy as np

data = np.array([2+2j, 4j, 4+1j, -4])
data2 = data * 1j
# extract the real and imaginary parts
x, x2 = data.real, data2.real
y, y2 = data.imag, data2.imag

# plot the complex numbers
plt.scatter(x, y, color='k', marker='.')
plt.scatter(x2, y2, color='r', marker='.')
plt.ylabel('Imaginary')
plt.xlabel('Real')
plt.show()
The complex plane, where the horizontal axis represents the real part and the vertical axis represents the imaginary part of a complex number.

Figure 1:The complex plane, where the horizontal axis represents the real part and the vertical axis represents the imaginary part of a complex number.

Or in polar form like reiθr e^{i\theta}, where rr is the magnitude and θ\theta is the angle.

The idea of i²=-1

Much has been said about complex numbers.

which is the same as multiplying by eiπe^{i\pi}. This is consistent with Euler’s formula, which states that eix=cos(x)+isin(x)e^{ix} = \cos(x) + i\sin(x), and when x=πx = \pi, we get eiπ=1e^{i\pi} = -1.