Introduction to quadratic equations
Before reading this guide, it is recommended that you read Guide: Introduction to complex numbers.
What is a quadratic equation?
One of the most important types of an equation are quadratic equations; very generally speaking, these are equations that contain a squared term. These appear almost everywhere in mathematics, from modelling projectile motion in mechanics to describing circles, ellipses, parabolas and hyperbolas in 2D space. It is therefore crucial to be able to identify and solve quadratic equations.
This guide will focus on quadratic equations in one variable, explain the shape of their graphs, and shows how to identify the variable and the coefficients of the equation. Then, the discriminant is defined, and the role of the discriminant in determining solutions to the quadratic equation is explained.
A quadratic equation is an equation that can be rearranged into the form \[ax^2 + bx + c = 0\] where \(x\) is a variable and \(a,b,c\) are real numbers with \(a \neq 0\).
Values of \(x\) that satisfy the equation \(ax^2 + bx + c = 0\) are known as roots of the equation. Typically, roots of a quadratic are expressed in the form of the variable. So here, the roots of \(ax^2 + bx + c = 0\) are ‘roots in \(x\)’.
Here, \(a\neq 0\) as if it was, then the equation would no longer be a quadratic equation!
The general shape of a quadratic equation is known as a parabola. The shape of a parabola is given in the following interactive figure: you can use the slider to show what happens to the shape of the parabola \(y = ax^2\) as \(a\) changes.
It is very important to be able to identify the variable in a quadratic equation, as well as the coefficients \(a,b,c\). In the course of your mathematical study, it may be that the variable of a quadratic equation is not only letters like \(x,y,z\), but squares or cubes like \(x^2\) and \(y^3\), or even functions like \(e^x\), \(\cos(x)\), and \(\sin(y)\).
You are given the quadratic equation \(2x^2 + 4x - 8 = 0\). The variable of the quadratic equation is \(x\), and the coefficients are \(a = 2, b = 4, c = -8\).
Here, the equation \(y^4 - 10y^2 + 25 = 0\) may look like a quartic equation, but it is actually a quadratic equation. Using the laws of indices, you can rewrite the equation as \((y^2)^2 - 10y^2 + 25 = 0\). Therefore, the variable of the quadratic equation is \(y^2\), and the coefficients are \(a = 1\), \(b = -10\), \(c = 25\).
You are given the equation \(-e^{2x} + 4e^{x} - 5 = 0\). Using the laws of indices, you can rewrite the equation as \(-(e^{x})^2 + 4e^x - 5 = 0\). The variable of the quadratic equation is \(e^x\), and the coefficients are \(a = -1\), \(b = 4\), \(c = -5\). This is not the only solution to the coefficients; since the right-hand side is equal to \(0\), you can multiply the equation through by \(-1\) to get \((e^{x})^2 - 4e^x + 5 = 0\), which gives \(a = 1\), \(b = -4\) and \(c = 5\). Both solutions are equally valid.
You are given the equation \(t+1 = \frac{4}{t-3}\). This really is a quadratic equation! You can multiply both sides by \(t - 3\) to get \[(t+1)(t-3) = 4\] You can then expand the brackets to get \[t^2 + t + 3t + 3 = 4\] and so \(t^2 + 4t + 3 = 4\). Finally, you are able to subtract \(4\) from both sides to get \(t^2 + 4t - 1 = 0\). It follows that the variable of the quadratic equation is \(t\), and the coefficients are \(a = 1\), \(b = 4\), \(c = -1\).
Solving a quadratic equation
To solve the quadratic equation, you could use one of three methods:
You could factorise the quadratic equation \(ax^2 + bx + c = 0\) into linear equations \((mx + n)(px + q)\), then work out the roots when each of these linear equations is zero. See (Guide: Factorisation) for more.
You could complete the square in order to reduce the quadratic equation \(ax^2 + bx + c = 0\) into the form \((x + b/2a)^2 = d\), and then solve from there (not forgetting the negative root). See Guide: Completing the square for more.
You could use the quadratic formula; for a quadratic equation \(ax^2 + bx + c = 0\), the two roots to the quadratic equation are given by \[x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.\]
Each method is equally valid, but some may involve more work than others. It is up to you to decide which method is best for each quadratic you encounter; but it is thoroughly advised that if you are not sure which method is best, then the quadratic formula is the one to choose. See Guide: Using the quadratic formula for more.
The discriminant
What the roots of the quadratic formula look like are determined by the term \(b^2 - 4ac\); this term has a special name.
The term \(D = b^2 - 4ac\) is known as the discriminant of the quadratic equation \(ax^2 + bx + c = 0\).
There are then three separate cases for solutions to quadratic equations.
If \(D = b^2 - 4ac\) is positive, then \(\sqrt{D}\) is a real number and the two roots of the quadratic equation \(ax^2 + bx + c = 0\) are \[x = \frac{-b + \sqrt{D}}{2a}\qquad\textsf{ and }\qquad x = \frac{-b - \sqrt{D}}{2a}\] These two roots are both real numbers and distinct from each other. You can observe this behaviour on the interactive figure below, where \(D\) is greater than \(0\); the parabola crosses the \(x\)-axis in two places.
If \(D = b^2 - 4ac = 0\) is zero, then \(\sqrt{D} = 0\). In this case, the two roots of the quadratic equation \(ax^2 + bx + c = 0\) are \[x = \frac{-b}{2a} \qquad\textsf{ and }\qquad x = \frac{-b}{2a}\] These two roots are given by the same real number. To be sure that you express both roots, you can write ‘\(x = -b/2a\) twice’. You can observe this behaviour on the interactive figure below, where \(D\) is equal to \(0\); the parabola touches the \(x\)-axis in one place.
If \(D = b^2 - 4ac\) is negative, then \(\sqrt{D}\) is not a real number. In this case, the two roots of the quadratic equation are complex numbers. You can express the two roots of the quadratic equation by \[x = \frac{-b + i\sqrt{-D}}{2a}\qquad\textsf{ and }\qquad x = \frac{-b - i\sqrt{-D}}{2a}\] where \(i\) is the imaginary unit (so \(i^2 = -1\); see Guide: Introduction to complex numbers). In a graph, the parabola does not cross the \(x\)-axis at all; this indicates that there are no real solutions to this quadratic equation. You can see this behaviour in the interactive graph below where \(D < 0\).
You can use the discriminant to check how many roots a quadratic equation has in the variable given to you. However, this is at most a maximum number of solutions. Conditions on that variable may also reduce the number of valid solutions, particularly if you have real valued functions. For instance, since \(e^x > 0\) for all real number \(x\), there are no solutions in \(x\) if you find \(e^x = -1\).
Here’s some examples of using the discriminant and known properties of functions to rule out solutions.
In Example 1, you identified the coefficients of \(2x^2 + 4x - 8 = 0\) as \(a = 2, b = 4, c = -8\). Using these, you can work out the value of the discriminant \(D = b^2 - 4ac\) as \[D = (4)^2 - 4(2)(-8) = 16 + 64 = 80.\] Since \(D = 80\), you can say that this quadratic equation has two distinct real roots in \(x = r_1\) and \(x = r_2\).
In Example 2, you identified the coefficients of \(y^4 - 10y^2 + 25 = 0\) as \(a = 1, b = -10, c = 25\), and the variable as \(y^2\). Using these, you can work out the value of the discriminant \(D = b^2 - 4ac\) as \[D = (-10)^2 - 4(1)(25) = 100 - 100 = 0.\] Since \(D = 0\), you can say that this quadratic equation has at most one real root \(r\) in terms of \(y^2\).
Whether or not the equation itself has real solutions in \(y\) depends on whether \(r\) is positive or negative! You cannot take the square root of a negative number, so if \(r\) is negative the equation has no real solutions. If \(r\) is positive, then the equation has two real roots in \(y\); that is, \(y = \pm\sqrt{r}\).
In Example 3, you identified the coefficients of \(-e^{2x} + 4e^{x} - 5 = 0\) as \(a = -1, b = 4, c = -5\), and the variable as \(e^{x}\). Using these, you can work out the value of the discriminant \(D = b^2 - 4ac\) as \[D = (4)^2 - 4(-1)(-5) = 16 - 20 = -4.\] Since \(D = -4\), you can say that this quadratic equation has complex roots.
This equation therefore has no real solutions in \(x\). This is because \(e^x\) is real for any real \(x\); if \(e^x\) is complex, it follows that \(x\) cannot be real.
In Example 4, you rearranged the equation \(t+1 = \frac{4}{t-3}\) to \(t^2 + 4t - 1 = 0\), and therefore identified the coefficients as \(a = 1, b = 4, c = -1\), and the variable as \(t\). Using these, you can work out the value of the discriminant \(D = b^2 - 4ac\) as \[D = (4)^2 - 4(1)(-1) = 16 + 4 = 20.\] Since \(D = 20\), you can say that this quadratic equation has two distinct real roots in \(t\).
Quick check problems
- What is the discriminant of the quadratic equation \(x^2 - x - 1 = 0\)?
Answer: The discriminant \(D\) is equal to .
- You are given the quadratic equation \(4h^2 - h + 101 = 0\). Identify the variable, and the coefficients \(a,b,c\).
Answer: The variable is , and the coefficients are \(a=\) , \(b=\) , and \(c=\) .
- You are given three statements below. Decide whether they are true or false.
The quadratic equation \(m^2 + 4m + 4 = 0\) has two distinct real roots. Answer: .
The quadratic equation \(m^2 - 4m - 4 = 0\) has exactly one real root. Answer: .
The quadratic equation \(4m^2 + 4m + 4 = 0\) has no real roots. Answer: .
Further reading
For more questions on the subject, please go to Questions: Introduction to quadratic equations.
For a way to solve quadratic equations, please see Guide: Using the quadratic formula.
Version history
v1.0: initial version created 06/23 by tdhc.
v1.1: edited 04/24 by tdhc.
v1.2: addition of interactive Desmos figures 11/24 by tdhc.