Back to all articles
Quadratic Equation

How to Solve Quadratic Equations: Formula, Factoring and Examples

November 2026 • Quadratic Equation • 3 min read • By
Quadratic Equation

What is a quadratic equation?

A quadratic equation is any equation that can be written as \[ ax^2 + bx + c = 0, \qquad a \neq 0. \] Here \(a\), \(b\) and \(c\) are numbers called the coefficients. For example, in \(2x^2 – 3x + 1 = 0\) we have \(a = 2\), \(b = -3\) and \(c = 1\). Always move every term to one side first, so that the other side is 0.

The quadratic formula: \[ x = \frac{-b \pm \sqrt{b^2 – 4ac}}{2a} \]The \(\pm\) sign gives the two solutions (roots): one with \(+\) and one with \(-\).

Where does the formula come from? (Completing the square)

Start from \(ax^2 + bx + c = 0\) and divide by \(a\): \[ x^2 + \frac{b}{a}x = -\frac{c}{a}. \] Add \(\left(\frac{b}{2a}\right)^2\) to both sides to complete the square: \[ \left(x + \frac{b}{2a}\right)^2 = \frac{b^2}{4a^2} – \frac{c}{a} = \frac{b^2 – 4ac}{4a^2}. \] Take the square root of both sides and subtract \(\frac{b}{2a}\): \[ x + \frac{b}{2a} = \pm\frac{\sqrt{b^2 – 4ac}}{2a} \quad\Longrightarrow\quad x = \frac{-b \pm \sqrt{b^2 – 4ac}}{2a}. \]

The discriminant: how many roots?

The expression under the square root, \(\Delta = b^2 – 4ac\), is called the discriminant. It tells you the nature of the roots before you finish the calculation:

  • \(\Delta > 0\): two different real roots (the parabola crosses the x-axis twice).
  • \(\Delta = 0\): one repeated real root (the parabola touches the x-axis).
  • \(\Delta < 0\): no real roots; two complex roots \(p \pm qi\) (the parabola does not meet the x-axis).

If \(\Delta\) is a perfect square (0, 1, 4, 9, 16, …) and the coefficients are whole numbers, the roots are rational and the quadratic can also be solved by factorising.

Worked example 1: two rational roots

Solve \(x^2 – 5x + 6 = 0\). Here \(a = 1\), \(b = -5\), \(c = 6\). \[ \Delta = (-5)^2 – 4(1)(6) = 25 – 24 = 1 \] \[ x = \frac{5 \pm \sqrt{1}}{2} = \frac{5 \pm 1}{2} \quad\Longrightarrow\quad x = 3 \ \text{or}\ x = 2. \] Check by factorising: \((x – 2)(x – 3) = 0\).

Worked example 2: irrational (surd) roots

Solve \(x^2 – 3x + 1 = 0\). Then \(\Delta = 9 – 4 = 5\), which is not a perfect square, so \[ x = \frac{3 \pm \sqrt{5}}{2} \approx 2.618 \ \text{or}\ 0.382. \] Exam questions often ask for the exact answer in surd form, so keep \(\sqrt{5}\) until the last step.

Worked example 3: complex roots

Solve \(x^2 + 2x + 5 = 0\). Then \(\Delta = 4 – 20 = -16 < 0\), so there are no real roots. Using \(\sqrt{-16} = 4i\): \[ x = \frac{-2 \pm 4i}{2} = -1 \pm 2i. \]

Useful extras

  • Sum and product of roots: \(x_1 + x_2 = -\frac{b}{a}\) and \(x_1 x_2 = \frac{c}{a}\).
  • Vertex of the parabola \(y = ax^2 + bx + c\): at \(x = -\frac{b}{2a}\); it is a minimum if \(a > 0\) and a maximum if \(a < 0\).

Common mistakes to avoid

  • Forgetting the sign of \(b\): if \(b = -5\), then \(-b = 5\) and \(b^2 = 25\) (not \(-25\)).
  • Dividing only \(\sqrt{\Delta}\) by \(2a\): the whole numerator \(-b \pm \sqrt{\Delta}\) is divided by \(2a\).
  • Not rearranging to “\(= 0\)” first: \(x^2 = 5x – 6\) must become \(x^2 – 5x + 6 = 0\).

The quadratic formula is on the syllabus for GCSE and A-level maths in the UK, Algebra 1 and 2 and the SAT in the US, high school maths in Canada, and Class 10 and 11 CBSE maths in India. Use our free quadratic equation calculator to check your working step by step.

Open the free Quadratic Equation Calculator →

Try this in AllMath Calculator →

Leave a comment

Your email address will not be published. Required fields are marked *