Conic section calculator
Enter the six coefficients of Ax² + Bxy + Cy² + Dx + Ey + F = 0 and find out which conic it is.
Move every term to the left so the equation ends in = 0, and type 0 for a missing term. The default is 8x² − 12xy + 17y² − 20 = 0.
How can I tell which conic an equation is?
Compute the discriminant B² − 4AC of Ax² + Bxy + Cy² + Dx + Ey + F = 0. If it is negative the graph is an ellipse (a circle when B = 0 and A = C); if it is zero, a parabola; if it is positive, a hyperbola (OpenStax Algebra and Trigonometry 2e, section 12.4). For 8x² − 12xy + 17y² = 20 the discriminant is (−12)² − 4(8)(17) = −400, so it is an ellipse. With no xy term you can also read the type from A and C: opposite signs mean a hyperbola, one of them 0 a parabola, equal signs and values a circle, same sign but different values an ellipse.
What does the xy term do?
An xy term rotates the conic about the origin so that its axes no longer line up with the x- and y-axes. The discriminant B² − 4AC does not change under a rotation, which is why it identifies the type even when the curve is tilted (OpenStax, section 12.4). To see the shape you rotate the axes by an angle θ chosen to remove the term.
How is the rotation angle found?
The angle θ satisfies cot 2θ = (A − C) ÷ B, taken with 2θ between 0° and 180°, so θ is between 0° and 90°. Then x = x′ cos θ − y′ sin θ and y = x′ sin θ + y′ cos θ. For 8x² − 12xy + 17y² = 20, cot 2θ = −9 ÷ −12 = 3/4, so θ = 26.57° (sin θ = 1/√5, cos θ = 2/√5) and the equation becomes 5x′² + 20y′² = 20, that is x′²/4 + y′² = 1 (OpenStax, Example 3).
Why is x′ not always the long axis?
The angle is chosen only to remove the xy term, not to put the long axis on x′. For x² + 12xy − 4y² = 30 (OpenStax Example 4), θ = 33.69° and the rotated equation is 5x′² − 8y′² = 30, a hyperbola whose transverse axis lies along x′. For other equations the long axis can lie along y′; the calculator reports the major-axis direction from the original x-axis so there is no guesswork.
What are degenerate conics?
Sometimes the equation has the form of a conic but the graph collapses. x² − y² = 0 is not a hyperbola but the two lines y = x and y = −x, which cross at the center (0, 0). x² + y² = 0 is a single point, x² + y² + 1 = 0 has no real points at all, and x² − 1 = 0 is two parallel lines. The calculator tests for these cases first and says what the graph really is.
What is xy = 1?
It is a hyperbola whose asymptotes are the coordinate axes. Here A = C = 0 and B = 1, so cot 2θ = 0, 2θ = 90° and θ = 45°. In the rotated system the equation is x′²/2 − y′²/2 = 1, a rectangular hyperbola with a = b = 1.4142 and eccentricity √2 ≈ 1.4142. The same pattern holds for every equation xy = k.
Which numbers can I type?
Move every term to one side so that the equation reads … = 0, then enter the six coefficients, using 0 for a missing term. Decimals and negative numbers are fine. A constant on the right, as in 8x² − 12xy + 17y² = 20, becomes F = −20.
The method in four steps
1. Read A, B, C, D, E, F from Ax² + Bxy + Cy² + Dx + Ey + F = 0. 2. Compute B² − 4AC to get the type. 3. If B ≠ 0, rotate the axes through θ with cot 2θ = (A − C) ÷ B; the new coefficients are A′ = A cos²θ + B sinθ cosθ + C sin²θ and C′ = A sin²θ − B sinθ cosθ + C cos²θ, with D′ = D cosθ + E sinθ and E′ = −D sinθ + E cosθ. 4. Complete the square in x′ and y′ to reach the standard form and read off the center, axes and foci, then convert those points back to the original x, y system. Two invariants make a good check: A′ + C′ = A + C and A′C′ = AC − B²/4. They are our own check (they follow from the rotation formulas), and the automated tests confirm them on random equations.
Worked examples
Type by A and C alone (OpenStax Example 1): 4x² − 9y² + 36x + 36y − 125 = 0 is a hyperbola, 9y² + 16x + 36y − 10 = 0 is a parabola, 3x² + 3y² − 2x − 6y − 4 = 0 is a circle with center (0.333, 1) and radius 1.563, and −25x² − 4y² + 100x + 16y + 20 = 0 is an ellipse. With a tilt: 8x² − 12xy + 17y² − 20 = 0 gives θ = 26.57°, semi-axes 2 and 1, foci 1.7321 from the center and eccentricity 0.866. A tilted parabola: x² − 2xy + y² − 4x − 4y = 0 has B² − 4AC = 0, a vertex at (0, 0) and a focus at (0.5, 0.5).
Common mistakes
Using B/2 instead of B (the formulas above use B as written in the equation). Forgetting to move a right-hand constant to the left, which flips the sign of F. Believing a zero discriminant always means a parabola: it can also be a pair of parallel lines or a single line, which the calculator separates for you. Reading x′ and y′ as if they were x and y: the standard form belongs to the rotated axes, so the center and foci shown in the table are converted back to the original coordinates. Finally, rounding the angle early; the angle is only a stepping stone, and an error in it spreads into every coefficient.
Limits
The calculator treats one equation of second degree in x and y. Higher-degree curves, equations with x³ or xy², and conics given in polar form are outside its scope; for the polar form of a conic use the polar coordinates calculator and the eccentricity. Real graphs only: an “imaginary ellipse” such as x² + y² + 1 = 0 is reported as having no points. Tolerance: the discriminant and the degenerate tests use a tiny relative tolerance to absorb rounding noise, so an equation whose discriminant is zero only up to floating-point rounding is reported as a parabola.
Sources: OpenStax, Algebra and Trigonometry 2e, section 12.4 “Rotation of Axes” (Examples 1, 3, 4 and 5 are automated tests of this calculator). Related: ellipse calculator, hyperbola calculator, parabola calculator, circle equation calculator, polar coordinates calculator and asymptote calculator.