Algebra Calculator: Solve Equations Step by Step

Quadratic Algebra Calculator

Solve ax² + bx + c = 0 over the real numbers and inspect the discriminant, roots, axis of symmetry and vertex. The page reports when the roots are complex instead of inventing real values.

Enter the quadratic coefficients

Real root resultx = 2 or x = 3
Discriminant1
Axis of symmetryx = 2.5
Vertex(2.5, −0.25)

Substitute reported roots into the original equation and apply the real-world domain before accepting a solution.

Equation form and coefficient roles

A quadratic equation can be written as ax² + bx + c = 0 with a not equal to zero. The a coefficient controls the curvature and opening direction of the corresponding parabola. The b coefficient shifts the axis of symmetry, and c is the y-intercept because substituting x = 0 leaves c. Signs matter: enter −5 for a negative b rather than typing a subtraction elsewhere.

The calculator assumes the expression has already been rearranged so that the right-hand side is zero. If a problem states 2x² + 3 = 7x, move every term to one side first: 2x² − 7x + 3 = 0. Combining like terms before entry prevents a correct formula from being applied to the wrong coefficients. If a becomes zero after simplification, the equation is linear and should be solved with a linear method.

What the discriminant reveals

The discriminant is Δ = b² − 4ac. A positive discriminant produces two distinct real roots. A zero discriminant produces one repeated real root at the vertex. A negative discriminant produces a complex-conjugate pair and no x-axis crossings on a real graph. The discriminant therefore gives structural information before the square root and division are completed.

When coefficients are decimal approximations, a discriminant extremely close to zero needs care. Measurement or rounding uncertainty can move it from slightly positive to slightly negative. The script treats a very small magnitude as zero to avoid presenting floating-point noise as two meaningful roots. For an exact classroom problem, retain fractions and radicals by hand where the assessment expects an exact form.

Quadratic formula and stable arithmetic

The familiar roots are x = (−b ± √Δ)/(2a). Direct use can lose precision when b and √Δ are nearly equal and their subtraction cancels leading digits. For two real roots, the script uses a numerically stable alternative for one root and obtains the other from the product c/a. This produces the same mathematical solutions while reducing avoidable floating-point loss in some extreme coefficient combinations.

A result should still be checked by substitution. Put each root into ax² + bx + c and confirm that the value is zero or very close to zero at the displayed precision. Vieta’s relationships offer another check: the sum of roots should be −b/a and their product should be c/a. These checks can expose a coefficient sign error immediately.

Axis and vertex

The axis of symmetry is x = −b/(2a). The vertex lies on that vertical line, so its y-coordinate is found by substituting the axis value into the quadratic. If a is positive, the parabola opens upward and the vertex is a minimum. If a is negative, it opens downward and the vertex is a maximum. This geometric information remains meaningful even when the equation has no real roots.

The roots, when real, are equally spaced around the axis. For the default equation x² − 5x + 6 = 0, the roots 2 and 3 average to 2.5, which matches the reported axis. The vertex value is −0.25, so an upward-opening graph dips just below the x-axis and crosses it twice. Connecting the numbers to the graph is often more useful than treating them as isolated outputs.

Worked factorisation comparison

The default quadratic factors as (x − 2)(x − 3). Setting each factor equal to zero gives x = 2 or x = 3. Expanding the factors returns x² − 5x + 6, confirming the coefficients. Factorisation is fast when integer factors are apparent, while the quadratic formula works even when the roots are irrational or complex.

Consider x² + 2x + 5 = 0. Its discriminant is 4 − 20 = −16, so there are no real roots. The complex roots are −1 ± 2i. On the real graph, the upward-opening parabola has vertex (−1, 4) and never reaches the x-axis. The calculator reports both the absence of real roots and the complex pair so the conclusion is explicit.

Applications and model limits

Quadratics appear in projectile models, optimisation, area problems, revenue models and intersections. Solving the equation is only part of an application. A negative time, length or production quantity may be algebraically valid but impossible in context. Domain restrictions and units decide which roots can answer the original question.

A fitted quadratic also has a useful range. Extrapolating far beyond observed data can produce unrealistic growth or decline. Physical projectile equations may omit air resistance, and business revenue curves may not hold after capacity or market conditions change. Record the modelling assumptions beside the selected root rather than reporting every algebraic solution as equally usable.

Precision, exact forms and communication

The page displays decimal approximations. If the discriminant is not a perfect square, an exact answer such as (−b ± √Δ)/(2a) may be required. Decimal rounding should match the purpose: a mathematical proof may keep the radical, a measured length may use justified significant figures, and a financial quantity may use cents only after the underlying model is accepted.

Write the original equation, rearranged standard form, coefficients, discriminant and chosen solution. That audit trail is short and makes errors easier to find. The calculator is a check on arithmetic and graph features; it is not a replacement for showing reasoning where a school, university or professional task requires it.

Scaling an equation

Multiplying every coefficient by the same non-zero number does not change the roots because it multiplies the entire left-hand side. For example, 2x² − 10x + 12 = 0 has the same roots as x² − 5x + 6 = 0. Dividing by a common factor can make hand calculation easier and reduce large intermediate numbers. Do not divide only selected terms, and do not divide by an expression that might be zero without separately considering that case.

The vertex y-coordinate does scale when the whole polynomial is multiplied, even though the root locations and axis remain the same. This distinction matters when the graph’s height or an optimisation value, rather than only the zeros, is the quantity of interest.

Questions that affect this result

What happens if a is zero?

The equation is no longer quadratic, so the quadratic formula would divide by zero. Rearrange the remaining bx + c = 0 and solve it as a linear equation if b is non-zero.

Why are there no real roots when the discriminant is negative?

A negative real number has no real square root. The solutions then contain the imaginary unit i and the real parabola does not cross the x-axis.

Is the vertex always between the roots?

Its x-coordinate is midway between two real roots. When roots are complex there are no real x-intercepts, but the same axis and vertex formulas still describe the real parabola.

Why does my textbook leave a square root in the answer?

An exact radical preserves the precise algebraic value. The page gives a decimal for practical checking, but formal work may require the unsimplified or simplified surd.

Which root should I use in an application?

Use the root that satisfies the original domain, units and physical or economic constraints. Substitute it back into the model and explain why any other algebraic root is excluded.

References

Scroll to Top