Vector
\(\mathbf v=(x,y)\)
A point or arrow in a 2D plane.
Guided reference · 4 steps
Begin with one 2D rotation, collect the identities it needs, derive relative position, then finish with sign and implementation checks.
Step 1 · Represent the same turn three ways
\(\mathbf v=(x,y)\)
A point or arrow in a 2D plane.
\(z=x+iy\)
Rotate by multiplying \(ze^{i\phi}\).
\(R_\phi\mathbf v\)
Apply the rotation matrix below.
Step 2 · Gather the tools used by the proof
| Unit circle | \(\cos^2\phi+\sin^2\phi=1\) | Explains length preservation. |
| Composition | \(R_\alpha R_\beta=R_{\alpha+\beta}\) | Successive rotations add angles. |
| Inverse | \(R_\phi^{-1}=R_\phi^{\mathsf T}=R_{-\phi}\) | Transpose reverses the turn. |
| Pair frequency | \(\theta_i=10000^{-2i/d}\) | Different pairs rotate at different rates. |
| Position angle | \(\phi_i(m)=m\theta_i\) | Absolute position becomes phase. |
Step 3 · Make relative position appear
Step 4 · Test the derivation against common mistakes
| Symptom | Likely mistake | Check |
|---|---|---|
| Relative sign is reversed | Changed dot-product order or transpose order. | Write \((R_m\mathbf q)^{\mathsf T}(R_n\mathbf k)\) one step at a time. |
| Vector length changes | Signs in the rotation matrix are wrong. | Columns must be unit and perpendicular. |
| Dimensions are mixed | Pair layout differs from the assumed adjacent pairing. | Confirm the implementation's rotate-half convention. |
| Degrees appear in code | Angle units were confused. | Trigonometric functions consume radians. |
Primary source: Su et al., RoFormer, Sections 3.1–3.2. Ask the teaching agent to unpack any line you cannot reproduce without looking.