Rotation of Cartesian Axes around Vector

Theorem
Let $\mathbf r$ be a vector in space.

Let a Cartesian plane $\CC$ be established such that:
 * the initial point of $\mathbf r$ is at the origin $O$
 * the terminal point of $\mathbf r$ is the point $P$.

Let $\tuple {X, Y}$ be the coordinates of $P$ under $\CC$.

Let $\CC$ be rotated about $O$ to $\CC'$, through an angle $\varphi$ in the anticlockwise direction, while keeping $\mathbf r$ fixed.

Let $\tuple {X', Y'}$ be the coordinates of $P$ under $\CC'$.

Then:

Proof

 * Rotation-of-Cartesian-Plane-around-Vector.png

With reference to the above diagram:
 * $X P X' = \varphi$

and so:
 * $OX' = OX \cos \varphi + PX \sin \varphi$

and:
 * $OY' = OY \cos \varphi - PY \cos \varphi$

Hence the result.