Analytic geometry · Coordinate transformations
The equation \(5x^2 + 4xy + 8y^2 - 32x - 56y + 80 = 0\) describes a perfectly ordinary ellipse, but you would never guess it: the ellipse is shifted and tilted, and the coordinate system is not adapted to it. This post is about changing coordinates so that the geometry becomes visible. We start with general (affine) coordinates and transformations, then use translation and rotation to bring any second-order curve to a simple standard form, and learn to tell what the curve is from two determinants, before doing any transformation at all.
Ordinary Cartesian coordinates use perpendicular axes with equal units. Affine coordinates drop both requirements: the axes can meet at any angle, and each axis has its own unit.
In vector language: \( \overrightarrow{OM} = x\,\overrightarrow{OE_1} + y\,\overrightarrow{OE_2} + z\,\overrightarrow{OE_3} \). The point \(O\) is the origin, and the segments \(OE_1, OE_2, OE_3\) are the units on the three axes. "Non-coplanar" guarantees that the three vectors form a basis, so every point gets exactly one triple \((x, y, z)\). Cartesian coordinates are the special case in which the vectors \(\overrightarrow{OE_i}\) are mutually perpendicular and of equal length.
In matrix form, \( \mathbf r' = \mathbf A\,\mathbf r + \mathbf d \): a linear map followed by a shift. The condition \( \det\mathbf A \ne 0 \) means the map is invertible, so no dimension is lost (space is not squashed onto a plane or a line).
| Preserved | Not preserved in general |
|---|---|
| straight lines and planes | lengths |
| parallelism | angles (a right angle may become oblique) |
| ratios of segments on one line (so midpoints, centroids) | circles (they become ellipses) |
| ratios of areas / volumes (all scaled by \(|\det\mathbf A|\)) | areas and volumes themselves |
A transformation can be viewed in two ways: as moving the points (with the coordinate system fixed), or as moving the coordinate system (with the points fixed). Here we take the second view: the same point gets new coordinates \((x', y')\) in a new, still Cartesian, system.
Where the rotation formulas come from: the new unit vectors are \( \mathbf i' = (\cos\varphi, \sin\varphi) \) and \( \mathbf j' = (-\sin\varphi, \cos\varphi) \) in old coordinates. A point with new coordinates \((x', y')\) is \( x'\mathbf i' + y'\mathbf j' \), and its old coordinates are exactly the formulas above. Both transformations are affine, but special: they preserve lengths and angles (the matrix of the rotation is orthogonal, with determinant \(1\)), so a curve keeps its shape and size; only its equation changes.
The factors \(2\) in front of \(B, D, E\) are there to make the following determinants neat:
\[ \delta = \begin{vmatrix}A & B\\ B & C\end{vmatrix} = AC - B^2, \qquad \Delta = \begin{vmatrix}A & B & D\\ B & C & E\\ D & E & F\end{vmatrix}. \]They are invariants: they have the same value after any translation and rotation of the axes. (So does \(A + C\).) This is what makes them useful: they describe the curve, not the coordinate system.
| \(\Delta \ne 0\) (non-degenerate) | \(\Delta = 0\) (degenerate) | |
|---|---|---|
| \(\delta > 0\) | ellipse (real or imaginary) | a point (two imaginary lines meeting at a real point) |
| \(\delta < 0\) | hyperbola | pair of intersecting lines |
| \(\delta = 0\) | parabola | pair of parallel lines (real, coincident or imaginary) |
How to read the table:
The plan is to remove the linear terms by a translation to the centre, then the \(xy\)-term by a rotation. Write \( \Phi(x, y) \equiv Ax^2 + 2Bxy + Cy^2 + 2Dx + 2Ey + F \).
Why: substituting \( x = x_1 + x_0 \), \( y = y_1 + y_0 \), the new linear terms have coefficients \(2(Ax_0 + By_0 + D)\) and \(2(Bx_0 + Cy_0 + E)\), which are exactly zero at the centre. The quadratic part does not change, and the new constant is \( F_1 = \Phi(x_0, y_0) \). Since equation (2) contains only even powers, the curve is symmetric with respect to the new origin: that is what "centre" means. (The system has a unique solution because its determinant is \(\delta \ne 0\).)
Why these formulas: after the rotation, the coefficient of \(XY\) is \( 2B\cos 2\varphi - (A - C)\sin 2\varphi \); setting it to zero gives the angle. The invariants \(A + C\) and \(\delta = AC - B^2\) become \(A_1 + C_1\) and \(A_1C_1\), so \(A_1, C_1\) are the two numbers with this sum and product: the roots of the quadratic. (In linear-algebra language, they are the eigenvalues of the matrix \(\begin{pmatrix}A & B\\ B & C\end{pmatrix}\), and the new axes point along its eigenvectors.)
Which root is \(A_1\) depends on which of the possible angles you choose. To be sure, compute \( A_1 = A\cos^2\varphi + 2B\sin\varphi\cos\varphi + C\sin^2\varphi \) for the chosen \(\varphi\).
If \(\delta = AC - B^2 = 0\), the quadratic part is a perfect square, \( Ax^2 + 2Bxy + Cy^2 = (\alpha x + \beta y)^2 \) (with \(\alpha^2 = A\), \(\alpha\beta = B\), \(\beta^2 = C\), after multiplying the equation by \(-1\) if needed). The system for the centre then has no unique solution, and the curve can be written as
\[ (\alpha x + \beta y)^2 + 2Dx + 2Ey + F = 0. \tag{3} \]Two cases occur.
If \( D = m\alpha \), \( E = m\beta \), the linear part also depends only on \( u = \alpha x + \beta y \), and (3) becomes
\[ (\alpha x + \beta y)^2 + 2m(\alpha x + \beta y) + F = 0, \]a quadratic equation in \(u\). Hence
\[ \alpha x + \beta y = -m \pm\sqrt{m^2 - F}: \]a pair of parallel lines (real if \(m^2 > F\), coincident if \(m^2 = F\), imaginary if \(m^2 < F\)).
Then (3) can be written as
\[ (\alpha x + \beta y + n)^2 + 2m(\beta x - \alpha y + q) = 0, \tag{4} \]where \(m, n, q\) are found by comparing coefficients of (3) and (4). The two expressions \( \alpha x + \beta y + n \) and \( \beta x - \alpha y + q \) define two perpendicular lines. Take them as the new axes: the line \( \alpha x + \beta y + n = 0 \) as the axis \(O_1X\) and \( \beta x - \alpha y + q = 0 \) as the axis \(O_1Y\). The new coordinates are the (signed) distances from these lines:
\[ X = \frac{\beta x - \alpha y + q}{\pm\sqrt{\alpha^2 + \beta^2}}, \qquad Y = \frac{\alpha x + \beta y + n}{\pm\sqrt{\alpha^2 + \beta^2}}. \]Equation (4) then becomes
\[ Y^2 = 2pX, \qquad p = \frac{|m|}{\sqrt{\alpha^2 + \beta^2}}: \]a parabola with vertex \(O_1\) (the intersection of the two lines) and axis \(O_1X\). The axis \(O_1X\) is oriented towards the half-plane in which \( \beta x - \alpha y + q \) has the sign opposite to the sign of \(m\). That is where the parabola lies, since by (4), \( m(\beta x - \alpha y + q) = -\frac12(\dots)^2 \le 0 \) on the curve.
| Invariant | Meaning |
|---|---|
| \(\delta = AC - B^2\) | type: ellipse (\(>0\)), hyperbola (\(<0\)), parabola (\(=0\)); \(\delta = A_1C_1\) |
| \(\Delta\) | \(\Delta = 0\): degenerate (pair of lines or a point); for \(\delta \ne 0\), \(F_1 = \Delta/\delta\) |
| \(A + C\) | \(= A_1 + C_1\); for an ellipse, real iff \((A + C)\Delta < 0\) |
Try each one before opening the solution. More solved problems from this topic are in Geometry.
\(A = 1, B = 0, C = -1, D = -1, E = 0, F = 1\). \( \delta = -1 < 0 \), and \( \Delta = 1\cdot(-1) - 0 + (-1)\cdot(0 - 1) = 0 \): a pair of intersecting lines. Indeed \( (x - 1)^2 = y^2 \), i.e. \( y = \pm(x - 1) \).
\( \delta = 1 > 0 \), \( \Delta = 1\cdot 2 - 0 + 1\cdot(0 - 1) = 1 \ne 0 \), \( (A + C)\Delta = 2 > 0 \): an imaginary ellipse. Indeed \( (x + 1)^2 + y^2 = -1 \) has no real points.
Centre: the origin (\(D = E = 0\)), \(F_1 = -8\). \( \lambda^2 - 6\lambda + 8 = 0 \): \(\lambda = 2, 4\). \(A = C\), so \(\varphi = 45^\circ\), and \( A_1 = \frac{3 + 2 + 3}{2} = 4 \), \( C_1 = 2 \): \( 4X^2 + 2Y^2 = 8 \), i.e. \( \frac{X^2}{2} + \frac{Y^2}{4} = 1 \).
\(A = 1, B = -2, C = 1, D = 1, E = 2, F = 0\). \( \delta = 1 - 4 = -3 \). Centre: \( x - 2y + 1 = 0 \), \( -2x + y + 2 = 0 \): \( (x_0, y_0) = \big(\frac53, \frac43\big) \). \( F_1 = \frac53 + \frac83 = \frac{13}{3} \ne 0 \), so \(\Delta = \delta F_1 = -13 \ne 0\): a hyperbola. With \(\lambda^2 - 2\lambda - 3 = 0\): \(\lambda = 3, -1\); \(\varphi = 45^\circ\) gives \(A_1 = -1\), \(C_1 = 3\): \( -X^2 + 3Y^2 + \frac{13}{3} = 0 \).
Substitute \( x = x_1 + x_0 \), \( y = y_1 + y_0 \) into (1). Quadratic terms in \(x_1, y_1\) come only from \(Ax^2 + 2Bxy + Cy^2\), with the same coefficients. The terms linear in \(x_1\) are \( 2Ax_0x_1 + 2By_0x_1 + 2Dx_1 = 2(Ax_0 + By_0 + D)x_1 \), and similarly for \(y_1\).
It becomes the parallelogram with vertices \((0, 0), (1, 0), (2, 1), (1, 1)\) (a shear). \(\det = 1\), so the area stays \(1\), although angles change.
A second-order equation hides a simple curve behind an unsuitable coordinate system. Translation moves the origin to the centre and kills the linear terms; rotation aligns the axes with the curve and kills the \(xy\)-term. And before doing any of that, the invariants \(\delta\) and \(\Delta\) tell you what you will find. The broader lesson, the one affine geometry is built on, is that some properties (being a line, being parallel, being an ellipse) do not depend on the coordinates, while equations do. Choosing coordinates adapted to the object is half of solving a geometric problem.
Related posts: extrema in several variables (the same discriminant \(AC - B^2\)), vectors, and areas of plane figures.