# Fastest way to determine if a conic section is an ellipse?

Given an arbitrary conic section in the form $$Ax^2 + Bxy + Cy^2 + Dx + Ey +F=0$$ (Where the coefficients are real valued) is there a simple test which can determine whether or not a particular conic is an ellipse? I know that if a conic section is an ellipse, then $A$ and $C$ will have the same sign, however I am not sure if this is a sufficient condition as well.

Edit: Forgot to include the "$...+F=0$".

• – lab bhattacharjee Feb 5 '18 at 5:31
• @lab bhattacharjee from the link it says to evaluate $B^2 - 4AC$ - do I need to rotate the conic section first though? – Jbag1212 Feb 5 '18 at 5:37
• Just check if $B^2-4AC<0$ – lab bhattacharjee Feb 5 '18 at 5:52
• No, the quantity $B^2-4AC$ is invariant under rotations. You might want to check this: it’s messy, but very satisfying to come out with the result. – Lubin Feb 5 '18 at 5:52
• Your ellipse necessarily passes through the origin? – Bernard Feb 5 '18 at 9:15

Here is the answer for the normalised equation of a non-degenerate conic $$Ax^2+2Bxy+Cy^2+2Dx+2Ey+T=0.$$
Consider the matrix $$M=\begin{bmatrix} A & B & D \\ B & C &E \\ D &E & F \end{bmatrix}$$ and the matrix of the quadratic part of the equation $$Q=\begin{bmatrix} A & B \\ B & C \end{bmatrix}.$$ The conic is non-degenerate if and only if $\det M\ne 0$. Further, the conic is an ellipse if and only if:
1. The quadratic part of the equation (associated to the matrix $Q$) has signature $(2,0)$;
2. The quadratic form on $\mathbf R^3$ associated to $M$ has signature $(2,1)$.
• Is there an advantage to using this method over checking $B^2 - 4AC$? Does checking $B^2 - 4AC$ only work if it "passes through the origin"? – Jbag1212 Feb 5 '18 at 21:46
• The sign $B^2-4AC$ tests the possibility of points at infinity, i.e. the possibility of a hyperbola (2 points at infinity) or a parabola (az double ipoint at infinity. It's equivalent to the signature of $A$, but there may be degenerate cases which are handled by the study of the matrix $M$. In the ellipse case, the curve may be empty or reduced to a point. – Bernard Feb 5 '18 at 22:01
If $I_2=B^2-4AC$ is negative then it is an ellipse whether or not (RHS being zero ) it passes through origin as special case.