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.

Trigonometry and Complex Numbers

Trigonometry and complex numbers are two views of the same thing: rotation in a plane. Waves, oscillations, and quantum phases all live here, and Euler’s formula is the bridge that connects them. We treat them together because in quantum mechanics you almost never use one without the other.

Trigonometry

Sine and cosine on the unit circle

Take a point on a circle of radius 1 and rotate it counterclockwise by an angle θ\theta (measured in radians, where a full turn is 2π2\pi). Its coordinates are, by definition,

x=cosθ,y=sinθ.x = \cos\theta, \qquad y = \sin\theta.

Cosine is the horizontal coordinate, sine the vertical one, and the tangent tanθ=sinθ/cosθ\tan\theta = \sin\theta/\cos\theta is the slope of the radius.

Source
import numpy as np
import matplotlib.pyplot as plt

theta = np.deg2rad(50)
t = np.linspace(0, 2 * np.pi, 400)

fig, ax = plt.subplots(figsize=(5.5, 5.5))
ax.plot(np.cos(t), np.sin(t), 'k', lw=1.5)           # unit circle
ax.plot([0, np.cos(theta)], [0, np.sin(theta)], color='#2e4057', lw=2)  # radius
ax.plot([np.cos(theta), np.cos(theta)], [0, np.sin(theta)], color='#66a182', lw=2, label=r'$\sin\theta$')
ax.plot([0, np.cos(theta)], [0, 0], color='#d1495b', lw=2, label=r'$\cos\theta$')
ax.plot(np.cos(theta), np.sin(theta), 'ko', ms=6)

ax.annotate(r'$(\cos\theta,\ \sin\theta)$', (np.cos(theta), np.sin(theta)),
            textcoords='offset points', xytext=(8, 8), fontsize=11)
ax.axhline(0, color='gray', lw=0.6)
ax.axvline(0, color='gray', lw=0.6)
ax.set_aspect('equal')
ax.set_xlim(-1.3, 1.5)
ax.set_ylim(-1.3, 1.3)
ax.legend(loc='lower left', fontsize=10)
ax.set_title(r'Fig.1 Sine and cosine as coordinates on the unit circle ($\theta=50^\circ$)')
plt.tight_layout()
plt.show()
<Figure size 550x550 with 1 Axes>

As θ\theta runs around the circle, the two coordinates trace out the familiar waves: cosine starts at 1, sine starts at 0, and each is the other shifted by a quarter turn.

Source
import numpy as np
import matplotlib.pyplot as plt

t = np.linspace(0, 2 * np.pi, 400)
fig, ax = plt.subplots(figsize=(7, 3.2))
ax.plot(t, np.cos(t), color='#d1495b', lw=2, label=r'$\cos\theta$')
ax.plot(t, np.sin(t), color='#66a182', lw=2, label=r'$\sin\theta$')
ax.axhline(0, color='gray', lw=0.6)
ax.set_xticks([0, np.pi / 2, np.pi, 3 * np.pi / 2, 2 * np.pi])
ax.set_xticklabels(['0', r'$\pi/2$', r'$\pi$', r'$3\pi/2$', r'$2\pi$'])
ax.set_xlabel(r'$\theta$ (radians)')
ax.legend(fontsize=10, loc='upper right')
ax.set_title('Fig.2 Cosine and sine as functions of the angle, offset by a quarter turn')
plt.tight_layout()
plt.show()
<Figure size 700x320 with 1 Axes>

Key identities

Because the point lies on a unit circle, its coordinates always satisfy the Pythagorean identity:

The identities you will reach for most often are the angle-sum and power-reduction formulas:

sin(A±B)=sinAcosB±cosAsinB,cos(A±B)=cosAcosBsinAsinB,\sin(A \pm B) = \sin A\cos B \pm \cos A\sin B, \qquad \cos(A \pm B) = \cos A\cos B \mp \sin A\sin B,
sin2θ=12(1cos2θ),cos2θ=12(1+cos2θ).\sin^2\theta = \tfrac{1}{2}(1-\cos 2\theta), \qquad \cos^2\theta = \tfrac{1}{2}(1+\cos 2\theta).

For small angles (in radians), the first terms of the Taylor series give the approximations sinθθ\sin\theta \approx \theta and cosθ112θ2\cos\theta \approx 1 - \tfrac{1}{2}\theta^2, which are what let us linearize a pendulum or a vibrating bond near equilibrium.

Rather than memorize the whole table of identities, it is easier to derive them from Euler’s formula, which we build next.

Complex numbers

Complex numbers live in 2D

A complex number zz is a two-dimensional number: it needs two components for its full specification. They arise the moment we ask for the roots of a simple polynomial. The equation

x2+1=0x1,2=±1=±ix^2 + 1 = 0 \quad\Longrightarrow\quad x_{1,2} = \pm\sqrt{-1} = \pm i

has no real solution, so we extend the real line R\mathbb{R} into the complex plane C\mathbb{C} by introducing the imaginary unit ii, defined solely by

i2=1.i^2 = -1.
Complex numbers live in 2D

Fig.3 A complex number needs a real and an imaginary component to be fully specified, so it lives in a plane.

Cartesian representation

Polar representation and Euler’s formula

Instead of horizontal and vertical parts, we can locate zz by its distance from the origin rr and its angle ϕ\phi. From the unit-circle picture, x=rcosϕx = r\cos\phi and y=rsinϕy = r\sin\phi, so

z=x+iy=r(cosϕ+isinϕ).z = x + iy = r(\cos\phi + i\sin\phi).

The magic step is Euler’s formula, which collapses the parenthesis into an exponential:

The plot below shows why polar form is natural: the same complex number is one dot in the plane, described equally well by (x,y)(x, y) or by (r,ϕ)(r, \phi).

Source
import numpy as np
import matplotlib.pyplot as plt

z = 2 + 1.5j
r, phi = np.abs(z), np.angle(z)

fig, ax = plt.subplots(figsize=(5.5, 5))
ax.annotate('', xy=(z.real, z.imag), xytext=(0, 0),
            arrowprops=dict(arrowstyle='->', color='#2e4057', lw=2))
arc = np.linspace(0, phi, 60)
ax.plot(0.6 * np.cos(arc), 0.6 * np.sin(arc), color='#d1495b', lw=1.5)
ax.plot([0, z.real], [z.imag, z.imag], '--', color='gray', lw=1)
ax.plot([z.real, z.real], [0, z.imag], '--', color='gray', lw=1)

ax.text(z.real + 0.1, z.imag + 0.1, fr'$z = {z.real:.0f}+{z.imag:.1f}i = {r:.2f}\,e^{{i\phi}}$', fontsize=11)
ax.text(0.7, 0.15, r'$\phi$', color='#d1495b', fontsize=13)
ax.text(z.real / 2, -0.25, r'$x=r\cos\phi$', color='gray', fontsize=9, ha='center')
ax.text(z.real + 0.05, z.imag / 2, r'$y=r\sin\phi$', color='gray', fontsize=9)

ax.axhline(0, color='black', lw=0.8)
ax.axvline(0, color='black', lw=0.8)
ax.set_xlim(-0.6, 3)
ax.set_ylim(-0.6, 2.4)
ax.set_aspect('equal')
ax.set_xlabel('Real')
ax.set_ylabel('Imaginary')
ax.set_title('Fig.4 The same number in Cartesian (x, y) and polar (r, phi) form')
plt.tight_layout()
plt.show()
<Figure size 550x500 with 1 Axes>

Multiplication is rotation

In polar form, multiplication becomes almost trivial: magnitudes multiply and angles add.

(r1eiϕ1)(r2eiϕ2)=r1r2ei(ϕ1+ϕ2).(r_1 e^{i\phi_1})(r_2 e^{i\phi_2}) = r_1 r_2\, e^{i(\phi_1 + \phi_2)}.

So multiplying by eiϕe^{i\phi} rotates a number counterclockwise by ϕ\phi without changing its length. Multiplying by i=eiπ/2i = e^{i\pi/2} is a quarter-turn. This is the same rotation that trigonometry describes, now in one clean line of algebra.

Euler's formula traced as a helix

Fig.5 As tt increases, eiωte^{i\omega t} traces a helix. Its shadow on one wall is cosωt\cos\omega t and on the other is sinωt\sin\omega t, so a single rotating phase carries both waves at once.

The complex conjugate

The conjugate flips the sign of the imaginary part, reflecting zz across the real axis:

Multiplying a number by its conjugate rotates it back onto the real axis and returns a non-negative real number, the squared magnitude:

z2=zˉz=(xiy)(x+iy)=x2+y2=r2.|z|^2 = \bar{z}\,z = (x - iy)(x + iy) = x^2 + y^2 = r^2.

This is exactly the operation that turns a quantum amplitude ψ\psi into a probability density ψ2=ψψ|\psi|^2 = \psi^*\psi.

Taking sums and differences of zz and zˉ\bar{z} recovers the trig functions as exponentials, a substitution that simplifies countless integrals:

cosϕ=eiϕ+eiϕ2,sinϕ=eiϕeiϕ2i.\cos\phi = \frac{e^{i\phi} + e^{-i\phi}}{2}, \qquad \sin\phi = \frac{e^{i\phi} - e^{-i\phi}}{2i}.

Problems

Problem 1: Multiplication in Cartesian form

Multiply z1=3+4iz_1 = 3 + 4i and z2=12iz_2 = 1 - 2i.

Problem 2: Modulus

Find z|z| for z=7+24iz = 7 + 24i.

Problem 3: Division by the conjugate

Divide z1=3+4iz_1 = 3 + 4i by z2=12iz_2 = 1 - 2i.

Problem 4: Multiplication in polar form

Multiply z1=2eiπ/6z_1 = 2e^{i\pi/6} and z2=3eiπ/3z_2 = 3e^{i\pi/3}.

Problem 5: Cartesian to polar

Express z=4+4iz = -4 + 4i in polar form.

Problem 6: A famous identity

Use Euler’s formula to evaluate eiπe^{i\pi}.

Problem 7: Trig from exponentials

Using cosϕ=12(eiϕ+eiϕ)\cos\phi = \tfrac{1}{2}(e^{i\phi} + e^{-i\phi}), show that cos2ϕ=12(1+cos2ϕ)\cos^2\phi = \tfrac{1}{2}(1 + \cos 2\phi).

Problem 8: Phase rotation

A quantum amplitude picks up a phase, ψeiθψ\psi \to e^{i\theta}\psi. Show that the probability density ψ2|\psi|^2 is unchanged.