HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Translation and Rotation of Axes
  1. 1Shifting the origin
  2. 2Rotating the axes
  3. 3Reducing a second-degree equation
  1. Mathematics
  2. /Translation and Rotation of Axes
  3. /Rotating the axes

Course 32.2·Lesson 2 of 3

Rotating the axes

Turning the axes through the angle θ\thetaθ about the origin gives x=Xcos⁡θ−Ysin⁡θx = X\cos\theta - Y\sin\thetax=Xcosθ−Ysinθ and y=Xsin⁡θ+Ycos⁡θy = X\sin\theta + Y\cos\thetay=Xsinθ+Ycosθ

about 30 min1 simulation2 practice questions1 Python program5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

Lesson 2 of 3Show all lessonsHide
Translation and Rotation of Axes
  1. 1Shifting the origin
  2. 2Rotating the axes
  3. 3Reducing a second-degree equation

Try the code and the simulations beside the lesson.

What you will be able to do

  • find the new coordinates of a point when the axes are turned;
  • choose the angle that removes the term in xyxyxy;
  • use the two invariants to find the new coefficients quickly.

Tilt your head

A sign hangs at a slant on a wall. You tilt your head until the letters are level, and then you read it easily. Turning the axes does the same for a curve. An ellipse whose axes are slanted has a term in xyxyxy. In axes along its own axes, that term is gone.

The formulas

Turn the axes through the angle θ\thetaθ, anticlockwise, about the origin. Let a point be at distance rrr from the origin, at the angle φ\varphiφ from the new XXX-axis. Then X=rcos⁡φX = r\cos\varphiX=rcosφ and Y=rsin⁡φY = r\sin\varphiY=rsinφ. From the old xxx-axis its angle is φ+θ\varphi + \thetaφ+θ. So

x=rcos⁡(φ+θ),\displaystyle x = r\cos(\varphi + \theta),x=rcos(φ+θ),
y=rsin⁡(φ+θ).\displaystyle y = r\sin(\varphi + \theta).y=rsin(φ+θ).

Expand with the addition formulas:

x=Xcos⁡θ−Ysin⁡θ,\displaystyle x = X\cos\theta - Y\sin\theta,x=Xcosθ−Ysinθ,
y=Xsin⁡θ+Ycos⁡θ.\displaystyle y = X\sin\theta + Y\cos\theta.y=Xsinθ+Ycosθ.

Turning back through −θ-\theta−θ gives the new coordinates from the old:

X=xcos⁡θ+ysin⁡θ,\displaystyle X = x\cos\theta + y\sin\theta,X=xcosθ+ysinθ,
Y=−xsin⁡θ+ycos⁡θ.\displaystyle Y = -x\sin\theta + y\cos\theta.Y=−xsinθ+ycosθ.

Distances from the origin, angles and areas do not change.

Grey old axes x and y, and red new axes X and Y turned through an angle theta anticlockwise about the same origin. A point P is joined to the origin. Dashed lines from P meet the old axes and the new axes, showing the old coordinates (x, y) and the new coordinates (X, Y) of the same point.

A first example. Turn the axes through 45∘45^\circ45∘ for the curve xy=8xy = 8xy=8. Then x=X−Y2x = \dfrac{X - Y}{\sqrt{2}}x=2​X−Y​ and y=X+Y2y = \dfrac{X + Y}{\sqrt{2}}y=2​X+Y​. So xy=X2−Y22=8xy = \dfrac{X^2 - Y^2}{2} = 8xy=2X2−Y2​=8, that is X2−Y2=16X^2 - Y^2 = 16X2−Y2=16. The curve xy=8xy = 8xy=8 is a rectangular hyperbola whose axes are the lines y=±xy = \pm xy=±x.

What happens to the terms of the second degree

Put the formulas into ax2+2hxy+by2ax^2 + 2hxy + by^2ax2+2hxy+by2. Write C=cos⁡θC = \cos\thetaC=cosθ and S=sin⁡θS = \sin\thetaS=sinθ. The new coefficients are

a′=aC2+2hSC+bS2,\displaystyle a' = aC^2 + 2hSC + bS^2,a′=aC2+2hSC+bS2,
b′=aS2−2hSC+bC2,\displaystyle b' = aS^2 - 2hSC + bC^2,b′=aS2−2hSC+bC2,
h′=(b−a)SC+h(C2−S2).\displaystyle h' = (b - a)SC + h(C^2 - S^2).h′=(b−a)SC+h(C2−S2).

With the double-angle formulas, h′=hcos⁡2θ−12(a−b)sin⁡2θh' = h\cos 2\theta - \tfrac{1}{2}(a - b)\sin 2\thetah′=hcos2θ−21​(a−b)sin2θ. So the term in XYXYXY disappears when

tan⁡2θ=2ha−b.\displaystyle \tan 2\theta = \dfrac{2h}{a - b}.tan2θ=a−b2h​.

When a=ba = ba=b, take θ=45∘\theta = 45^\circθ=45∘. The first-degree terms change too, but a turn about the origin never brings in a constant.

Two quantities that do not change

Add a′a'a′ and b′b'b′: the 2hSC2hSC2hSC terms cancel, and C2+S2=1C^2 + S^2 = 1C2+S2=1. So

a′+b′=a+b.\displaystyle a' + b' = a + b.a′+b′=a+b.

A longer calculation gives the second one:

a′b′−h′2=ab−h2.\displaystyle a'b' - h'^2 = ab - h^2.a′b′−h′2=ab−h2.

If you know matrices: the matrix $

(ahhb)\displaystyle \begin{pmatrix} a & h \\ h & b \end{pmatrix}(ah​hb​)

keepsitstraceanditsdeterminantwhentheaxesturn.When keeps its trace and its determinant when the axes turn. When keepsitstraceanditsdeterminantwhentheaxesturn.Whenh' = 0,thenewcoefficients, the new coefficients ,thenewcoefficientsa'and and andb'$ have a known sum and a known product. So they are the roots of

t2−(a+b)t+(ab−h2)=0.\displaystyle t^2 - (a + b)t + (ab - h^2) = 0.t2−(a+b)t+(ab−h2)=0.

A worked example

Remove the term in xyxyxy from 5x2+4xy+2y2=65x^2 + 4xy + 2y^2 = 65x2+4xy+2y2=6.

  1. The angle. tan⁡2θ=45−2=43\tan 2\theta = \dfrac{4}{5 - 2} = \dfrac{4}{3}tan2θ=5−24​=34​. So cos⁡2θ=35\cos 2\theta = \dfrac{3}{5}cos2θ=53​, cos⁡θ=25\cos\theta = \dfrac{2}{\sqrt{5}}cosθ=5​2​ and sin⁡θ=15\sin\theta = \dfrac{1}{\sqrt{5}}sinθ=5​1​.
  2. The new a′a'a′. a′=5⋅45+4⋅25+2⋅15=6a' = 5 \cdot \dfrac{4}{5} + 4 \cdot \dfrac{2}{5} + 2 \cdot \dfrac{1}{5} = 6a′=5⋅54​+4⋅52​+2⋅51​=6.
  3. The new b′b'b′ from the invariant. b′=(a+b)−a′=7−6=1b' = (a + b) - a' = 7 - 6 = 1b′=(a+b)−a′=7−6=1.
  4. Check the second invariant. a′b′=6a'b' = 6a′b′=6 and ab−h2=10−4=6ab - h^2 = 10 - 4 = 6ab−h2=10−4=6.
  5. The curve. 6X2+Y2=66X^2 + Y^2 = 66X2+Y2=6, that is X2+Y26=1X^2 + \dfrac{Y^2}{6} = 1X2+6Y2​=1. An ellipse with semi-axes 111 and 6\sqrt{6}6​.

Practise with new numbers

Try it in Python

The program finds the angle that removes the term in xyxyxy, then the new coefficients. It checks that h′h'h′ is zero and that the two invariants hold.

Read it first. Then run it. Is h′h'h′ zero, up to rounding?

1. Change the curve to x2+4xy+y2x^2 + 4xy + y^2x2+4xy+y2 with a, h, b = 1, 2, 1. Which angle does it choose, and what are a′a'a′ and b′b'b′?

2. Replace math.atan2(2 * h, a - b) with math.atan(2 * h / (a - b)). Which curve now makes the program fail, and why?

Common mistakes

  • Mixing the two directions. Old from new: x=Xcos⁡θ−Ysin⁡θx = X\cos\theta - Y\sin\thetax=Xcosθ−Ysinθ. New from old: X=xcos⁡θ+ysin⁡θX = x\cos\theta + y\sin\thetaX=xcosθ+ysinθ.
  • Forgetting to halve. The formula gives tan⁡2θ\tan 2\thetatan2θ, not tan⁡θ\tan\thetatanθ.
  • Dividing by zero. When a=ba = ba=b, the angle is 45∘45^\circ45∘.
  • Losing the invariants. Check a′+b′=a+ba' + b' = a + ba′+b′=a+b every time. It catches most slips.

Remember these

  • x=Xcos⁡θ−Ysin⁡θx = X\cos\theta - Y\sin\thetax=Xcosθ−Ysinθ, y=Xsin⁡θ+Ycos⁡θy = X\sin\theta + Y\cos\thetay=Xsinθ+Ycosθ.
  • No term in XYXYXY when tan⁡2θ=2ha−b\tan 2\theta = \dfrac{2h}{a - b}tan2θ=a−b2h​ (45∘45^\circ45∘ if a=ba = ba=b).
  • Invariants: a+ba + ba+b and ab−h2ab - h^2ab−h2.
  • Then a′a'a′ and b′b'b′ are the roots of t2−(a+b)t+(ab−h2)=0t^2 - (a + b)t + (ab - h^2) = 0t2−(a+b)t+(ab−h2)=0.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. The axes are turned through 90∘90^\circ90∘. What are the new coordinates of the point (3,1)(3, 1)(3,1)?
  1. What does x2−y2=2x^2 - y^2 = 2x2−y2=2 become when the axes are turned through 45∘45^\circ45∘?
  1. Through what acute angle must the axes turn to remove the term in xyxyxy from 3x2+23 xy+5y2=73x^2 + 2\sqrt{3}\,xy + 5y^2 = 73x2+23​xy+5y2=7?
  1. Use the invariants to find the new coefficients when the term in xyxyxy is removed from x2+4xy+y2x^2 + 4xy + y^2x2+4xy+y2.
  1. A student uses x=Xcos⁡θ+Ysin⁡θx = X\cos\theta + Y\sin\thetax=Xcosθ+Ysinθ. Test it with θ=90∘\theta = 90^\circθ=90∘ and the point with new coordinates (0,1)(0, 1)(0,1).

References

  • S. L. Loney, The Elements of Coordinate Geometry, Part I, the chapter on the transformation of coordinates.

Enroll free in Translation and Rotation of Axes

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (3)

A surveyor's map has the usual x and y axes, in km…Hard · High School (11–12) · by StemPy Lab
A machine part has an elliptical edge, given in cm by 7x² - 6√3 xy + 13y² = 16.…Advanced · High School (11–12) · by StemPy Lab
Let the axes be turned through any angle θ, and let ax² + 2hxy + by² become a'X² + 2h'XY + b'Y²…Advanced · High School (11–12) · by StemPy Lab
Next: lesson 3Reducing a second-degree equation
← Translation and Rotation of Axes
← Shifting the originReducing a second-degree equation →

Discussion (0)

Log in to join the discussion.

Loading…

. In a second-degree equation the term in
xyxyxy
disappears when
tan⁡2θ=2ha−b\tan 2\theta = \dfrac{2h}{a - b}tan2θ=a−b2h​
, or
θ=45∘\theta = 45^\circθ=45∘
when
a=ba = ba=b
. The sum
a+ba + ba+b
and the value
ab−h2ab - h^2ab−h2
do not change, so the new coefficients are the roots of
t2−(a+b)t+(ab−h2)=0t^2 - (a + b)t + (ab - h^2) = 0t2−(a+b)t+(ab−h2)=0
.

Python Labs (1)

Turning the axesPython Lab · by StemPy Lab