Algebra equation solver
Polynomial & Quadratic Equation Solver
Solve linear, quadratic and polynomial equations from their coefficients. See real or complex roots, the quadratic discriminant, factored form where available, vertex information, numerical approximations and a step-by-step solution.
Enter an equation
Choose an equation type and enter its coefficients.
Define → Validate → Normalize → Calculate → Check → Present. Roots are verified by substitution into the normalized polynomial before display.
Formula & methodology
How Linear, Quadratic & Polynomial Equations Are Solved
The solver first rewrites the equation in standard polynomial form, identifies its coefficients and degree, chooses an appropriate solving method, calculates the roots, and checks those roots against the normalized equation before presenting the result.
Governing Equations
Every supported equation is normalized so that all terms appear on the left and zero appears on the right. The degree of the resulting polynomial determines the primary solving method.
Linear equation
This applies when a ≠ 0. If a = 0, the expression is no longer a linear equation and reduces to a constant identity or contradiction.
Quadratic equation
The discriminant Δ determines whether the quadratic has two distinct real roots, one repeated real root, or two complex conjugate roots.
Quadratic vertex and axis
The vertex is relevant only for a genuine quadratic where a ≠ 0.
General polynomial
A root r satisfies P(r) = 0. For degree 3–5 equations in this calculator, roots are obtained numerically when a simple algebraic factorization is not available.
Factored form
When the roots are known, a polynomial can be represented as a product of factors. For real integer roots this often gives a particularly simple exact factorization.
Root verification
For an exact root the residual is zero. For a numerically approximated root, a very small residual indicates that the displayed solution satisfies the polynomial within numerical precision.
Variable Definitions
| Symbol | Meaning | Units |
|---|---|---|
x |
Unknown variable being solved for | Normally dimensionless in abstract algebra |
a, b, c |
Linear or quadratic coefficients | Depend on the modeled equation |
aₙ ... a₀ |
General polynomial coefficients | Depend on the modeled equation |
n |
Polynomial degree | Dimensionless integer |
Δ |
Quadratic discriminant | Derived from coefficient units |
r |
A root satisfying P(r) = 0 | Same conceptual unit as x, if applicable |
xᵥ, yᵥ |
Quadratic vertex coordinates | Depend on the function being modeled |
i |
Imaginary unit where i² = −1 | Dimensionless |
|P(r)| |
Numerical verification residual | Same units as P(x), if physical units exist |
Pure algebra equations are normally treated as dimensionless. If the equation represents a physical or financial model, coefficients must be dimensionally consistent before the equation is solved.
Calculation Methodology
The solver follows the same calculation pipeline for each equation type, with the solving method changing according to the normalized polynomial degree.
Read the equation and intended equation type.
Reject missing, nonfinite or unsupported inputs.
Move every term to one side and combine like terms.
Select linear, quadratic or numerical polynomial solving.
Substitute the roots back into the normalized equation.
Format exact or approximate roots for display.
Equation Normalization
Normalization converts different equation layouts into a common polynomial form before any solving formula is applied.
Move all terms to one side
Example:
2x + 4 = 10
becomes
2x − 6 = 0.
Combine like terms
Example:
x² + 2x + 3x − 6 = 0
becomes
x² + 5x − 6 = 0.
Insert missing coefficients
Example:
x³ − 4x + 2
is interpreted as
1x³ + 0x² − 4x + 2.
Reduce the effective degree
If the leading coefficient is zero, the equation is treated
according to its actual degree. For example,
0x² + 2x − 8 = 0
is linear.
Manual Solving Methods
How to solve a linear equation manually
- Rewrite the equation as
ax + b = 0. - Move the constant term:
ax = −b. - Divide both sides by
a. - The result is
x = −b ÷ a. - Substitute the result into the original equation.
How to solve a quadratic with the quadratic formula
-
Rewrite the equation as
ax² + bx + c = 0. -
Identify
a,bandc. -
Calculate the discriminant:
Δ = b² − 4ac. -
Substitute the values into
x = (−b ± √Δ) ÷ 2a. - Evaluate the plus and minus branches separately.
- Substitute each root back into the quadratic.
How to solve a quadratic by factoring
- Normalize the quadratic to equal zero.
- Find factors whose product reproduces the quadratic.
-
Write the equation as a product, such as
(x − 2)(x − 3) = 0. -
Apply the zero-product property:
x − 2 = 0orx − 3 = 0. - Solve each factor for x.
How higher-degree polynomial roots are obtained
- Normalize the expression into descending powers of x.
- Determine the effective polynomial degree.
- Use exact factors when a simple factorization is available.
- Otherwise initialize numerical root estimates.
- Iteratively refine the roots using the polynomial values and the relationship among the root estimates.
- Stop when changes fall below the convergence tolerance.
-
Evaluate
|P(r)|for each calculated root as a verification check.
Calculation Breakdowns
These examples follow the same sequence shown by the calculator: inputs, normalized equation, formula or method, substitution, intermediate calculation, raw result, display result and verification.
Quadratic example: x² − 5x + 6 = 0
Default quadratic used in the calculator above.
x² − 5x + 6 = 0
x = (−b ± √(b² − 4ac)) ÷ 2a
Δ = (−5)² − 4(1)(6) = 25 − 24 = 1
x = (5 ± √1) ÷ 2
x₁ = (5 − 1) ÷ 2x₂ = (5 + 1) ÷ 2
x₁ = 2,
x₂ = 3
2² − 5(2) + 6 = 03² − 5(3) + 6 = 0
(x − 2)(x − 3)Vertex:
(2.5, −0.25)Axis:
x = 2.5
Linear example: 2x − 8 = 0
Isolation of x using inverse operations.
2x − 8 = 0
x = −b ÷ a
x = −(−8) ÷ 2
x = 8 ÷ 2
x = 4
2(4) − 8 = 0
Polynomial example: x³ − 6x² + 11x − 6 = 0
Cubic example using roots that also admit exact factors.
1, −6, 11, −6
x³ − 6x² + 11x − 6 = 0
1,
2 and
3.
(x − 1)(x − 2)(x − 3).
P(1) = 0,
P(2) = 0,
P(3) = 0.
Exact Results, Numerical Results & Precision
Exact values
Integer roots, simple rational results and algebraically exact quadratic roots should remain exact when their form is available rather than being unnecessarily rounded.
Irrational roots
A quadratic root such as
(−b + √Δ) ÷ 2a
may have an exact radical form while also having a decimal
approximation for practical display.
Complex roots
When Δ < 0, quadratic roots are represented using
i, where
i² = −1. Numerical approximations preserve
both the real and imaginary components.
Higher-degree numerical roots
For degree 3–5 polynomial solving, the calculator maintains the available numerical precision internally and formats the result only after convergence and residual checking.
Intermediate calculations should not be repeatedly rounded. The solver calculates with the available internal precision, verifies the resulting roots, and only then shortens numerical values for display.
Validation & Boundary Cases
Missing or nonnumeric coefficients
Required coefficient fields must contain finite numerical values before calculation can proceed.
Zero leading coefficient
A zero leading coefficient reduces the effective degree. A stated quadratic with a = 0 is solved as a linear or constant equation instead.
Constant identity
If normalization produces 0 = 0, every real x
satisfies the equation, so there are infinitely many
solutions.
Constant contradiction
If normalization produces a nonzero constant equal to zero,
such as 5 = 0, the equation has no solution.
Unsupported direct-entry terms
The direct-entry parser is intended for polynomial terms in x and does not treat functions such as sin(x), log(x) or fractional powers as polynomial input.
Numerical convergence
Higher-degree roots are checked using their residuals. Numerical solutions should not be presented as exact merely because their displayed decimals appear simple.
Worked examples & analysis
Equation Solver Examples & Root Analysis
Compare linear, quadratic and polynomial equations and see how their coefficients affect the roots. For quadratics, the discriminant provides a direct way to determine whether the solutions are distinct real roots, a repeated real root, or a complex conjugate pair.
Worked Example: When Does a Projectile Reach the Ground?
A simplified height model can produce a quadratic equation. Suppose the height of an object after t seconds is modeled by h(t) = −16t² + 64t + 80 feet. Setting h(t) = 0 finds the times at which the mathematical trajectory reaches ground level.
−16t² + 64t + 80 = 0
The equation is already in standard quadratic form. The coefficients are a = −16, b = 64 and c = 80.
- Identify the coefficients. a = −16, b = 64, c = 80
- Calculate the discriminant. Δ = 64² − 4(−16)(80) = 9,216
- Apply the quadratic formula. t = (−64 ± √9,216) ÷ (−32)
- Simplify √9,216. √9,216 = 96
- Evaluate both branches. t = (−64 + 96) ÷ −32 = −1 t = (−64 − 96) ÷ −32 = 5
- Interpret the solutions. Mathematically, the roots are t = −1 and t = 5. If the model begins at t = 0, the physically relevant future ground-level time is 5 seconds.
Equation Calculation Examples
These examples show how the selected method changes with the equation degree and, for quadratics, with the value of the discriminant.
| Equation | Type | Key calculation | Solutions | Interpretation |
|---|---|---|---|---|
2x − 8 = 0 |
Linear | x = 8 ÷ 2 |
x = 4 | One real solution |
x² − 5x + 6 = 0 |
Quadratic | Δ = 1 |
x = 2, 3 | Two distinct real roots |
x² − 6x + 9 = 0 |
Quadratic | Δ = 0 |
x = 3 | One repeated real root |
x² + 4x + 13 = 0 |
Quadratic | Δ = −36 |
x = −2 ± 3i | Two complex conjugate roots |
x² − 2 = 0 |
Quadratic | x = ±√2 |
x ≈ −1.414214, 1.414214 | Two irrational real roots |
x³ − 6x² + 11x − 6 = 0 |
Cubic |
(x − 1)(x − 2)(x − 3)
|
x = 1, 2, 3 | Three real roots |
x³ − 1 = 0 |
Cubic | Numerical roots / factorization | x = 1, −0.5 ± 0.866025i | One real and two complex roots |
How the Discriminant Changes the Solutions
Three quadratics can look very similar while having different root behavior. The sign of Δ = b² − 4ac provides the key distinction.
x² − 5x + 6 = 0
Δ = 1
Roots: x = 2 and x = 3
A positive discriminant produces two distinct real roots. The parabola crosses the x-axis at two different points.
x² − 6x + 9 = 0
Δ = 0
Root: x = 3
A zero discriminant produces one repeated real root. The parabola touches the x-axis at its vertex.
x² − 5x + 7 = 0
Δ = −3
Roots: x = (5 ± i√3) ÷ 2
A negative discriminant produces two complex conjugate roots, so the parabola has no real x-intercepts.
With a = 1 and b = −5 fixed, changing c from 6 to 6.25 makes Δ fall from 1 to 0. Increasing c beyond 6.25 makes Δ negative, changing the roots from real to complex.
Interactive Quadratic Root Explorer
Change the coefficients to see how the discriminant, roots, vertex and axis of symmetry respond. This isolates the most important structural information about a quadratic without repeating the full equation solver.
Quadratic coefficients
Enter values for ax² + bx + c = 0. The coefficient a must be nonzero.
Root analysis
Two distinct real roots because Δ > 0.
Δ = 1, so this quadratic has two distinct real roots and crosses the x-axis twice.
Understanding the calculation
How to Interpret Equation Roots & Polynomial Results
A root is a value that makes the normalized equation equal zero, but the meaning of that root depends on the equation, its degree, and the context in which the algebra is being used. This section explains how to read the solver output and where additional interpretation is required.
Understanding the Result
A root makes the polynomial equal zero
If x = r is reported as a root, then
substituting r into the normalized polynomial gives
P(r) = 0, or approximately zero for a numerical
root.
In an applied model, a root may represent a time, position, break-even point, threshold, intercept or another domain-specific value.
Two real quadratic roots
When Δ > 0, the quadratic has two distinct
real roots.
The corresponding parabola crosses the x-axis at two different points, although one or both roots may be outside the meaningful domain of an applied problem.
One repeated quadratic root
When Δ = 0, both quadratic-formula branches
produce the same root.
Graphically, the parabola touches the x-axis at its vertex instead of crossing it.
Complex roots
A complex root contains an imaginary component using
i, where i² = −1.
For a real quadratic function, complex roots indicate that there are no real x-intercepts.
Factored form identifies roots directly
If
P(x) = a(x − r₁)(x − r₂),
then the zeros occur when one of the factors equals zero.
Factoring can make the algebraic structure easier to see, but not every polynomial has a simple factorization over the integers or real numbers.
Numerical roots are approximations
A higher-degree root shown as a decimal has been numerically approximated and checked using the polynomial residual.
This may meanA displayed value such as 1.732051 should not automatically be interpreted as exact simply because it appears stable to several decimal places.
Assumptions
The calculator operates under several mathematical and computational assumptions.
Coefficients must be numerical values rather than undefined, infinite or nonnumeric expressions.
Direct equation entry is interpreted as a polynomial in one variable, x.
Supported polynomial exponents are nonnegative integers, rather than fractional or variable exponents.
Moving all terms to one side and combining like terms does not change the solution set.
If the highest stated coefficient is zero, the effective polynomial degree is reduced.
Internal numerical work can retain more precision than the rounded decimal shown to the user.
Limitations
What this solver does not model
- It does not decide whether a mathematical root is physically or financially meaningful.
-
It does not impose domain restrictions such as
x ≥ 0unless the user interprets them. - It does not solve trigonometric, logarithmic, exponential or differential equations.
- It does not infer units from coefficients.
- It does not prove that an applied model itself is valid.
Computational boundaries
- Request 1 supports polynomial equations up to degree 5.
- Degree 3–5 roots may require numerical approximation.
- Floating-point arithmetic can introduce tiny residual errors.
- Very large or very small coefficients may amplify numerical conditioning problems.
- Repeated or closely spaced roots can be more sensitive to numerical precision.
Common Algebra Errors
In x² − 5x + 6 = 0, the coefficient is
b = −5, not 5. Sign errors propagate directly
into the discriminant and quadratic formula.
The quadratic formula applies to
ax² + bx + c = 0. An equation such as
x² + 3x = 10 should first become
x² + 3x − 10 = 0.
When Δ > 0, both
−b + √Δ and
−b − √Δ must be evaluated.
The entire numerator is divided by 2a. The
formula is not
−b ± √Δ ÷ 2a.
A negative discriminant means no real roots, but there are still two complex conjugate roots.
Numerical polynomial roots are generally approximations. Their residuals should be checked rather than treating the displayed decimal as an exact algebraic form.
If a = 0 in
ax² + bx + c = 0, the equation is not truly
quadratic and should be solved as a lower-degree equation.
A negative or complex root should not be discarded merely because it seems inconvenient. It should only be excluded when the problem’s domain or interpretation requires it.
Quadratic Discriminant Reference
| Discriminant | Root count | Root type | Graph interpretation | Example |
|---|---|---|---|---|
Δ > 0 |
2 | Distinct real roots | Parabola crosses the x-axis twice | x² − 5x + 6 = 0 |
Δ = 0 |
1 repeated | Repeated real root | Parabola touches the x-axis once | x² − 6x + 9 = 0 |
Δ < 0 |
2 | Complex conjugate roots | No real x-intercepts | x² + 4x + 13 = 0 |
Solving Method Reference
| Equation structure | Typical method | Core relationship | Result type |
|---|---|---|---|
| Linear | Isolate x | x = −b ÷ a |
One real root, identity or contradiction |
| Factorable quadratic | Factoring | (x − r₁)(x − r₂) = 0 |
Exact roots where factors are exact |
| General quadratic | Quadratic formula |
x = (−b ± √(b² − 4ac)) ÷ 2a
|
Real or complex roots |
| Degree 3–5 polynomial | Numerical root solving | P(r) ≈ 0 |
Numerical real and/or complex roots |
Root and Factor Reference
| Statement | Equivalent interpretation |
|---|---|
P(r) = 0 |
r is a root or zero of P(x) |
x = r |
A solution of the equation P(x) = 0 |
(x − r) is a factor |
r is a root of the polynomial |
|P(r)| ≈ 0 |
r is a numerically verified approximate root |
P(x) = a∏(x − rᵢ)
|
The polynomial is expressed through its roots, counting multiplicity |
Why the Quadratic Formula Matters
Quadratic equations have been studied for centuries because they arise naturally in geometry, motion, optimization and algebra. Methods equivalent to completing the square preceded the compact symbolic formula used today.
The modern quadratic formula is valuable because it solves every genuine quadratic equation once the coefficients a, b and c have been identified. Factoring may be faster for simple examples, but the quadratic formula does not depend on spotting convenient integer factors.