All courses › Foundations of Mathematics › Quadratic equation

Quadratic equation

A quadratic equation ax2+bx+c=0ax^2+bx+c=0 is solved with the quadratic formula. The expression under the root sign, the discriminant DD, tells us how many solutions we get. The formula comes from the first square rule, as the derivation below shows.

Try it yourself

The quadratic function

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}the quadratic formula
D=b2−4acD = b^2 - 4acthe discriminant

Symbols

a, b, ca,\ b,\ ccoefficients in ax2+bx+c=0ax^2+bx+c=0
DDdiscriminant
x\textcolor{#1D5FC2}{x}first term in the square (blue)
b2a\textcolor{#A64300}{\tfrac{b}{2a}}second term in the square (orange)
2⋅x⋅b2a\textcolor{#B5177A}{2\cdot x\cdot\tfrac{b}{2a}}the middle term 2ab2ab from the first square rule (magenta)

Where the rule comes from

Where the quadratic formula comes from

  1. ax2+bx+c=0ax^2 + bx + c = 0

    Start with the general equation, where a≠0a \neq 0.

  2. x2+bax+ca=0x^2 + \frac{b}{a}x + \frac{c}{a} = 0

    Divide every term by aa, so x2x^2 stands alone.

  3. x2+2⋅x⋅b2a=−ca\textcolor{#1D5FC2}{x^2} + \textcolor{#B5177A}{2\cdot x\cdot\tfrac{b}{2a}} = -\frac{c}{a}

    Move ca\frac{c}{a} across, and write bax\frac{b}{a}x as 2⋅x⋅b2a2\cdot x\cdot\frac{b}{2a}. The left side now looks like the start of the first square rule, with xx as the first term and b2a\frac{b}{2a} as the second.

  4. x2+2⋅x⋅b2a+(b2a)2\textcolor{#1D5FC2}{x^2} + \textcolor{#B5177A}{2\cdot x\cdot\tfrac{b}{2a}} + \textcolor{#A64300}{\left(\tfrac{b}{2a}\right)^2}=−ca+(b2a)2= -\frac{c}{a} + \textcolor{#A64300}{\left(\tfrac{b}{2a}\right)^2}

    Add (b2a)2\left(\frac{b}{2a}\right)^2 to both sides. Now all three terms of the first square rule are on the left.

  5. (x+b2a)2=b2−4ac4a2(\textcolor{#1D5FC2}{x} + \textcolor{#A64300}{\tfrac{b}{2a}})^2 = \frac{b^2 - 4ac}{4a^2}

    The left side is the first square rule in reverse. On the right, put everything over the common denominator 4a24a^2.

  6. x+b2a=±b2−4ac2a\textcolor{#1D5FC2}{x} + \textcolor{#A64300}{\tfrac{b}{2a}} = \pm\frac{\sqrt{b^2 - 4ac}}{2a}

    Take the square root of both sides. The root can be positive or negative, because both 222^2 and (−2)2({-2})^2 are 4.

  7. x=−b±b2−4ac2a\textcolor{#1D5FC2}{x} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

    Subtract b2a\frac{b}{2a} from both sides and put everything over one fraction bar. That is the quadratic formula.

Example

x2−2x−8=0x^2 - 2x - 8 = 0: D=4+32=36D = 4+32 = 36, so x=2±62=4x = \frac{2\pm 6}{2} = 4 or −2-2.

D>0D>0 gives two solutions, D=0D=0 gives one, and D<0D<0 gives no real solutions.
Practise algebra and equations for free →

← Linear equation · Linear function →

Part of Foundations of Mathematics: Algebra and equations.