When axes are rotated by angle θ anticlockwise, new coordinates (X, Y) relate to old (x, y) by these equations.
Let axes rotate anticlockwise by θ, origin fixed. A point P at distance r from O at angle ϕ in the old system has:
Old coordinates: (rcosϕ,rsinϕ)
New coordinates: (rcos(ϕ−θ),rsin(ϕ−θ))
Expanding:
X=rcos(ϕ−θ)=rcosϕcosθ+rsinϕsinθ=xcosθ+ysinθ
Y=rsin(ϕ−θ)=rsinϕcosθ−rcosϕsinθ=−xsinθ+ycosθ
The inverse (rotating back by −θ):
x=Xcosθ−Ysinθ,y=Xsinθ+Ycosθ
What is preserved
Distances, angles, the origin, the degree of any equation.
Standard use
Choose θ to eliminate the xy cross-term in a second degree equation. The required angle satisfies cot2θ=2ha−b. After rotation, the equation has the form AX2+BY2+…=0 — the conic type is immediately readable.