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,
<math display="block">Q(x,y) = Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0.</math>
By an abuse of notation, this conic section will also be called <math>Q</math> 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
<math display="block">\begin{pmatrix} x & y \end{pmatrix} \begin{pmatrix} A & B/2 \\ B/2 & C \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} + \begin{pmatrix} D & E \end{pmatrix} \begin{pmatrix} x\\y \end{pmatrix} + F = 0.</math>
The sum of the first three terms of this equation, namely
<math display="block">Ax^2 + Bxy + Cy^2 = \begin{pmatrix} x & y \end{pmatrix} \begin{pmatrix} A & B/2 \\ B/2 & C \end{pmatrix} \begin{pmatrix}x\\y\end{pmatrix},</math>
is the quadratic form associated with the equation, and the matrix
<math display="block">A_{33} = \begin{pmatrix} A & B/2 \\ B/2 & C\end{pmatrix}</math>
is called the matrix of the quadratic form. The trace and determinant of <math>A_{33} </math> are both invariant with respect to rotation of axes and translation of the plane (movement of the origin).
The quadratic equation can also be written as
<math display="block">\mathbf{x}^\mathsf{T} A_Q\mathbf{x} = 0,</math>
where <math>\mathbf{x}</math> is the homogeneous coordinate vector in three variables restricted so that the last variable is 1, i.e.,
<math display="block">\begin{pmatrix} x \\ y \\ 1 \end{pmatrix}</math>
and where <math>A_Q</math> is the matrix
<math display="block">A_Q =
\begin{pmatrix}
A & B/2 & D/2 \\
B/2 & C & E/2 \\
D/2 & E/2 & F
\end{pmatrix}.</math>
The matrix <math>A_Q</math> is called the matrix of the quadratic equation. Like that of <math>A_{33}</math>, its determinant is invariant with respect to both rotation and translation. based on the determinant of <math>A_Q=(AC-\frac{B^2}{4})F+\frac{BDE-C{D}^2-A{E}^2}{4}</math>:
If <math>\det A_Q = 0</math>, the conic is degenerate.
If <math>\det A_Q \neq 0</math> so that <math>Q</math> is not degenerate, we can see what type of conic section it is by computing the minor, <math>\det A_{33}=AC-\frac{B^2}{4}</math>:
- <math>Q</math> is a hyperbola if and only if <math> \det A_{33} < 0 </math>,
- <math>Q</math> is a parabola if and only if <math> \det A_{33} = 0 </math>, and
- <math>Q</math> is an ellipse if and only if <math> \det A_{33} > 0 </math>.
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 <math>x^2</math> , <math>xy</math> and <math>y^2</math>:
- If <math>A=C</math> and <math>B=0</math>, then <math>Q</math> is a circle.
Moreover, in the case of a non-degenerate ellipse (with <math>\det A_{33} > 0 </math> and <math>\det A_Q \ne 0</math>), we have a real ellipse if <math>(A + C)\det A_Q < 0</math> but an imaginary ellipse if <math>(A + C)\det A_Q > 0</math>. An example of the latter is <math>x^2 + y^2 + 10 = 0 </math>, which has no real-valued solutions.
If the conic section is degenerate (<math>\det A_Q = 0</math>), <math>\det A_{33}</math> still allows us to distinguish its form:
- Two intersecting lines (a hyperbola degenerated to its two asymptotes) if and only if <math>\det A_{33} < 0</math>.
- Two parallel straight lines (a degenerate parabola) if and only if <math>\det A_{33} = 0</math>. These lines are distinct and real if <math>D^2+E^2 > 4(A+C)F</math>, coincident if <math>D^2+E^2 = 4(A+C)F</math>, and non-existent in the real plane if <math>D^2+E^2 < 4(A+C)F</math>.
- A single point (a degenerate ellipse) if and only if <math>\det A_{33} > 0</math>.
The case of coincident lines occurs if and only if the rank of the 3 × 3 matrix <math>A_Q</math> is 1; in all other degenerate cases its rank is 2.
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 vanishes—that is,
<math display="block">
\nabla Q = \left[ \frac{\partial Q}{\partial x} , \frac{\partial Q}{\partial y} \right] = [0,0].
</math>
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 , using , gives rise to
<math display="block">\begin{pmatrix} x^* + x_0 & y ^* + y_0 \end{pmatrix} \begin{pmatrix}A & B/2\\B/2 & C \end{pmatrix} \begin{pmatrix} x^* + x_0\\y^* + y_0 \end{pmatrix} + \left(\begin{matrix}D & E \end{matrix}\right) \left(\begin{matrix}x^* + x_0 \\ y^* + y_0\end{matrix}\right) +F= 0. </math>
The condition for to be the conic's center is that the coefficients of the linear and terms, when this equation is multiplied out, are zero. This condition produces the coordinates of the center:
<math display="block">
\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}.</math>
This calculation can also be accomplished by taking the first two rows of the associated
matrix , multiplying each by and setting both inner products equal to 0, obtaining the following system:
<math display="block">\begin{align}
Ax + (B/2)y + D/2 &= 0, \\
(B/2)x + Cy + E/2 &= 0.
\end{align}</math>
This yields the above center point.
In the case of a parabola, that is, when , 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 <math>Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0</math> can be rewritten in centered matrix form as
<math display="block">\begin{pmatrix} x-x_c & y-y_c \end{pmatrix} \begin{pmatrix} A & B/2 \\ B/2 & C \end{pmatrix} \begin{pmatrix} x-x_c \\ y-y_c \end{pmatrix} = K,</math>
where
<math display="block">K = -\frac{\det (A_Q)}{AC-(B/2)^2} = -\frac{\det(A_Q)}{\det(A_{33})}.</math>
Then for the ellipse case of , the ellipse is real if the sign of equals the sign of (that is, the sign of each of and ), imaginary if they have opposite signs, and a degenerate point ellipse if . In the hyperbola case of , the hyperbola is degenerate if and only if .
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 -coordinate system with origin is moved to the -coordinate system with origin .
thumb|300px|Translating and rotating coordinates
The translation is by the vector <math>\mathbf{t} = \begin{pmatrix} x_c \\ y_c \end{pmatrix}.</math>
The rotation by angle can be carried out by diagonalizing the matrix .
Thus, if <math>\lambda_1</math> and <math>\lambda_2</math> are the eigenvalues of the matrix A<sub>33</sub>, the centered equation can be rewritten in new variables and as
<math display="block">\lambda_1 x'^2 + \lambda_2 y'^2 = - \frac{\det A_Q}{\det A_{33.</math>
Dividing by <math>K = -\frac{\det A_Q}{\det A_{33</math> we obtain a standard canonical form.
For example, for an ellipse this form is
<math display="block">\frac
