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 , where and are real numbers, and is the imaginary unit, which satisfies the equation (see below). The real part of the complex number is , and the imaginary part is . 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 , and the angle (or argument) is given by , 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 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 we get a 180 degree rotation, which is the same as multiplying by -1. This is consistent with the definition of as the square root of -1, or .
Let’s think along this line, than we can also see that a rotation of 180 degrees, is the same as the rotation of 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()
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 , where is the magnitude and is the angle.
The idea of i²=-1¶
Much has been said about complex numbers.
which is the same as multiplying by . This is consistent with Euler’s formula, which states that , and when , we get .