Rotation of Axis: Let xy-coordinate system be given. We rotate Ox and Oy and about the origin through an angle \theta \left(0<\theta<90^\circ\right) so that the new axes are OX and OY as shown in the figure. Let a point P have coordinates \left(x,y\right) referred to the xy-system of coordinates. Suppose P has coordinates (X, Y) referred to the XY-coordinate system. We have to find X, Y in terms of the given coordinates x, y. Let a be measure of the angle that OP makes with O
From P, draw PM perpendicular to Ox and PM’ perpendicular to OX. Let \left|OP\right|=r ,
From the right triangle OPM', we have

OM'=X=r\;\cos\left(\alpha-\theta\right)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; (1).
and
M'P=Y=r\;\sin\left(\alpha-\theta\right)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(2)Also from triangle OPM , we have
x=r\;\cos\alpha\;\;\;\;\;\;\;\;and\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;y=r\;sin\alpha
equations (1) and (2) may be re-written as:
X=r\;\cos\alpha\;\cos\theta+\;r\;\sin\alpha\;\sin\theta\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(3).
Y=r\;sin\alpha\;\cos\;\theta\;+\;r\;\cos\alpha\;\sin\;\theta\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(4)
Substituting x=r\;\cos\alpha\;\;\;and\;\;\;y=r\;sin\alpha, we get
X=x\cos\theta+y\sin\theta\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(5).
Y=y\cos\theta-x\sin\theta\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(6).
i.e,\;\;\;\;\;\;(X,Y)\;=\;(x\cos\theta+y\sin\theta\;\;\;,\;\;\;y\cos\theta-x\sin\theta\;)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;.
are the coordinates of P referred to the new axes OX and OY.
Example Rotation of Axis:
The xy-coordinate axes are rotated about the origin through an angle of 30^\circ If the xy-coordinates of a point are (5, 7), find its XY-coordinates, where OX and OY are the axes obtained after rotation.
Solution:
Let (X, Y) be the coordinates of P referred to the XY-axes.
since, we have
X=x\cos\theta+y\sin\theta.
Y=y\cos\theta-x\sin\theta.
using values, (x,y)=(5,7) \;\;\;\;\;\;and\;\;\;\;\;\; \theta = 30^\circ, we get
X=5\cos30^\circ+7\sin30^\circ.
Y=7\cos30^\circ-5\sin30^\circ.
So, X={\textstyle\frac{5\sqrt3}2}+{\textstyle\frac72}\;\;\;\; and\;\;\;\;\; Y={\textstyle\frac{7\sqrt3}2}-{\textstyle\frac52}.
i.e, \;\;\;\;\;\boxed{(X,Y)=({\textstyle\frac{5\sqrt3}2}+{\textstyle\frac72}\;\;,{\textstyle\frac{7\sqrt3}2}-{\textstyle\frac52})}.
Rotation of Axes Example:
The xy-axes are rotated about the origin through an angle of \arctan\frac43 lying in the first quadrant. The coordinates of a point P referred to the new axes OX and OY are P (-1, -7). Find the coordinates of P referred to the xy-coordinate system.
Solution:
Let P(x, y) be the coordinates of P referred to the xy-coordinate system.
Angle of rotation is given by \tan\theta =\frac43 and therefore \sin\theta=\frac45 and \cos\theta=\frac35 also we have (X,Y)=(-1, -7).
since, we have
X=x\cos\theta+y\sin\theta.
Y=y\cos\theta-x\sin\theta.
by using (X,Y)=(-1, -7),\;\;\;\; \sin\theta=\frac45\;\;\;\; and\;\;\;\; \cos\theta=\frac35, we get
-1=x\frac35+y\frac45.
-7=y\frac35-x\frac45.
or
3x+4y+5=0 \;\;\;and \;\;\;-4x+3y+35=0
Solving these equations, we have
\frac x{125}=\frac y{-125}=\frac z{25}
⇒x=5 \;\;\;\;and \;\;\;\;y=-5
Thus coordinates of P referred to the xy-system are (5, -5).
After Rotation of Axes must-see translation of axes, for more information about the rotation of axis visit Wikipedia