In short

Shifting the origin moves every point's coordinates by a fixed amount. Rotating the axes mixes the x- and y-coordinates through trigonometric functions. Neither operation changes the curve — only its equation. The main payoff: a well-chosen shift or rotation can simplify a messy equation into a form you already know how to handle.

Take the equation x^2 + y^2 - 6x + 4y + 4 = 0. Can you tell what shape this is? Probably not at a glance. But complete the square:

(x - 3)^2 + (y + 2)^2 = 9

Now you can see it: a circle, centre (3, -2), radius 3. The equation looks complicated only because the centre is not at the origin. If you could move the origin to (3, -2), the equation would become X^2 + Y^2 = 9 — a perfect circle centred at the new origin, clean and simple.

That "moving the origin" is exactly what a transformation of axes does.

The idea is old and powerful. A curve is a geometric object — it does not care where you put your axes. A circle is a circle whether you set up your coordinates at its centre or 100 metres to the left. But the equation of the circle depends entirely on where the axes are. By choosing the axes wisely — shifting them, rotating them, or both — you can turn a hard equation into an easy one.

Shifting the origin

The idea

Suppose you want to move your origin from (0, 0) to a new point (h, k). Every point in the plane stays where it is — the geometry does not change. But the coordinates of each point change, because you are measuring from a new reference point.

Call the old coordinates (x, y) and the new coordinates (X, Y). A point P that used to be at (x, y) measured from the old origin is now at (X, Y) measured from the new origin. Since the new origin is at (h, k) in old coordinates, the relationship is:

x = X + h, \qquad y = Y + k

Or equivalently:

X = x - h, \qquad Y = y - k

These two lines are the entire theory of shifting the origin. Everything else is application.

Shifting the origin from $O(0,0)$ to $O'(3,-2)$. The point $P$ has old coordinates $(6,1)$ and new coordinates $(6-3, 1-(-2)) = (3,3)$. The point itself has not moved — only the reference frame has.

Why this is useful: a worked derivation

Go back to the circle x^2 + y^2 - 6x + 4y + 4 = 0. Completing the square gave (x-3)^2 + (y+2)^2 = 9, a circle with centre (3, -2).

Shift the origin to (3, -2). Set h = 3, k = -2. Then x = X + 3 and y = Y - 2.

Substitute into the original equation:

(X + 3)^2 + (Y - 2)^2 - 6(X + 3) + 4(Y - 2) + 4 = 0

Expand:

X^2 + 6X + 9 + Y^2 - 4Y + 4 - 6X - 18 + 4Y - 8 + 4 = 0

Collect terms. The 6X terms cancel: +6X - 6X = 0. The 4Y terms cancel: -4Y + 4Y = 0. The constants: 9 + 4 - 18 - 8 + 4 = -9.

X^2 + Y^2 - 9 = 0
X^2 + Y^2 = 9

The equation in the new coordinates is a circle of radius 3 centred at the new origin. No linear terms, no constants to puzzle over — just the standard form of a circle.

This is not a trick. This is the entire point of shifting the origin: move the axes so that the centre of the curve sits at the origin, and the equation simplifies because the linear terms vanish.

The general principle

For any second-degree curve (circle, ellipse, parabola, hyperbola), the linear terms in the equation come from the fact that the centre (or vertex) is not at the origin. Shifting the origin to the centre (or vertex) eliminates those linear terms. This is why completing the square and shifting the origin are essentially the same operation — completing the square is the algebraic version of the geometric act of recentring.

Rotation of axes

The idea

Now suppose the axes are in the right position (the origin is fine) but the wrong orientation. The classic example: the equation xy = 4. This is a hyperbola — but its axes of symmetry are along the lines y = x and y = -x, tilted at 45° to the coordinate axes. If you could rotate the axes by 45°, the equation would take the standard form of a hyperbola.

Rotation is harder than shifting because it involves trigonometry. But the formula is just as mechanical.

Rotate the axes by angle \theta counterclockwise. The old coordinates (x, y) and the new coordinates (X, Y) are related by:

x = X\cos\theta - Y\sin\theta
y = X\sin\theta + Y\cos\theta

Or equivalently (solving for X and Y):

X = x\cos\theta + y\sin\theta
Y = -x\sin\theta + y\cos\theta

Deriving the rotation formulas

These formulas deserve a derivation, not just a statement. Take any point P in the plane. In the old system, P has coordinates (x, y). Think of P in polar form: let r be the distance from the origin to P, and \alpha be the angle that OP makes with the old x-axis. Then:

x = r\cos\alpha, \qquad y = r\sin\alpha

Now rotate the axes by \theta counterclockwise. In the new system, the distance from the origin to P is still r (rotation doesn't change distances), but the angle is now \alpha - \theta (because the reference direction has rotated by \theta). So:

X = r\cos(\alpha - \theta), \qquad Y = r\sin(\alpha - \theta)

Expand using the angle-subtraction formulas:

X = r\cos\alpha\cos\theta + r\sin\alpha\sin\theta = x\cos\theta + y\sin\theta
Y = r\sin\alpha\cos\theta - r\cos\alpha\sin\theta = -x\sin\theta + y\cos\theta

That is the entire derivation. The rotation formulas come from nothing more than polar coordinates and the angle-subtraction identities.

To get the reverse — expressing (x, y) in terms of (X, Y) — you can either solve the system of two equations for x and y, or notice that converting from new coordinates back to old coordinates is the same as rotating by -\theta. Replacing \theta with -\theta in the formulas (and using \cos(-\theta) = \cos\theta, \sin(-\theta) = -\sin\theta) gives:

x = X\cos\theta - Y\sin\theta
y = X\sin\theta + Y\cos\theta
Rotation of axes by angle thetaA diagram showing both the old x-y axes and the new X-Y axes, rotated counterclockwise by angle theta. A point P is shown with its coordinates in both systems. The old axes are in grey, the new axes are in red, and the point P is marked with both sets of coordinates. x y X Y θ P r
Rotating the axes by angle $\theta$ counterclockwise. The old axes are black, the new axes (in red) are tilted by $\theta$. The point $P$ is the same in both systems — only the coordinates change.

Applying rotation: the hyperbola xy = 4

The equation xy = 4 represents a rectangular hyperbola — one whose asymptotes are the coordinate axes. Its natural axes of symmetry are the lines y = x and y = -x, which make 45° angles with the coordinate axes. So rotate by \theta = 45°.

With \theta = 45°, \cos 45° = \sin 45° = \frac{1}{\sqrt{2}}. The transformation formulas become:

x = \frac{X - Y}{\sqrt{2}}, \qquad y = \frac{X + Y}{\sqrt{2}}

Substitute into xy = 4:

\frac{X - Y}{\sqrt{2}} \cdot \frac{X + Y}{\sqrt{2}} = 4
\frac{(X - Y)(X + Y)}{2} = 4
\frac{X^2 - Y^2}{2} = 4
X^2 - Y^2 = 8
\frac{X^2}{8} - \frac{Y^2}{8} = 1

In the new coordinates, this is a standard hyperbola with a^2 = 8 and b^2 = 8 — a rectangular hyperbola centred at the origin, with its transverse axis along the new X-axis.

The rectangular hyperbola $xy = 4$ with its lines of symmetry $y = x$ and $y = -x$ shown as dashed lines. Rotating the axes by $45°$ along these lines gives the standard form $X^2 - Y^2 = 8$.

The formal definitions

Shifting of origin

If the origin is shifted from (0, 0) to the point (h, k), the old coordinates (x, y) and new coordinates (X, Y) of any point are related by:

x = X + h, \qquad y = Y + k
X = x - h, \qquad Y = y - k

The curve's shape, size, and position in the plane are unchanged. Only the equation changes.

Rotation of axes

If the axes are rotated through an angle \theta counterclockwise about the origin, the old coordinates (x, y) and new coordinates (X, Y) of any point are related by:

x = X\cos\theta - Y\sin\theta, \qquad y = X\sin\theta + Y\cos\theta
X = x\cos\theta + y\sin\theta, \qquad Y = -x\sin\theta + y\cos\theta

The curve's shape, size, and position in the plane are unchanged. Only the equation changes.

Notice the beautiful structure of the rotation formulas. They can be written as a matrix equation:

\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix} \begin{pmatrix} X \\ Y \end{pmatrix}

The 2 \times 2 matrix is called a rotation matrix. It has a special property: its inverse is its transpose — meaning to undo a rotation, you just flip the matrix across its diagonal. This is why the reverse formulas (X and Y in terms of x and y) look so similar: the same \cos\theta and \sin\theta appear, just rearranged.

Worked examples

Example 1: Simplify a parabola by shifting the origin

The equation y^2 - 8y + 4x + 12 = 0 represents a curve. Simplify it by a suitable shift of origin.

Step 1. Complete the square on y.

y^2 - 8y = (y - 4)^2 - 16

Substitute back:

(y - 4)^2 - 16 + 4x + 12 = 0
(y - 4)^2 + 4x - 4 = 0
(y - 4)^2 = -4(x - 1)

Why: completing the square isolates the squared variable and reveals the vertex. The vertex is at the point where both the squared term and the linear term equal zero.

Step 2. Identify the vertex and shift the origin there. The equation (y-4)^2 = -4(x-1) has vertex at (1, 4) in old coordinates. Set h = 1, k = 4, so X = x - 1 and Y = y - 4.

Why: at the vertex, Y = 0 and X = 0 — the curve "starts" there. Shifting the origin to the vertex makes Y = 0 at the vertex, which means the constant terms vanish from the equation.

Step 3. Write the equation in new coordinates.

Y^2 = -4X

Why: direct substitution. The equation (y-4)^2 = -4(x-1) becomes Y^2 = -4X with the shift Y = y-4, X = x-1.

Step 4. Identify the curve. Y^2 = -4X is a parabola in standard form, opening to the left (the negative sign), with 4a = 4, so a = 1. The focus is at (-1, 0) in the new coordinates, which is (0, 4) in the old coordinates. The directrix is X = 1 in new coordinates, i.e., x = 2 in old coordinates.

Why: comparing Y^2 = -4X with Y^2 = -4aX gives a = 1. For a leftward-opening parabola, the focus is at (-a, 0) and the directrix is X = a.

Result: The curve is a parabola with vertex (1, 4), focus (0, 4), and directrix x = 2. After shifting the origin to the vertex, its equation simplifies to Y^2 = -4X.

The parabola $y^2 - 8y + 4x + 12 = 0$, which opens to the left. The vertex is at $(1, 4)$ and the focus is at $(0, 4)$. Shifting the origin to the vertex gives the clean equation $Y^2 = -4X$.

The original equation y^2 - 8y + 4x + 12 = 0 is the same parabola as Y^2 = -4X — the same shape, the same size, the same location in the plane. The only difference is where the coordinate axes sit. The shifted equation is easier to work with because the algebra is simpler. That is the whole payoff of a transformation of axes.

Example 2: Remove the $xy$ term by rotation

The equation x^2 + 2xy + y^2 - 2x + 2y = 0 has an xy term. Remove it by rotating the axes through an appropriate angle.

Step 1. Identify the coefficient of xy. The general second-degree equation is Ax^2 + 2Hxy + By^2 + 2Gx + 2Fy + C = 0. Here A = 1, 2H = 2 so H = 1, and B = 1. Also 2G = -2 so G = -1, 2F = 2 so F = 1, and C = 0.

Why: identifying the coefficients in the standard general form lets you apply the rotation-angle formula. The xy term (coefficient 2H) is the one to eliminate.

Step 2. Find the angle of rotation. The xy term vanishes when:

\tan 2\theta = \frac{2H}{A - B}

Here A - B = 1 - 1 = 0, so \tan 2\theta is undefined, which means 2\theta = 90°, so \theta = 45°.

Why: this formula comes from substituting the rotation relations into the general equation and collecting the XY coefficient. Setting that coefficient to zero gives this condition on \theta. When A = B, the required angle is always 45°.

Step 3. Apply the rotation with \theta = 45°. Since \cos 45° = \sin 45° = \frac{1}{\sqrt{2}}:

x = \frac{X - Y}{\sqrt{2}}, \qquad y = \frac{X + Y}{\sqrt{2}}

Compute each term of the original equation in the new coordinates:

x^2 = \frac{(X-Y)^2}{2} = \frac{X^2 - 2XY + Y^2}{2}

y^2 = \frac{(X+Y)^2}{2} = \frac{X^2 + 2XY + Y^2}{2}

2xy = 2 \cdot \frac{(X-Y)(X+Y)}{2} = X^2 - Y^2

-2x = -2 \cdot \frac{X-Y}{\sqrt{2}} = -\sqrt{2}(X - Y) = -\sqrt{2}\,X + \sqrt{2}\,Y

2y = 2 \cdot \frac{X+Y}{\sqrt{2}} = \sqrt{2}(X + Y) = \sqrt{2}\,X + \sqrt{2}\,Y

Why: each term is computed separately for clarity. The key computation is 2xy = X^2 - Y^2, which shows how the rotation converts an xy term into pure X^2 and Y^2 terms.

Step 4. Add all the terms together.

x^2 + 2xy + y^2 - 2x + 2y
= \frac{X^2 - 2XY + Y^2}{2} + (X^2 - Y^2) + \frac{X^2 + 2XY + Y^2}{2} + (-\sqrt{2}\,X + \sqrt{2}\,Y) + (\sqrt{2}\,X + \sqrt{2}\,Y)

The XY terms from x^2 and y^2: \frac{-2XY}{2} + \frac{2XY}{2} = 0. (The xy cross-term from 2xy was already converted to X^2 - Y^2, with no XY in it.)

The X^2 terms: \frac{X^2}{2} + X^2 + \frac{X^2}{2} = 2X^2.

The Y^2 terms: \frac{Y^2}{2} - Y^2 + \frac{Y^2}{2} = 0.

The X terms: -\sqrt{2}\,X + \sqrt{2}\,X = 0.

The Y terms: \sqrt{2}\,Y + \sqrt{2}\,Y = 2\sqrt{2}\,Y.

So the equation becomes:

2X^2 + 2\sqrt{2}\,Y = 0
X^2 = -\sqrt{2}\,Y

Why: all the XY terms have cancelled — the rotation has done its job. The resulting equation has no XY term and no Y^2 term, so it is a parabola in the new coordinates.

Result: After rotation by 45°, the equation becomes X^2 = -\sqrt{2}\,Y — a downward-opening parabola in the rotated coordinate system.

The curve $x^2 + 2xy + y^2 - 2x + 2y = 0$ is a parabola whose axis is tilted at $45°$ to the coordinate axes. The dashed lines show the rotated $X$ and $Y$ axes. In these rotated coordinates, the equation is the clean standard form $X^2 = -\sqrt{2}\,Y$.

The xy term in the original equation was the symptom of a rotated curve. The rotation removed it, revealing the curve's true identity: a parabola. Without rotation, you would have to wrestle with the xy term throughout every computation — intersection, tangent, normal, everything. With rotation, the parabola is in standard form, and all the standard techniques apply.

Removing the xy term: the general method

The most common use of rotation in coordinate geometry is to eliminate the xy term from a second-degree equation. Here is the general recipe.

The general second-degree equation is:

Ax^2 + 2Hxy + By^2 + 2Gx + 2Fy + C = 0

(The convention of writing 2H instead of H for the xy coefficient, and similarly 2G and 2F for the linear terms, is a standard Indian textbook convention that makes many formulas come out cleaner.)

After rotating the axes by angle \theta, the coefficient of XY in the new equation is:

(B - A)\sin 2\theta + 2H\cos 2\theta

Setting this to zero:

(A - B)\sin 2\theta = 2H\cos 2\theta
\tan 2\theta = \frac{2H}{A - B}

This gives the angle \theta you need to rotate by. A few cases:

After the rotation, the resulting equation will have the form A'X^2 + B'Y^2 + 2G'X + 2F'Y + C' = 0 — no XY term. You can then complete the square to shift the origin and reduce the equation to one of the standard conic forms.

Combined transformations

Sometimes you need both a rotation and a shift. The order matters in principle, but either way the final result is the same curve in the same place — only the intermediate equations differ.

The standard approach for a general conic equation with an xy term:

  1. Rotate first to eliminate the xy term. This gives an equation in (X, Y) with no cross term.
  2. Shift second to move the origin to the centre (for ellipses and hyperbolas) or vertex (for parabolas). This eliminates the linear terms.
  3. The result is the curve's equation in standard form.

Here is a compact example. Consider x^2 + 4xy + 4y^2 + 2x - y + 1 = 0. Identify: A = 1, 2H = 4 so H = 2, B = 4. The angle: \tan 2\theta = \frac{2(2)}{1 - 4} = \frac{4}{-3}, so \tan 2\theta = -4/3.

From \tan 2\theta = -4/3: using the identity \cos 2\theta = \frac{1}{\sqrt{1 + \tan^2 2\theta}}, but being careful about the sign. Since \tan 2\theta = -4/3 and the goal is 0 < \theta < 90°, that means 90° < 2\theta < 180°, so \cos 2\theta = -3/5 and \sin 2\theta = 4/5.

Then \cos\theta = \sqrt{\frac{1 + \cos 2\theta}{2}} = \sqrt{\frac{1 - 3/5}{2}} = \sqrt{\frac{1}{5}} = \frac{1}{\sqrt{5}} and \sin\theta = \sqrt{\frac{1 - \cos 2\theta}{2}} = \sqrt{\frac{1 + 3/5}{2}} = \sqrt{\frac{4}{5}} = \frac{2}{\sqrt{5}}.

So the rotation formulas are x = \frac{X - 2Y}{\sqrt{5}} and y = \frac{2X + Y}{\sqrt{5}}. You would substitute these into the equation, and the XY term would vanish, leaving a simpler equation that you can then reduce by shifting.

The computation is long but entirely mechanical — each step follows the recipe, with no guessing required.

Common confusions

Going deeper

If you came here to learn how to shift and rotate axes and to apply these transformations to simplify equations, you have it — you can stop here. The rest of this section covers some theoretical properties and connections to the broader theory of invariants and linear algebra.

Invariants under transformation

Some quantities remain unchanged under a transformation of axes. These are called invariants.

Under a shift of origin, the following are invariant for a general second-degree equation Ax^2 + 2Hxy + By^2 + 2Gx + 2Fy + C = 0:

Under a rotation of axes, the following are invariant:

The quantity A + B being invariant under rotation has a beautiful consequence: for the equation xy = 4 (where A = 0, B = 0, H = 1/2), A + B = 0. After rotation to X^2/8 - Y^2/8 = 1, the new A' = 1/8 and B' = -1/8, so A' + B' = 0 — confirmed.

The quantity H^2 - AB determines the type of the conic:

Condition Curve type
H^2 - AB < 0 Ellipse (or circle if A = B and H = 0)
H^2 - AB = 0 Parabola
H^2 - AB > 0 Hyperbola

This classification does not change under any transformation of axes — it is an intrinsic property of the curve, not of the equation. You can check: for xy = 4, H^2 - AB = (1)^2 - (0)(0) = 1 > 0 — hyperbola. For the circle x^2 + y^2 = 9, H^2 - AB = 0 - 1 = -1 < 0 — ellipse (a circle is a special ellipse). For the parabola y^2 = 4x, A = 0, B = 1, H = 0, so H^2 - AB = 0 — parabola. The invariant never lies.

The connection to linear algebra

The rotation matrix \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix} is an orthogonal matrix — its columns are unit vectors that are perpendicular to each other. The determinant of this matrix is \cos^2\theta + \sin^2\theta = 1, which means the transformation preserves both distances and orientation (it does not flip the plane).

This is a special case of a more general idea. Any rigid motion of the plane (one that preserves all distances) can be decomposed as a rotation followed by a translation (shift). The set of all such motions forms a mathematical structure called the Euclidean group. The fact that the equation of a curve changes under these motions while the curve itself does not is a manifestation of the principle that geometry is the study of properties preserved by a group of transformations — an idea formulated by Felix Klein in his Erlangen programme.

In linear algebra, the operation of "removing the xy term by rotation" has a precise name: it is the diagonalisation of the quadratic form Ax^2 + 2Hxy + By^2. The angle \theta that eliminates the cross term aligns the axes with the eigenvectors of the matrix \begin{pmatrix} A & H \\ H & B \end{pmatrix}. The new coefficients A' and B' are the eigenvalues of this matrix. You will see this machinery in full when you study linear algebra.

Historical note

Coordinate geometry — the idea of representing curves by equations — was systematised by Descartes in the 17th century. But the specific technique of transforming axes was developed extensively in the 18th and 19th centuries by mathematicians studying conic sections. The classification of conics by invariants was a major achievement of this period, and it remains one of the cleanest applications of linear algebra to geometry.

In Indian mathematics, the study of coordinate geometry is a core part of the JEE syllabus, and transformation of axes is one of the key tools used throughout the coordinate geometry chapters — from straight lines to conics. Every time you encounter a second-degree equation with an xy term, the technique of this article is the tool you reach for.

Where this leads next

Transformation of axes is a tool that supports nearly every other topic in coordinate geometry. The most immediate continuations: