Lesson 3 of 9 · Complex-number foundation

The “imaginary” axis is simply a second axis.

Your win: translate instantly between a 2D vector \((x,y)\) and the complex number \(x+iy\).

10 minutesNeeds: coordinatesOutcome: pair ↔ complex number
Mission link: the RoFormer paper first derives RoPE in 2D using complex multiplication. The notation is compact, but the geometry is the same plane from Lesson 1.

Give the vertical axis a name

The imaginary unit \(i\) is defined by \(i^2=-1\). A complex number has the form:

\[z=x+iy\]

Plot \(x\) on the horizontal real axis and \(y\) on the vertical imaginary axis. The number \(3+2i\) and the vector \((3,2)\) identify the same point.

Coordinates

\((3,2)\)

Right 3, up 2.

Column vector

\(\begin{bmatrix}3\\2\end{bmatrix}\)

Two ordered components.

Complex number

\(3+2i\)

Real 3, imaginary 2.

Magnitude does not change its meaning

\[|z|=\sqrt{x^2+y^2}=\lVert\mathbf v\rVert\]

The vertical bar around a complex number and the double bars around a vector both mean distance from the origin here.

Conjugation reflects

The complex conjugate changes the sign of the imaginary part:

\[z=x+iy\quad\longrightarrow\quad z^*=x-iy\]

Geometrically, this reflects the point across the horizontal axis. Soon, that reflection will help us understand why a transpose reverses a rotation.

Worked translation

For the RoPE pair \((q_4,q_5)=(-2,3)\):

  1. Complex form: \(z_2=-2+3i\).
  2. Magnitude: \(|z_2|=\sqrt{4+9}=\sqrt{13}\).
  3. Conjugate: \(z_2^*=-2-3i\).

Retrieval check

Which vector is the complex number \(4-3i\)?

Practice before moving on

  1. Convert \((-3,5)\) to complex form.
  2. Convert \(7-2i\) to a column vector.
  3. Calculate \(|3+4i|\).
  4. Find the conjugate of \(-2+6i\), and describe its geometric effect.
  5. For the RoPE pair \((q_6,q_7)=(1,-4)\), write the complex number, conjugate, and magnitude.
Check solutions
  1. \(-3+5i\).
  2. \(\begin{bmatrix}7\\-2\end{bmatrix}\).
  3. \(\sqrt{3^2+4^2}=5\).
  4. \(-2-6i\); reflection across the real axis.
  5. \(1-4i\), \(1+4i\), and \(\sqrt{17}\).
Do not mystify \(i\): in this course, complex notation is a convenient package for two real coordinates plus special multiplication rules.

Primary source: OpenStax 3.1: Complex Numbers. Read through the complex plane and complex conjugate sections.

Ask the teaching agent to check two translations of your own before moving on.