RobotGuide
Math foundations/Complex multiplication is rotation: the one-dimensional version of quaternions

Foundations T6 / 27 · From high school

Complex multiplication is rotation: the one-dimensional version of quaternions

You learned complex multiplication in high school: (1+i)(1−i) = 2. It hides one of the most valuable mathematical facts in the robot industry: multiplying by a complex number = rotating through an angle.

About 20 min2 theorems4 proof steps3 self-test questions

One-line takeaway

Complex multiplication = multiply magnitudes + add arguments. Generalize it to three dimensions and you get quaternions — the first choice for representing robot attitude. This article works out the one-dimensional version (the complex plane).

Animated · multiplying by a complex number on the unit circle = rotating by an angle; in 3-D this same thing is the quaternion

The double coverage and slerp interpolation of quaternions in /k/A1/ both rest on «multiplication is rotation». This article never touches three dimensions; it only makes the behavior of i feel natural.

Why this tool exists

Euler angles hit gimbal lock, rotation matrices waste nine numbers, quaternions use four and interpolate smoothly — why do they look like that?

The answer starts with complex numbers: complex numbers are born «numbers with an angle».

The most important sentence in this article: multiplying by i = rotating 90°.

Definitions

Magnitude and argument

For z = a+bi the magnitude is |z| = √(a²+b²) and the argument is θ = atan2(b, a). Trigonometric form: z = |z|(cosθ + i·sinθ).

Why define it this wayMagnitude is «how big», argument is «which way» — a number in the complex plane carries both pieces of information at once, which is exactly everything rotation needs.

Theorems and proofs

Theorem 1 (multiplication = magnitudes multiply · arguments add)

z₁z₂ = |z₁||z₂|[cos(θ₁+θ₂) + i·sin(θ₁+θ₂)].

Proof

Multiply the two trigonometric forms directly: |z₁||z₂|(cosθ₁+i·sinθ₁)(cosθ₂+i·sinθ₂).

Expand by the distributive law and collect using i²=−1: the real part = cosθ₁cosθ₂ − sinθ₁sinθ₂ = cos(θ₁+θ₂) (sum and difference formulas); the imaginary part = sinθ₁cosθ₂ + cosθ₁sinθ₂ = sin(θ₁+θ₂).

NoteThe same two sum-difference formulas as in T1 (the matrix article) — complex multiplication and rotation matrices are two notations for the same rotation, convertible with no loss.

Theorem 2 (multiplying by i rotates 90°)

Multiplying any complex number by i: the magnitude is unchanged (|i|=1) and the argument gains +90°. In particular, the geometric reading of i² = −1: two 90° rotations = 180°, taking 1 to −1.

Proof

i = 1·(cos90° + i·sin90°): magnitude 1, argument 90°.

By Theorem 1: the magnitude of z·i = |z|×1 = |z|, and the argument = θ_z + 90°.

NoteMany people memorize i²=−1 for years without anyone telling them that this line is really «rotate 90° twice». The i, j, k of quaternions just generalize this construction to three dimensions — each squares to −1 because each corresponds to a 180° rotation.

Work it by hand

The point (2, 0) corresponds to the complex number 2. Multiply it by (cos60° + i·sin60°) — where does it rotate to?

  1. Magnitudes multiply: 2 × 1 = 2.
  2. Arguments add: 0° + 60° = 60°.
  3. Result = 2(cos60° + i·sin60°) = 2×0.5 + 2×0.866i.
Answer

1 + 1.73i, i.e., the point (1, 1.73) — exactly a 60° rotation about the origin, magnitude unchanged.

Run the numbers

Where the numbers come from

Run in double precision (the generator really computes): 1000 random complex numbers, each multiplied 100 times by ei·3.7°, compared against a single multiplication by ei·370°:

  • Maximum coordinate error = 1.3e-14×10^-14 — «multiply a hundred times» and «rotate once to the target» are numerically indistinguishable.
  • Each step multiplies the magnitude by 1; all 1000 points keep their magnitude unchanged (rotation does not scale), with 10 random spot checks showing errors < 1e-15.
  • Quaternion attitude composition and serial-arm transform-chain composition use exactly this property.

Where this shows up

The object hereThe counterpart in RLUsed in
Unit complex number eiθ (magnitude=1)Unit quaternion (attitude quaternion)used in →
Arguments addComposition in quaternion multiplicationused in →
i² = −1 = a 180° rotationQuaternion double coverage (q and −q are the same attitude)used in →

Boundaries: where this article stops

This article stops in two dimensions. The quaternion (the three-dimensional version of complex numbers) multiplication table ijk, «why four numbers are necessary», double coverage, and slerp interpolation all live in the full version at /k/A1/.

Self-test: 3 questions

All hand-computation and «find the flaw in this proof» questions — nothing to memorize. Stuck? Go back to the section.

01By how many degrees does multiplying by −i rotate?

−90°. −i = cos(−90°)+i·sin(−90°): magnitude 1, argument −90°.

02By how much do the arguments of z and −z differ?

180°. Multiplying by −1 = multiplying by ei·180°. This is also the shadow of quaternion double coverage: a 360° rotation returns to the start.

03Why does this article use the same two sum-difference formulas as the matrix article?

Because there is only one rotation; matrices and complex numbers are two bookkeeping formats. Quaternions are the third, covering three dimensions.

Up next

The full series · 27 articles

T1The Matrix Is a Ledger for Rotation≈ 25 minT2From Slope to Gradient: The First Line of Every Robot Learning Algorithm≈ 25 minT3Vectors and forces: the physical reading of the dot productAbout 20 minT4Two Rulers and a Better Rulerabout 25 minT5The Ledger of One Motor Revolution: Radians, Speed, and Powerabout 20 minT6Complex multiplication is rotation: the one-dimensional version of quaternionsAbout 20 minT7Bases and coordinates: why robots put everything in matrices45 minT8Matrix Multiplication: Chaining Transformations, Not a Table OperationAbout 40 minT9The Jacobian: Rotate a Joint One Degree — How Far Does the End Effector Move?About 45 minT10Eigenvectors: The Directions a Matrix Dare Not Touchabout 45 minT11SVD and the Pseudoinverse: When There Is No Exact Solution, Find the Nearest Oneabout 50 minT12Taylor expansion: putting a straight line to work in place of a curveAbout 40 minT13Probability spaces: why «random» needs axioms50 minT14Expectation: A Rigorous Construction of «Average»About 55 minT15Conditional Expectation: What the Vertical Bar Really Means≈ 60 minT16Four inequalities: the quantitative answer to «how many samples are enough»45 minT17Norms and fixed points: where «it always converges» comes from55 minT18Markov Chains: When the Time Average Equals the Ensemble Averageabout 55 minT19The Mathematical Construction of the MDP: What One Axiom Is Worthabout 50 minT20Dynamic Programming: The Accounting for Two Iterations≈ 50 minT21Optimization: why constraints cannot rely on penalties aloneAbout 55 minT22Stochastic Approximation: Every Term in the Learning-Rate Formulaabout 55 minT23The Mathematics of Contact: Hertz Theoryabout 45 minT24Friction and the Friction Cone: The Geometry of Constraintsabout 40 minT25Force Closure and Grasp Metrics: ε Is a Linear ProgramAbout 50 minT26Contact Kinematics: Why Rolling Is Not «Sliding Along»≈ 45 minT27Slip detection: from «I felt it» to «I computed it»About 50 min