Turning, then turning again
Turn by . Then, from where you stopped, turn by more. You have turned by total. Obvious.
The non-obvious question: if you know the coordinates of the point at angle and the coordinates at angle , can you compute the coordinates at angle without measuring anything new?
You can, and the recipe is the angle addition formulas. They are the arithmetic of stacking turns. Once you have them, the rule for rotating a point falls out for free, and that rule is the destination of this whole module.
The formula for sine
Here is the sine of a sum:
First, a warning about the obvious wrong guess. Addition does not distribute through sine: is not . Check it with : the left side is , the right side is . Trig functions are not linear, and that single counterexample settles it forever.
Drag and . The widget reads their four coordinates straight off the circle, plugs them into the formula, and shows the result landing exactly on .
The formula for cosine
And the cosine of a sum:
Mind the minus sign. Sine of a sum adds its two terms; cosine of a sum subtracts. That sign is the single most common slip in this lesson, and it is the sign that will later separate a counterclockwise rotation from a clockwise one. The widget verifies this one too: the computed matches the -coordinate of every time.
You do not have to memorize four formulas. Memorize these two for the plus case. The minus versions come from and : just flip the sign of and watch the second term flip with it.
Build an exact value
You cannot read off the unit circle directly, but , and both of those are reference angles.
Apply with , . What is , as a decimal?
Double angles, for free
Set in the two formulas and you get the double-angle formulas with no extra work:
These are not new facts to file away. They are the angle addition formulas with both inputs equal. Mention them so you recognize them later; they cost nothing.
The load-bearing step
Now the reason this lesson exists.
Take any point . Write it in circle language: it sits at some distance from the origin, at some angle . By the definition of sine and cosine scaled up by ,
Rotate counterclockwise by an angle . It stays the same distance from the origin, it just swings to a new angle, . So its new coordinates are .
Those are angle-sum expressions. Expand them.
Out falls the rotation rule
Expand with the cosine formula:
because is just and is just . Do the same with sine:
Put them together. Rotating counterclockwise by sends it to:
This was derived, not declared. It is the angle addition formulas read as a map on coordinate pairs. The and vanished; you never need them.
Watch it run
The rotation rule is a plain function: feed it a pair of numbers and an angle, get a pair of numbers out.
Drag the point anywhere. Drag the angle dial to set . The second dot is , and the readout substitutes your current numbers into and step by step. No matrices, no magic. Two formulas, plugged in.
Rotate a point, x-coordinate
Rotate the point counterclockwise by . Recall and .
Use . What is the new -coordinate?
Rotate a point, y-coordinate
Same rotation: turned counterclockwise by .
Use . What is the new -coordinate?
A note for later
One aside for the curious. If you have seen linear algebra, you will recognize the rotation rule as multiplication by the matrix
That is the same map, repackaged. Module seven will introduce that packaging properly. The point worth making now: nothing you learned here will need to be unlearned. The matrix is just a tidier way to write the two formulas you derived.
Where this goes next
You just derived rotation from scratch, and that is not a small thing.
A transformer reads its words with no position attached. To fix that, it rotates pairs of numbers inside each word’s query and key vectors by an angle proportional to that word’s position. The mechanism has a name, rotary positional embedding, or RoPE, and it is the positional scheme inside LLaMA 2 and 3, Mistral, Gemma, Code-LLaMA, and PaLM. Flip the “RoPE view” toggle in the widget to see the same rotation relabeled in transformer terms.
The rotation is settled. The last lesson collects the other tools, polar coordinates and inverse trig, and then builds the position fingerprint itself.
Lesson complete