The Quadratic Formula

Kick a football into the air and its height follows a curve; ask "when does it hit the ground?" and you are solving a quadratic. Engineers use the same maths for bridges and satellite dishes, and shops use it to find the price that earns the most profit — so it pays to have one method that cracks every quadratic, however awkward the numbers.

Some quadratics factorise in a heartbeat. Many are stubborn — no two whole numbers multiply and add the right way, and factorising just grinds to a halt. That is where the quadratic formula earns its fame: it is a universal key that solves any quadratic written in standard form ax^2 + bx + c = 0 (with a \neq 0), no matter how ugly the numbers. Read off a, b and c, substitute, and out come the solutions:

x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

The \pm sign is doing two jobs at once: take the + for one solution and the - for the other. It comes straight from completing the square on the general equation — that is the formula's proof. Where the neat shortcut of factorising fails, this formula always works. And when the part under the root, b^2 - 4ac, comes out negative, there is no real square root at all — which is exactly where complex numbers are born.

See it worked through

Watch x^2 + 5x + 6 = 0 solved one line at a time: name the coefficients, substitute, compute the discriminant b^2 - 4ac, then split the \pm into the two roots. Step through it.

When factorising fails: a surd answer

Try x^2 + 3x + 1 = 0. Hunt for two whole numbers that multiply to 1 and add to 3 — there are none, so factorising is hopeless. The formula shrugs and solves it anyway. Here a = 1, b = 3, c = 1:

x = \frac{-3 \pm \sqrt{3^2 - 4(1)(1)}}{2(1)} = \frac{-3 \pm \sqrt{9 - 4}}{2} = \frac{-3 \pm \sqrt{5}}{2}

The discriminant is 5 — positive but not a perfect square, so the answers are surds. Leave them in exact form: x = \frac{-3 + \sqrt{5}}{2} and x = \frac{-3 - \sqrt{5}}{2}. Rounding to -0.38 and -2.62 is a decimal approximation, not the true answer.

A second worked example, with a \neq 1

Solve 2x^2 - 4x - 1 = 0. Now a = 2, b = -4, c = -1 — mind the negatives:

x = \frac{-(-4) \pm \sqrt{(-4)^2 - 4(2)(-1)}}{2(2)} = \frac{4 \pm \sqrt{16 + 8}}{4} = \frac{4 \pm \sqrt{24}}{4}

Simplify the surd: \sqrt{24} = 2\sqrt{6}, so x = \dfrac{4 \pm 2\sqrt{6}}{4} = \dfrac{2 \pm \sqrt{6}}{2}. Notice how (-4)^2 = 16 (a positive number, even though b was negative) and how -4 \times 2 \times (-1) = +8 flipped the sign under the root. Signs are where marks are won and lost.

How many solutions? The discriminant

The part under the square root, b^2 - 4ac, is called the discriminant. Without solving the whole equation, its sign tells you how many real solutions the quadratic has — a handy check before you commit to the full working:

Example: x^2 + x + 1 = 0 has discriminant 1 - 4 = -3 < 0. Don't even start substituting — there are no real solutions, and that is a complete, correct answer.

See it explained

Sal Khan substitutes the coefficients into the quadratic formula and simplifies to the two roots.

The formula is unforgiving about signs and structure. The usual traps:

The quadratic formula is one of the rare scraps of school algebra that sticks with people for decades — plenty learned it as a song ("x equals minus b, plus or minus the square root, of b squared minus four a c, all over two a"). And it is astonishingly ancient: Babylonian mathematicians were solving quadratics on clay tablets around 4000 years ago, long before algebra had symbols.

What took another three thousand years was accepting the awkward answers. Negative solutions were dismissed as "absurd" for centuries, and a negative discriminant — the square root of a negative number — was treated as a dead end until mathematicians finally embraced imaginary numbers and gave those roots a home. That little b^2 - 4ac < 0 is a doorway to a whole new kind of number. And the formula itself is no mystery from the sky: it is nothing but completing the square done once, in general, and remembered.