# Matrix representation of conic sections

In mathematics, the matrix representation of conic sections permits the tools of linear algebra to be used in the study of conic sections. It provides easy ways to calculate a conic section's axis, vertices, tangents and the pole and polar relationship between points and lines of the plane determined by the conic. The technique does not require putting the equation of a conic section into a standard form, thus making it easier to investigate those conic sections whose axes are not parallel to the coordinate system.

Conic sections (including degenerate ones) are the sets of points whose coordinates satisfy a second-degree polynomial equation in two variables,

${\displaystyle Q(x,y)=Ax^{2}+Bxy+Cy^{2}+Dx+Ey+F=0.}$

By an abuse of notation, this conic section will also be called Q when no confusion can arise.

This equation can be written in matrix notation, in terms of a symmetric matrix to simplify some subsequent formulae, as[1]

${\displaystyle \left({\begin{matrix}x&y\end{matrix}}\right)\left({\begin{matrix}A&B/2\\B/2&C\end{matrix}}\right)\left({\begin{matrix}x\\y\end{matrix}}\right)+\left({\begin{matrix}D&E\end{matrix}}\right)\left({\begin{matrix}x\\y\end{matrix}}\right)+F=0.}$

The sum of the first three terms of this equation, namely

${\displaystyle Ax^{2}+Bxy+Cy^{2}=\left({\begin{matrix}x&y\end{matrix}}\right)\left({\begin{matrix}A&B/2\\B/2&C\end{matrix}}\right)\left({\begin{matrix}x\\y\end{matrix}}\right),}$

is the quadratic form associated with the equation, and the matrix

${\displaystyle A_{33}=\left({\begin{matrix}A&B/2\\B/2&C\end{matrix}}\right)}$

is called the matrix of the quadratic form. The trace and determinant of ${\displaystyle A_{33}}$ are both invariant with respect to rotation of axes and translation of the plane (movement of the origin).[2][3]

The quadratic equation can also be written as

${\displaystyle \mathbf {x} ^{T}A_{Q}\mathbf {x} =0,}$

where ${\displaystyle \mathbf {x} }$ is the homogeneous coordinate vector in three variables restricted so that the last variable is 1, i.e.,

${\displaystyle {\begin{pmatrix}x\\y\\1\end{pmatrix}}}$

and where ${\displaystyle A_{Q}}$ is the matrix

${\displaystyle A_{Q}={\begin{pmatrix}A&B/2&D/2\\B/2&C&E/2\\D/2&E/2&F\end{pmatrix}}.}$

The matrix ${\displaystyle A_{Q}}$ is called the matrix of the quadratic equation.[4] Like that of ${\displaystyle A_{33}}$, its determinant is invariant with respect to both rotation and translation.[3]

The 2 × 2 upper left submatrix (a matrix of order 2) of AQ, obtained by removing the third (last) row and third (last) column from AQ is the matrix of the quadratic form. The above notation A33 is used in this article to emphasize this relationship.

## Classification

Proper (non-degenerate) and degenerate conic sections can be distinguished[5][6] based on the determinant of AQ:

If ${\displaystyle \det A_{Q}=0}$, the conic is degenerate.

If ${\displaystyle \det A_{Q}\neq 0}$ so that Q is not degenerate, we can see what type of conic section it is by computing the minor, ${\displaystyle \det A_{33}}$:

• Q is a hyperbola if and only if ${\displaystyle \det A_{33}<0}$,
• Q is a parabola if and only if ${\displaystyle \det A_{33}=0}$, and
• Q is an ellipse if and only if ${\displaystyle \det A_{33}>0}$.

In the case of an ellipse, we can distinguish the special case of a circle by comparing the last two diagonal elements corresponding to the coefficients of x2 and y2:

• If A = C and B = 0, then Q is a circle.

Moreover, in the case of a non-degenerate ellipse (with ${\displaystyle \det A_{33}>0}$ and ${\displaystyle \det A_{Q}\neq 0}$), we have a real ellipse if ${\displaystyle (A+C)\det A_{Q}<0}$ but an imaginary ellipse if ${\displaystyle (A+C)\det A_{Q}>0}$. An example of the latter is ${\displaystyle x^{2}+y^{2}+10=0}$, which has no real-valued solutions.

If the conic section is degenerate (${\displaystyle \det A_{Q}=0}$), ${\displaystyle \det A_{33}}$ still allows us to distinguish its form:

• Two intersecting lines (a hyperbola degenerated to its two asymptotes) if and only if ${\displaystyle \det A_{33}<0}$.
• Two parallel straight lines (a degenerate parabola) if and only if ${\displaystyle \det A_{33}=0}$. These lines are distinct and real if ${\displaystyle D^{2}+E^{2}>4(A+C)F}$, coincident if ${\displaystyle D^{2}+E^{2}=4(A+C)F}$, and non-existent in the real plane if ${\displaystyle D^{2}+E^{2}<4(A+C)F}$.
• A single point (a degenerate ellipse) if and only if ${\displaystyle \det A_{33}>0}$.

The case of coincident lines occurs if and only if the rank of the 3 × 3 matrix ${\displaystyle A_{Q}}$ is 1; in all other degenerate cases its rank is 2.[2]

## Central conics

When ${\displaystyle \det A_{33}\neq 0}$ a geometric center of the conic section exists and such conic sections (ellipses and hyperbolas) are called central conics.[7]

### Center

The center of a conic, if it exists, is a point that bisects all the chords of the conic that pass through it. This property can be used to calculate the coordinates of the center, which can be shown to be the point where the gradient of the quadratic function Q vanishes—that is,[8]

${\displaystyle \nabla Q=\left[{\frac {\partial Q}{\partial x}},{\frac {\partial Q}{\partial y}}\right]=[0,0].}$

This yields the center as given below.

An alternative approach that uses the matrix form of the quadratic equation is based on the fact that when the center is the origin of the coordinate system, there are no linear terms in the equation. Any translation to a coordinate origin (x0, y0), using x* = xx0, y* = yy0 gives rise to

${\displaystyle \left({\begin{matrix}x^{*}+x_{0}&y^{*}+y_{0}\end{matrix}}\right)\left({\begin{matrix}A&B/2\\B/2&C\end{matrix}}\right)\left({\begin{matrix}x^{*}+x_{0}\\y^{*}+y_{0}\end{matrix}}\right)+\left({\begin{matrix}D&E\end{matrix}}\right)\left({\begin{matrix}x^{*}+x_{0}\\y^{*}+y_{0}\end{matrix}}\right)+F=0.}$

The condition for (x0, y0) to be the conic's center (xc, yc) is that the coefficients of the linear x* and y* terms, when this equation is multiplied out, are zero. This condition produces the coordinates of the center:

${\displaystyle {\begin{pmatrix}x_{c}\\y_{c}\end{pmatrix}}={\begin{pmatrix}A&B/2\\B/2&C\end{pmatrix}}^{\!-1}{\begin{pmatrix}-D/2\\-E/2\end{pmatrix}}={\begin{pmatrix}(BE-2CD)/(4AC-B^{2})\\(DB-2AE)/(4AC-B^{2})\end{pmatrix}}.}$

This calculation can also be accomplished by taking the first two rows of the associated matrix AQ, multiplying each by (x, y, 1) and setting both inner products equal to 0, obtaining the following system:

${\displaystyle Ax+(B/2)y+D/2=0,}$
${\displaystyle (B/2)x+Cy+E/2=0.}$

This yields the above center point.

In the case of a parabola, that is, when 4ACB2 = 0, there is no center since the above denominators become zero (or, interpreted projectively, the center is on the line at infinity.)

#### Centered matrix equation

A central (non-parabola) conic ${\displaystyle Ax^{2}+Bxy+Cy^{2}+Dx+Ey+F=0}$ can be rewritten in centered matrix form as

${\displaystyle \left({\begin{matrix}x-x_{c}&y-y_{c}\end{matrix}}\right)\left({\begin{matrix}A&B/2\\B/2&C\end{matrix}}\right)\left({\begin{matrix}x-x_{c}\\y-y_{c}\end{matrix}}\right)=K,}$

where

${\displaystyle K={\frac {-\det(A_{Q})}{AC-(B/2)^{2}}}={\frac {-\det(A_{Q})}{\det(A_{33})}}.}$

Then for the ellipse case of AC > (B/2)2, the ellipse is real if the sign of K equals the sign of (A + C) (that is, the sign of each of A and C), imaginary if they have opposite signs, and a degenerate point ellipse if K = 0. In the hyperbola case of AC < (B/2)2, the hyperbola is degenerate if and only if K = 0.

### Standard form of a central conic

The standard form of the equation of a central conic section is obtained when the conic section is translated and rotated so that its center lies at the center of the coordinate system and its axes coincide with the coordinate axes. This is equivalent to saying that the coordinate system's center is moved and the coordinate axes are rotated to satisfy these properties. In the diagram, the original xy-coordinate system with origin O is moved to the x'y'-coordinate system with origin O'.

Translating and rotating coordinates

The translation is by the vector ${\displaystyle {\vec {t}}={\begin{pmatrix}x_{c}\\y_{c}\end{pmatrix}}.}$

The rotation by angle α can be carried out by diagonalizing the matrix A33. Thus, if ${\displaystyle \lambda _{1}}$ and ${\displaystyle \lambda _{2}}$ are the eigenvalues of the matrix A33, the centered equation can be rewritten in new variables x' and y' as[9]

${\displaystyle \lambda _{1}x'^{2}+\lambda _{2}y'^{2}=-{\frac {\det A_{Q}}{\det A_{33}}}.}$

Dividing by ${\displaystyle K=-{\frac {\det A_{Q}}{\det A_{33}}}}$ we obtain a standard canonical form.

For example, for an ellipse this form is

${\displaystyle {\frac {{x'}^{2}}{a^{2}}}+{\frac {{y'}^{2}}{b^{2}}}=1.}$

From here we get a and b, the lengths of the semi-major and semi-minor axes in conventional notation.

For central conics, both eigenvalues are non-zero and the classification of the conic sections can be obtained by examining them.[10]

• If λ1 and λ2 have the same algebraic sign, then Q is a real ellipse, imaginary ellipse or real point if K has the same sign, has the opposite sign or is zero, respectively.
• If λ1 and λ2 have opposite algebraic signs, then Q is a hyperbola or two intersecting lines depending on whether K is nonzero or zero, respectively.

### Axes

By the principal axis theorem, the two eigenvectors of the matrix of the quadratic form of a central conic section (ellipse or hyperbola) are perpendicular (orthogonal to each other) and each is parallel to (in the same direction as) either the major or minor axis of the conic. The eigenvector having the smallest eigenvalue (in absolute value) corresponds to the major axis.[11]

Specifically, if a central conic section has center (xc, yc) and an eigenvector of A33 is given by v(v1, v2) then the principal axis (major or minor) corresponding to that eigenvector has equation,

${\displaystyle {\frac {x-x_{c}}{v_{1}}}={\frac {y-y_{c}}{v_{2}}}.}$

### Vertices

The vertices of a central conic can be determined by calculating the intersections of the conic and its axes — in other words, by solving the system consisting of the quadratic conic equation and the linear equation for alternately one or the other of the axes. Two or no vertices are obtained for each axis, since, in the case of the hyperbola, the minor axis does not intersect the hyperbola at a point with real coordinates. However, from the broader view of the complex plane, the minor axis of an hyperbola does intersect the hyperbola, but at points with complex coordinates.[12]

## Poles and polars

Using homogeneous coordinates,[13] the points[14]

${\displaystyle \mathbf {p} ={\begin{pmatrix}p_{0}\\p_{1}\\p_{2}\end{pmatrix}}}$ and ${\displaystyle \mathbf {r} ={\begin{pmatrix}r_{0}\\r_{1}\\r_{2}\end{pmatrix}}}$

are conjugate with respect to the conic Q provided

${\displaystyle \mathbf {p} ^{T}A_{Q}\mathbf {r} =0.}$

The conjugates of a fixed point p either form a line or consist of all the points in the plane of the conic. When the conjugates of p form a line, the line is called the polar of p and the point p is called the pole of the line, with respect to the conic. This relationship between points and lines is called a polarity.

If the conic is non-degenerate, the conjugates of a point always form a line and the polarity defined by the conic is a bijection between the points and lines of the extended plane containing the conic (that is, the plane together with the points and line at infinity).

If the point p lies on the conic Q, the polar line of p is the tangent line to Q at p.

The equation, in homogeneous coordinates, of the polar line of the point p with respect to the non-degenerate conic Q is given by

${\displaystyle \mathbf {p} ^{T}A_{Q}{\begin{pmatrix}x\\y\\z\end{pmatrix}}=0.}$

Just as p uniquely determines its polar line (with respect to a given conic), so each line determines a unique pole p. Furthermore, a point p is on a line L which is the polar of a point r, if and only if the polar of p passes through the point r (La Hire's theorem).[15] Thus, this relationship is an expression of geometric duality between points and lines in the plane.

Several familiar concepts concerning conic sections are directly related to this polarity. The center of a non-degenerate conic can be identified as the pole of the line at infinity. A parabola, being tangent to the line at infinity, would have its center being a point on the line at infinity. Hyperbolas intersect the line at infinity in two distinct points and the polar lines of these points are the asymptotes of the hyperbola and are the tangent lines to the hyperbola at these points of infinity. Also, the polar line of a focus of the conic is its corresponding directrix.[16]

## Tangents

Let line L be the polar line of point p with respect to the non-degenerate conic Q. By La Hire's theorem, every line passing through p has its pole on L. If L intersects Q in two points (the maximum possible) then the polars of those points are tangent lines that pass through p and such a point is called an exterior or outer point of Q. If L intersects Q in only one point, then it is a tangent line and p is the point of tangency. Finally, if L does not intersect Q then p has no tangent lines passing through it and it is called an interior or inner point.[17]

The equation of the tangent line (in homogeneous coordinates) at a point p on the non-degenerate conic Q is given by,

${\displaystyle \mathbf {p} ^{T}A_{Q}{\begin{pmatrix}x\\y\\z\end{pmatrix}}=0.}$

If p is an exterior point, first find the equation of its polar (the above equation) and then the intersections of that line with the conic, say at points s and t. The polars of s and t will be the tangents through p.

Using the theory of poles and polars, the problem of finding the four mutual tangents of two conics reduces to finding the intersection of two conics.

## Notes

1. ^ Brannan, Esplen & Gray 1999, p. 30
2. ^ a b Pettofrezzo 1978, p. 110
3. ^ a b Spain 2007, pp. 59–62
4. ^ It is also a matrix of a quadratic form, but this form has three variables and is ${\displaystyle Ax^{2}+Bxy+Cy^{2}+Dxz+Eyz+Fz^{2}}$.
5. ^ Lawrence 1972, p. 63
6. ^ Spain 2007, p. 70
7. ^ Pettofrezzo 1978, p. 105
8. ^ Ayoub 1993, p. 322
9. ^ Ayoub 1993, p. 324
10. ^ Pettofrezzo 1978, p. 108
11. ^ Ostermann & Wanner 2012, p. 311
12. ^ Kendig, Keith (2005), Conics, The Mathematical Association of America, pp. 89–102, ISBN 978-0-88385-335-1
13. ^ This permits the algebraic inclusion of infinite points and a line at infinity which are necessary to have for some of the following results
14. ^ This section follows Fishback, W.T. (1969), Projective and Euclidean Geometry (2nd ed.), Wiley, pp. 167–172
15. ^ Brannan, Esplen & Gray 1999, p. 189
16. ^ Akopyan, A.V.; Zaslavsky, A.A. (2007), Geometry of Conics, American Mathematical Society, p. 72, ISBN 978-0-8218-4323-9
17. ^ Interpreted in the complex plane such a point is on two complex tangent lines that meet Q in complex points.