Skip to content

Formulas that finally make sense

Quadratic Formula: Roots, Discriminant and Worked Examples

The quadratic formula x = (-b ± √(b²-4ac))/2a explained: discriminant, nature of roots, derivation, sum and product of roots, worked examples and a solver.

The quadratic formula gives both roots of any equation ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \neq 0: x=−b±b2−4ac2ax = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}. You read off a, b and c, put them in, and the formula hands you the answer even when the equation will not factorise.

This page explains every letter, shows where the formula comes from, and walks through examples with two real roots, equal roots and complex roots. You will also learn the discriminant test, the sum and product of roots, how to form an equation from its roots, word problems and the graph. Type your own a, b and c into the solver below to check any answer step by step. For the rest of the syllabus, open the full list of maths formulas.

Key formulas

  • Quadratic formula

    x=−b±b2−4ac2ax = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}

    for ax² + bx + c = 0 with a ≠ 0

  • Standard form (quadratic equation format)

    ax2+bx+c=0,a≠0ax^2 + bx + c = 0,\quad a \neq 0
  • Discriminant formula

    D=b2−4acD = b^2 - 4ac

    D > 0: two real roots, D = 0: equal roots, D < 0: no real roots

  • Sum of roots

    α+β=−ba\alpha + \beta = -\dfrac{b}{a}
  • Product of roots

    αβ=ca\alpha\beta = \dfrac{c}{a}
  • Equation from its roots

    x2−(α+β)x+αβ=0x^2 - (\alpha + \beta)x + \alpha\beta = 0
  • Vertex of the parabola

    (−b2a,  −D4a)\left(-\dfrac{b}{2a},\; -\dfrac{D}{4a}\right)

    axis of symmetry is the line x = -b/2a

  • Value of i

    i=−1,i2=−1i = \sqrt{-1},\quad i^2 = -1

    used when D < 0

What is a quadratic equation and its standard form

A quadratic equation is a polynomial equation in one variable whose highest power is 2. Its standard form, also called the quadratic equation format, is

ax2+bx+c=0,a≠0 ax^2 + bx + c = 0, \qquad a \neq 0

Here a is the coefficient of x2x^2, b is the coefficient of x and c is the constant term. The condition a≠0a \neq 0 matters: if a were zero, the x2x^2 term would vanish and you would be left with a linear equation.

Quadratic trinomial: definition and examples

A quadratic trinomial is a degree 2 polynomial with all three terms present, so a, b and c are all non-zero. A quadratic trinomial in standard form looks like ax2+bx+cax^2 + bx + c. A few quadratic trinomial examples: 2x2−7x+32x^2 - 7x + 3, x2+4x−1x^2 + 4x - 1 and 9x2−12x+49x^2 - 12x + 4. By contrast, x2−9x^2 - 9 is quadratic but only a binomial, and x3+x+1x^3 + x + 1 is a trinomial but not quadratic.

Is a trinomial a quadratic equation? Not by itself. A trinomial is an expression; it becomes an equation only when you set it equal to something, usually zero. So 2x2−7x+32x^2 - 7x + 3 is a quadratic trinomial and 2x2−7x+3=02x^2 - 7x + 3 = 0 is a quadratic equation. Always rearrange to the standard form, with zero on the right, before you pick out a, b and c.

In NCERT this topic is chapter 4 of class 10, Quadratic Equations. Complex roots return in class 11, in the chapter on complex numbers and quadratic equations.

The quadratic formula explained letter by letter

Look at the formula once more and read it as a set of instructions.

x=−b±b2−4ac2a x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}
  • −b-b: take the coefficient of x and change its sign. If b is −7-7, then −b-b is 7.
  • b2−4acb^2 - 4ac: the discriminant, written D. Square b first (a square is never negative), then subtract four times a times c.
  • ±\pm: you get two answers, one with plus and one with minus. These are the two roots, often called α\alpha and β\beta.
  • 2a2a: the whole numerator, not just the square root, is divided by twice a.

A neat way to remember it: the roots sit symmetrically around −b2a-\tfrac{b}{2a}, one step of D2a\tfrac{\sqrt{D}}{2a} to the right and one step to the left. That middle value is also the x coordinate of the vertex of the graph, which you will meet further down.

Discriminant formula and the nature of roots

The number under the square root decides what kind of roots you get, before you finish the working. That is why it is called the discriminant.

D=b2−4ac D = b^2 - 4ac
Value of DNature of rootsGraph meets x axis
D > 0 and a perfect squareTwo distinct real, rational rootsAt two points
D > 0, not a perfect squareTwo distinct real, irrational rootsAt two points
D = 0Two equal real roots, each −b2a-\tfrac{b}{2a}Touches at one point
D < 0No real roots; two complex (non-real) rootsDoes not meet it

The rational and irrational split in the first two rows assumes a, b and c are integers. In class 10 board papers the most common question is "find k so that the equation has equal roots": set b2−4ac=0b^2 - 4ac = 0 and solve for k. For example, x2+kx+9=0x^2 + kx + 9 = 0 has equal roots when k2−36=0k^2 - 36 = 0, so k=6k = 6 or k=−6k = -6.

Deriving the quadratic formula by completing the square

The formula is not a rule to memorise blindly. It drops out when you complete the square on the general equation. Start from ax2+bx+c=0ax^2 + bx + c = 0 and divide every term by a (allowed because a≠0a \neq 0).

x2+bax=−cax2+bax+b24a2=b24a2−ca(x+b2a)2=b2−4ac4a2x+b2a=±b2−4ac2ax=−b±b2−4ac2a \begin{aligned} x^2 + \dfrac{b}{a}x &= -\dfrac{c}{a} \\ x^2 + \dfrac{b}{a}x + \dfrac{b^2}{4a^2} &= \dfrac{b^2}{4a^2} - \dfrac{c}{a} \\ \left(x + \dfrac{b}{2a}\right)^2 &= \dfrac{b^2 - 4ac}{4a^2} \\ x + \dfrac{b}{2a} &= \pm\dfrac{\sqrt{b^2 - 4ac}}{2a} \\ x &= \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} \end{aligned}

In the second line you add the square of half the coefficient of x to both sides. The left side then becomes a perfect square, using the identity for (p+q)2(p + q)^2 from the algebra identities page. Taking the square root gives the ±\pm sign, because both a positive and a negative number square to the same value. Check whether your board still asks for this proof; either way, writing it out once helps the formula stick.

Worked examples using the quadratic formula

Each example uses the same three moves: write a, b and c with their signs, find D, then substitute. Check each one in the solver.

Example 1: two real roots

Solve 2x2−7x+3=02x^2 - 7x + 3 = 0.

  1. Here a=2a = 2, b=−7b = -7, c=3c = 3.
  2. D=(−7)2−4(2)(3)=49−24=25D = (-7)^2 - 4(2)(3) = 49 - 24 = 25, a perfect square, so the roots are rational.
  3. x=7±54x = \dfrac{7 \pm 5}{4}, so x=124=3x = \dfrac{12}{4} = 3 or x=24=12x = \dfrac{2}{4} = \dfrac{1}{2}.

Answer: x=3x = 3 or x=12x = \tfrac{1}{2}.

Example 2: irrational roots

Solve x2+4x−1=0x^2 + 4x - 1 = 0.

  1. a=1a = 1, b=4b = 4, c=−1c = -1.
  2. D=16−4(1)(−1)=16+4=20D = 16 - 4(1)(-1) = 16 + 4 = 20. Not a perfect square, and 20=25\sqrt{20} = 2\sqrt{5}.
  3. x=−4±252=−2±5x = \dfrac{-4 \pm 2\sqrt{5}}{2} = -2 \pm \sqrt{5}.

Answer: x=−2+5≈0.236x = -2 + \sqrt{5} \approx 0.236 or x=−2−5≈−4.236x = -2 - \sqrt{5} \approx -4.236.

Example 3: equal roots

Solve 9x2−12x+4=09x^2 - 12x + 4 = 0.

  1. a=9a = 9, b=−12b = -12, c=4c = 4.
  2. D=144−144=0D = 144 - 144 = 0, so both roots are the same.
  3. x=12±018=23x = \dfrac{12 \pm 0}{18} = \dfrac{2}{3}. You could also spot (3x−2)2=0(3x - 2)^2 = 0.

Answer: x=23x = \tfrac{2}{3}, repeated.

Example 4: complex roots

Solve x2−2x+5=0x^2 - 2x + 5 = 0.

  1. a=1a = 1, b=−2b = -2, c=5c = 5.
  2. D=4−20=−16D = 4 - 20 = -16. Negative, so there is no real root.
  3. −16=16⋅−1=4i\sqrt{-16} = \sqrt{16}\cdot\sqrt{-1} = 4i, so x=2±4i2=1±2ix = \dfrac{2 \pm 4i}{2} = 1 \pm 2i.

Answer: x=1+2ix = 1 + 2i or x=1−2ix = 1 - 2i. In class 10 you simply write "no real roots".

Imaginary roots: the value of i and why it is used

When the discriminant is negative you need the square root of a negative number. No real number squares to a negative value, so to handle square roots such as −16\sqrt{-16}, mathematicians defined a new number i with i2=−1i^2 = -1. That is the value of i in a quadratic equation: i=−1i = \sqrt{-1}. Then −k=ik\sqrt{-k} = i\sqrt{k} for any positive k.

Why are imaginary numbers used in quadratics at all? Because with them every quadratic has exactly two roots, counted with repetition, and the formula works for every a, b and c. Without them, many quadratics would simply have "no solution", which is less useful in physics and engineering, where these roots describe things like oscillating circuits and vibrations.

Roots of this kind always come as a conjugate pair p+qip + qi and p−qip - qi when a, b and c are real. Their sum 2p2p and product p2+q2p^2 + q^2 are ordinary real numbers, which is a quick way to check your work. In Example 4, the sum is 2 and the product is 1+4=51 + 4 = 5, matching −ba-\tfrac{b}{a} and ca\tfrac{c}{a}.

Factorisation, completing the square or the formula: which to use

There are three standard ways to solve a quadratic, and all three give the same roots. Choosing well saves time in an exam.

MethodBest whenWeak point
Splitting the middle term (factorisation)The roots are small whole numbers or simple fractionsFails quietly when roots are irrational
Completing the squarea = 1 and b is even; also for finding the vertexFractions pile up when a ≠ 1
Quadratic formulaAny equation, especially messy coefficientsSign slips during substitution

How to solve quadratic trinomials by factorising

For ax2+bx+cax^2 + bx + c, look for two numbers whose product is acac and whose sum is b. In 2x2−7x+32x^2 - 7x + 3, ac=6ac = 6 and b=−7b = -7, so the numbers are −6-6 and −1-1. Split and group: 2x2−6x−x+3=2x(x−3)−1(x−3)=(2x−1)(x−3)2x^2 - 6x - x + 3 = 2x(x - 3) - 1(x - 3) = (2x - 1)(x - 3). The roots 3 and one half match Example 1.

A practical rule: work out D first. If it is a perfect square, factorisation will work quickly. If not, go straight to the formula.

Sum and product of roots and formation of quadratic equation

If α\alpha and β\beta are the roots of ax2+bx+c=0ax^2 + bx + c = 0, adding and multiplying the two values from the formula gives

α+β=−ba,αβ=ca \alpha + \beta = -\dfrac{b}{a}, \qquad \alpha\beta = \dfrac{c}{a}

For 3x2−5x−2=03x^2 - 5x - 2 = 0, the sum is 53\tfrac{5}{3} and the product is −23-\tfrac{2}{3} without solving. The actual roots are 2 and −13-\tfrac{1}{3}: check that 2−13=532 - \tfrac{1}{3} = \tfrac{5}{3} and 2×(−13)=−232 \times (-\tfrac{1}{3}) = -\tfrac{2}{3}.

Run the idea backwards for the formation of a quadratic equation. When you know the roots, the equation is

x2−(sum of roots) x+(product of roots)=0 x^2 - (\text{sum of roots})\,x + (\text{product of roots}) = 0

Example 5: form the equation from its roots

Find a quadratic equation whose roots are 4 and −32-\tfrac{3}{2}.

  1. Sum =4−32=52= 4 - \tfrac{3}{2} = \tfrac{5}{2}. Product =4×(−32)=−6= 4 \times (-\tfrac{3}{2}) = -6.
  2. The equation is x2−52x−6=0x^2 - \tfrac{5}{2}x - 6 = 0.
  3. Multiply by 2 to clear the fraction.

Answer: 2x2−5x−12=02x^2 - 5x - 12 = 0.

Irrational roots come in pairs too. Roots 3+23 + \sqrt{2} and 3−23 - \sqrt{2} have sum 6 and product 9−2=79 - 2 = 7, giving x2−6x+7=0x^2 - 6x + 7 = 0.

Quadratic from three points and the golden ratio

Through three points a quadratic equation can always be made

Through any three points with different x values that do not lie on one straight line, exactly one parabola y=ax2+bx+cy = ax^2 + bx + c passes. Three unknowns need three equations, and each point gives one. If the points are collinear you get a=0a = 0, a straight line instead.

Example 6: find the quadratic from three points

Find the quadratic through (1,2)(1, 2), (2,7)(2, 7) and (−1,4)(-1, 4).

  1. Substitute each point: a+b+c=2a + b + c = 2, 4a+2b+c=74a + 2b + c = 7, a−b+c=4a - b + c = 4.
  2. Subtract the first from the third: −2b=2-2b = 2, so b=−1b = -1.
  3. Subtract the first from the second: 3a+b=53a + b = 5, so 3a=63a = 6 and a=2a = 2. Then c=2−2+1=1c = 2 - 2 + 1 = 1.

Answer: y=2x2−x+1y = 2x^2 - x + 1. Each point checks out when substituted.

Golden ratio quadratic equation

The golden ratio φ\varphi is the number that satisfies φ=1+1φ\varphi = 1 + \tfrac{1}{\varphi}. Multiply through by φ\varphi to get the golden ratio quadratic equation φ2−φ−1=0\varphi^2 - \varphi - 1 = 0. The golden ratio quadratic formula working is short: a=1a = 1, b=−1b = -1, c=−1c = -1, D=5D = 5, so φ=1+52≈1.618\varphi = \dfrac{1 + \sqrt{5}}{2} \approx 1.618. The other root, about −0.618-0.618, is rejected because a ratio of lengths is positive.

Word problems on quadratic equations

Word problems follow one routine: name the unknown, turn the sentence into an equation, bring it to standard form, solve, then reject any root that makes no sense (a negative length or time).

Example 7: area of a garden

A rectangular garden is 5 m longer than it is wide, and its area is 84 m². Find its sides.

  1. Let the width be w m. Then w(w+5)=84w(w + 5) = 84, so w2+5w−84=0w^2 + 5w - 84 = 0.
  2. D=25+336=361=192D = 25 + 336 = 361 = 19^2.
  3. w=−5±192w = \dfrac{-5 \pm 19}{2}, giving 7 or −12-12. A width cannot be negative.

Answer: width 7 m, length 12 m.

Example 8: a ball thrown upward

A ball's height after t seconds is h=20+15t−5t2h = 20 + 15t - 5t^2 metres. When does it hit the ground?

  1. Set h=0h = 0: −5t2+15t+20=0-5t^2 + 15t + 20 = 0. Divide by −5-5: t2−3t−4=0t^2 - 3t - 4 = 0.
  2. D=9+16=25D = 9 + 16 = 25, so t=3±52t = \dfrac{3 \pm 5}{2}, giving 4 or −1-1.

Answer: after 4 seconds. The root −1-1 is before the throw, so it is dropped.

Graph of a quadratic: vertex and axis of symmetry

The graph of y=ax2+bx+cy = ax^2 + bx + c is a parabola. It opens upward when a>0a \gt 0 and downward when a<0a \lt 0. The real roots are the points where it crosses the x axis, which is why the sign of D tells you how many crossings there are.

Axis: x=−b2a,Vertex: (−b2a,  −D4a) \text{Axis: } x = -\dfrac{b}{2a}, \qquad \text{Vertex: } \left(-\dfrac{b}{2a},\; -\dfrac{D}{4a}\right)

Take y=x2−6x+5y = x^2 - 6x + 5. The axis is x=62=3x = \tfrac{6}{2} = 3. Put x=3x = 3: y=9−18+5=−4y = 9 - 18 + 5 = -4, so the vertex is (3,−4)(3, -4), the lowest point. Check with the formula: D=36−20=16D = 36 - 20 = 16 and −164=−4-\tfrac{16}{4} = -4. The roots 1 and 5 sit two units either side of 3, just as the formula predicts. The solver above draws this picture for any equation you type in, and there is a second route through calculus: the slope 2ax+b2ax + b is zero at x=−b2ax = -\tfrac{b}{2a}, as the derivative rules show.

Common mistakes with the quadratic formula

Watch for these. Most lost marks come from the same few slips.

  • Not rearranging first. In x2=3x+10x^2 = 3x + 10, b is −3-3 and c is −10-10, not 3 and 10. Move everything to one side first.
  • Squaring a negative b wrongly. (−7)2=49(-7)^2 = 49, not −49-49. Put b in brackets when you substitute.
  • Dividing only the root by 2a. The fraction bar runs under −b-b as well.
  • Dropping the sign of c in 4ac. With c=−1c = -1, −4ac=−4a(−1)=+4a-4ac = -4a(-1) = +4a: the two minus signs cancel.
  • Forgetting one root. The ±\pm gives two values; write both, then reject one only if the problem says so.
  • Not simplifying surds. Write 20\sqrt{20} as 252\sqrt{5} and cancel common factors.

Practice: solve 3x2+2x−5=03x^2 + 2x - 5 = 0 and 5x2−2x+1=05x^2 - 2x + 1 = 0. Answers are in the FAQ below. For more identities used in simplifying answers, see algebra formulas, and for the distance between two roots marked on a graph, the distance formula.

Download the PDF

Questions students ask

What is the quadratic formula?

For ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \neq 0, the roots are x=−b±b2−4ac2ax = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}. It is also called Sridharacharya's formula in Indian textbooks, after the mathematician who stated a rule of this kind.

What is the discriminant formula?

The discriminant is D=b2−4acD = b^2 - 4ac. If D is positive there are two different real roots, if it is zero the two roots are equal, and if it is negative the roots are complex, so there is no real root.

Can the quadratic formula be used when a is zero?

No. If a=0a = 0 the equation is linear, bx+c=0bx + c = 0, and the formula would mean dividing by zero. Solve it directly as x=−cbx = -\tfrac{c}{b}.

What are the answers to the practice questions?

For 3x2+2x−5=03x^2 + 2x - 5 = 0: D=64D = 64, so x=1x = 1 or x=−53x = -\tfrac{5}{3}. For 5x2−2x+1=05x^2 - 2x + 1 = 0: D=−16D = -16, so there are no real roots; the complex roots are 1±2i5\tfrac{1 \pm 2i}{5}.

Which class teaches the quadratic formula?

It is taught in class 10 in the Quadratic Equations chapter, with real roots only. Class 11 extends it to complex roots. It is also used throughout class 11 and 12 physics and in competitive exams.

Is the quadratic formula the same as Sridharacharya formula?

Yes. Many Indian books call it the Sridharacharya formula. The formula itself, and the way you use it, is exactly the same.

How do I know if the roots will be rational?

When a, b and c are integers, the roots are rational exactly when the discriminant is a perfect square such as 0, 1, 4, 9 or 25. Then factorisation by splitting the middle term will also work.

From the blog

All posts