Linear and quadratic equation solver
Solve a linear or quadratic equation from exact numeric coefficients, distinguishing real and complex roots, identities and equations with no solution.
How to use
Choose the degree, then enter a, b and c where shown. Calculate and read the effective degree, solution status and mathematical report. sqrt denotes a square root and i is the imaginary unit with i²=−1. Use preview pages when needed, or copy the complete report or download TXT.
For x²−5x+6=0, enter a=1, b=−5 and c=6; the roots are 2 and 3. The equation x²+1=0 gives −i and i, while x²−2=0 gives exact symbolic roots. In linear mode, 2x−6=0 gives x=3.
Support & limits
The engine converts decimal coefficients to exact fractions and displays an equivalent equation with normalized integer coefficients. Its reported discriminant belongs to that equivalent equation and may differ numerically from the original coefficients’ discriminant. Irrational roots use radical expressions that may remain unsimplified, without decimal approximation. A zero leading coefficient reduces the effective degree rather than causing an error. Hidden c is excluded in linear mode; its value and rejection state remain on this page when quadratic mode is restored. The tool does not evaluate code or free-form equation text.
Common questions
What happens when a is zero or every coefficient is zero?
For a quadratic equation, a=0 reduces it to bx+c=0. For a linear equation, a=0 with nonzero b means no solution; with b=0 it is an identity. A quadratic with all coefficients zero is also an identity. These cases are explicit, without inventing roots by dividing by zero.
Related tools
Fraction calculator
Add, subtract, multiply or divide fractions with exact integer arithmetic, an intermediate fraction and its greatest common divisor.
Linear system solver
Solve a square linear system using exact fractions, with ranks, reduced row-echelon form and a residual, distinguishing unique solutions, infinitely many solutions and inconsistency.
Matrix calculator
Add, subtract or multiply matrices, or calculate a transpose, determinant, inverse or rank using exact fractions within bounded dimensions.