Lesson 4 of 9 · Complex-number foundation

Multiplication can turn an arrow.

Your win: explain why multiplying by \(e^{i\theta}\) adds an angle while preserving magnitude.

14 minutesNeeds: unit circle, complex planeOutcome: phase as rotation
Mission link: in the RoFormer 2D derivation, position \(m\) is applied by multiplying a query or key by \(e^{im\theta}\).

Package a unit-circle point

Euler's formula writes the unit-circle point \((\cos\theta,\sin\theta)\) as one complex number:

\[e^{i\theta}=\cos\theta+i\sin\theta\]

Its magnitude is one because \(\cos^2\theta+\sin^2\theta=1\). It carries direction, but no stretching.

Multiply and collect coordinates

Let \(z=x+iy\). Multiplying by the unit phase gives:

\[ \begin{aligned} z'&=(x+iy)(\cos\theta+i\sin\theta)\\ &=(x\cos\theta-y\sin\theta) +i(x\sin\theta+y\cos\theta). \end{aligned} \]

Read the real and imaginary parts as the new coordinates:

\[ \begin{aligned} x'&=x\cos\theta-y\sin\theta,\\ y'&=x\sin\theta+y\cos\theta. \end{aligned} \]
60° · 1.05 rad Rotated coordinates\((0.02,1.14)\)

Numbers substituted: rotate \(2+i\) by \(\pi/2\)

\[ \begin{aligned} z'&=(2+i)e^{i\pi/2}\\ &=(2+i)(0+i)\\ &=2i+i^2\\ &=-1+2i. \end{aligned} \]

The point \((2,1)\) becomes \((-1,2)\), exactly the quarter-turn rule \((x,y)\mapsto(-y,x)\). Its magnitude stays \(\sqrt5\).

Numbers substituted: rotate \(2\) by \(\pi/6\)

\[ 2e^{i\pi/6} =2\left(\frac{\sqrt3}{2}+\frac12 i\right) =\sqrt3+i. \]

The point \((2,0)\) becomes \((\sqrt3,1)\). Both have magnitude \(2\).

Why angles add

\[e^{i\alpha}e^{i\beta}=e^{i(\alpha+\beta)}\]

Two successive phase multiplications are two successive turns. A turn by \(\alpha\), followed by a turn by \(\beta\), is a turn by \(\alpha+\beta\). This composition rule will later collapse \(R_{-m}R_n\) into \(R_{n-m}\).

Retrieval check

What does \(e^{i\alpha}e^{i\beta}\) do to phase?

Practice before moving on

  1. Rotate \(1+i\) by \(\pi/2\) using complex multiplication.
  2. Rotate \(3-2i\) by \(\pi\).
  3. Expand \((x+iy)(\cos\theta+i\sin\theta)\) without looking above.
  4. Show numerically that \(|-1+2i|=|2+i|\).
  5. Simplify \(e^{i\pi/3}e^{i\pi/6}\) and state the net angle.
Check solutions
  1. \((1+i)i=-1+i\).
  2. \((3-2i)(-1)=-3+2i\).
  3. \((x\cos\theta-y\sin\theta)+i(x\sin\theta+y\cos\theta)\).
  4. Both magnitudes are \(\sqrt5\).
  5. \(e^{i\pi/2}=i\); the net angle is \(\pi/2\).
RoPE preview: for pair \(i\), token position \(m\) contributes phase \(m\theta_i\), so the pair becomes \(z'_i=z_i e^{im\theta_i}\).

Primary source: OpenStax Chapter 8 Key Concepts, especially polar form and the rule that multiplying complex numbers adds their angles.

Ask the teaching agent to check your expansion with a different pair of coordinates before moving on.