Chapter 1: Quadratic Equations
About 3,700 years ago in ancient Babylonia, a scribe wrote down a problem about the cost of digging a trench. The problem asks us to find the length and width of a rectangle with an area of 7½, where the length is 3½ greater than the width. But how do we know what someone was doing in math 3,700 years ago? The Babylonians wrote their problems on clay tablets using cuneiform, and luckily, some of these tablets have survived! They contain some of the oldest surviving records of what we would now call quadratic equations.1
If the width is \(x\), the length is \(x + 3½\).
\(x(x + 3½) = 7½\)
\(x^{2} + 3½\ x - 7½ = 0\) ← That is a quadratic equation!
What Are Quadratics?
Quadratic equations are simply equations that contain the square of an unknown term, and no terms of higher degree, written as \(\boxed{{ax}^{2} + bx + c = 0}\), where a is not zero. Quadratic equations are connected to geometry, with early problems involving the areas of fields and trenches, but quadratic equations also have connections to physics and one of the most famous mathematical constants.
Factoring and Vieta’s Formulas
When a quadratic equation contains a linear term, sometimes we can solve it by factoring. Monic quadratics have a=1, so have the form of \(x^{2} + bx + c = 0\). The key idea behind factoring is that every monic quadratic equation with real roots can be written in factored form, \((x - r)(x - s) = 0\), where \(r\) and \(s\) are the solutions to our quadratic, and each term inside the parentheses is a factor, hence the name. But why does this work? Consider what happens when we plug in a root, \(r\). Because \(r - r\) is 0, the entire expression equals zero, as desired. The same result happens when we plug in \(s\). From an equation’s factored form, the roots are immediately evident, so the goal of factoring is to turn an equation of the form \(x^{2} + bx + c = 0\) into \((x - r)(x - s) = 0\), so we can find the roots.
Now, we see how this is accomplished. We can multiply out the factors in factored form to yield the equation \(x^{2} - (r + s)x + rs = 0\), which looks similar to standard form. In fact, we can “match the coefficients” and form two new equations. We want \(- (r + s)\) to be exactly \(b\), and \(rs\) to be exactly \(c\). We want two numbers that add to \(- b\) and multiply to \(c\).
This sounds very familiar. In fact, it is similar to the trench problem at the start of the chapter, which relates the difference and product of two lengths! But now, instead of starting from a field and making a quadratic equation out of it, we are starting with a quadratic and then making a field problem out of it!
These two equations form a system of equations known as Vieta’s formulas for the quadratic, named after the mathematician François Viète.2
\[\boxed{\left\{\begin{aligned} r+s &= -b \\ rs &= c \end{aligned}\right.}\]
More than providing a potential way to solve a quadratic equation, these two equations actually provide an easy way of checking our answer after any method! Rather than plugging your answers into the standard form, you can instead just plug the roots into Vieta’s formulas, and if both are correct, you have your answers!
But enough about checking our answers, let’s solve some equations.
Let’s try to solve \(x^{2} - 5x + 6 = 0\).
The associated system is \(\left\{\begin{aligned} r+s &= 5 \\ rs &= 6 \end{aligned}\right.\), so we must find two numbers that add to 5 and multiply to 6.
It is obvious that the two numbers are 2 and 3, so the factored form is \((x - 2)(x - 3) = 0\), and it follows that the two solutions are \(x = 2\) and \(x = 3\).
The factors from the original equation are not always so obvious. How about the equation \(x^{2} - 17x + 72 = 0\)? The number 72 has many factor pairs, so it helps to list them all and pick out the correct one. All positive number pairs are \(\lbrack 1,72\rbrack,\lbrack 2,36\rbrack,\lbrack 4,18\rbrack,\ \lbrack 8,9\rbrack,\ \lbrack 3,24\rbrack,\ \lbrack 6,12\rbrack\).
We want to find the pair that adds to 17, the negative coefficient of \(x\). Ok, we can instantly rule out the first, second, third, and fifth pairs, as their numbers are too large to add to 17. The sixth pair gets close, with 18, but the fourth pair does the job. Therefore, the factored form is \((x - 8)(x - 9) = 0\), and the solutions are \(x = 8\) and \(x = 9\).
A negative constant can also lead to factors with opposite signs. For example, \(x^{2} + x - 6 = (x + 3)(x - 2)\), so the solutions are \(x = - 3\) and \(x = 2\). We only need to find two numbers whose product is \(- 6\) and whose sum is \(1\).
Beyond Factoring
Completing the Square
Unfortunately, not all quadratic equations factor nicely into integers. Luckily for us, there is another way of solving any quadratic equation known as completing the square. For example, let’s use it on the equation \(x^{2} + 8x + 12 = 0\). This equation is factorable, but it is helpful to demonstrate the technique for integer solutions before moving on to non-integer solutions.
Geometrically, we can represent the \(x^{2}\) term as an actual square with sides of length \(x\). The \(8x\) term is a rectangle with one side of length \(x\) and one side of length 8.
For the algebraic method, we try to get the left side of the equation to resemble the perfect square identity \({(x + y)}^{2} = x^{2} + 2xy + y^{2}\). Y is a stand-in variable that is currently unknown, and we will determine its value in the next step.
The equation already has an \(x^{2}\) and a linear term in it, so we can match them up like this:
Now we know that \(2y = 8\), so therefore \(y = 4\).
Geometrically, we can cut the \(8x\) rectangle in half and move one half of the rectangle to the top of the square.
In both methods, we are missing the \(y^{2}\) term, so we can add on a square with sides of length 4 to both sides. Geometrically, now we have a complete larger square with side length \(x + 4\).
Algebraically, we can use our perfect square identity to get \((x + 4)^{2}\). But we added an area of \(4^{2}\), which is \(16\), to the left side, so we must add it to the right side of the equation. We now have the equation \((x + 4)^{2} = - 12 + 16\), or \((x + 4)^{2} = 4\).
Geometrically, the side length of the square must be equal to the square root of the total area, \(4\).
Taking the square root of both sides, we obtain \(x + 4 = \pm 2\). When we are thinking about actual shapes, side lengths must be positive. But in algebra, both square-root signs must be considered, so our solutions are \(x = - 4 \pm 2\), or \(x = - 6\) and \(x = - 2\).
A General Formula for Quadratics
We can solve the general quadratic equation using the same techniques.
We have the equation \(ax^{2} + bx + c = 0\). We haven’t seen what the coefficient \(a\) does to the equation, but we can just divide by it (remember, \(a\) is not zero) and get it into a form we are used to.
\[x^{2} + \frac{b}{a}x + \frac{c}{a} = 0\]
We can now move the constant to complete the square as before:
\[x^{2} + \frac{b}{a}x = - \frac{c}{a}\]
We can use algebra to solve this. Actual squares illustrate the identity when the pictured side lengths are positive. The geometry looks like this:
Algebraically, we have \(\frac{b}{a} = 2y\), so therefore
\[\frac{b}{2a} = y\]
We need to add \(y^{2}\) to both sides, so we add the term \(\left( \frac{b}{2a} \right)^{2}\) to both sides.
\[x^{2} + \frac{b}{a}x + \left( \frac{b}{2a} \right)^{2} = \left( \frac{b}{2a} \right)^{2} - \frac{c}{a}\]
Now we have the complete larger square
\[\left( x + \frac{b}{2a} \right)^{2} = \left( \frac{b}{2a} \right)^{2} - \frac{c}{a}\]
We can simplify a bit on the right-hand side, leaving us with
\[\left( x + \frac{b}{2a} \right)^{2} = \frac{b^{2} - 4ac}{4a^{2}}\]
Now we can solve this in only a couple of basic steps. Taking the square root of both sides, we have
\[x + \frac{b}{2a} = \frac{\pm \sqrt{b^{2} - 4ac}}{2a}\]
Subtracting \(\frac{b}{2a}\) from both sides gives us our answer of
\[\boxed{x = \frac{- b \pm \sqrt{b^{2} - 4ac}}{2a}}\]
Keep in mind that a solution makes sense geometrically only if the pictured side lengths are positive and the construction’s conditions are met.
When Quadratics Get Strange
Two Real Roots
Now let’s try to solve the equation \(x^{2} + 6x + 3 = 0\). We could just plug and chug into the quadratic formula, but let’s try completing the square instead. The solution won’t make much geometric sense, with actual squares, because both solutions for x are negative.
We can move the constant to the right, giving
\[x^{2} + 6x = - 3\]
We proceed as before and add \(\left( \frac{6}{2} \right)^{2} = 9\) to both sides, so
\[x^{2} + 6x + 9 = 6\]
After completing the square, \((x + 3)^{2} = 6\).
Taking square roots and moving the terms, we get the final solution of
\[x = \pm \sqrt{6} - 3\]
This time, both solutions are negative, so the geometric squares do not really make sense.
No Real Roots
Things can get even weirder, though. What about the equation \(x^{2} + 3x + 8 = 0\)?
After moving the constant,
\[x^{2} + 3x = - 8\]
we add \(\left( \frac{3}{2} \right)^{2}\) to both sides, giving
\[x^{2} + 3x + \left( \frac{3}{2} \right)^{2} = - \frac{23}{4}\]
Collapsing into a perfect square gives:
\[\left( x + \frac{3}{2} \right)^{2} = - \frac{23}{4}\]
Taking square roots yields
\[x + \frac{3}{2} = \pm \frac{\sqrt{- 23}}{2}\]
Hold on! How can we take the square root of a negative number?!?
The square of a positive number is positive. The same holds for all negative numbers! You will never square a number (that we know of) and get a negative result! Uh oh. So, no real solutions to this equation exist.
Looking at the quadratic formula,
\[x = \frac{- b \pm \sqrt{b^{2} - 4ac}}{2a}\]
when the terms under the square root become negative, we encounter problems, namely when \(b^{2} - 4ac < 0\).
The expression under the square root is called the discriminant because it distinguishes between equations that have real solutions and those that don’t. If it is greater or equal to than zero, all is good.
One Repeated Root
If it is equal to zero, the equation has only one real solution. For example, take the quadratic \(x^{2} + 4x + 4 = 0\). Its discriminant is \({(4)}^{2} - 4(4)(1) = 0\). This is because the expression on the left side was already a perfect square, \({(x + 2)}^{2} = 0\). After taking square roots, we find \(x + 2 = \pm 0\). But both possibilities are just 0, so only one solution exists: \(x = - 2\). So, if the equation factors as a perfect square immediately, you get “two roots for the price of one.” This is often known as a double root.
If the discriminant is less than zero, no real solutions exist.
\[\begin{gathered} \Delta = b² - 4ac \\ \Delta > 0 \;\rightarrow\; \text{two distinct real roots} \\ \Delta = 0 \;\rightarrow\; \text{one repeated real root} \\ \Delta < 0 \;\rightarrow\; \text{no real roots} \end{gathered}\]
Graphs and the Discriminant
This can be shown graphically as well. When we graph a quadratic function, it forms a curve known as a parabola. Let’s graph \(y = x^{2} + 4x + 3\). Our solutions show up when the y value becomes 0, when the graph crosses the x-axis. It does so twice, at \(x = - 3\) and \(x = - 1\).
However, when the discriminant equals zero, it only touches the x-axis once, like in the equation \(x^{2} + 4x + 4\).
If it is negative, it never touches the x-axis at all, as it happens in \(x^{2} + 4x + 5 = 0\).
Alternative Methods
There is another way to solve the quadratic equation, known as “depressing the quadratic.” It uses a substitution to get rid of the linear term in a different way, and is another concept used in solving the cubic.
Let’s use it to solve the quadratic \(x^{2} - 7x + 9 = 0\).
First, we make a substitution to introduce a new variable \(z\):
\[x = z + \frac{7}{2}\]
For general quadratic equations, the substitution is
\[\boxed{x = z - \frac{b}{2a}}\]
Z is related to \(x\) by the previous identity, but we introduced \(z\) to get a simpler equation. Plugging in for \(x\), we find
\[\left( z + \frac{7}{2} \right)^{2} - 7\left( z + \frac{7}{2} \right) + 9 = 0\]
After expanding:
\[z^{2} + 7z + \frac{49}{4} - 7z - \frac{49}{2} + 9 = 0\]
We notice that both linear terms containing \(z\) cancel out!
\[z^{2} + \boxed{7z} - \boxed{7z} - \frac{13}{4} = 0\]
This is now a simple equation:
\[z^{2} - \frac{13}{4} = 0\]
We can now easily solve it in two steps by moving the constant: \(z^{2} = \frac{13}{4}\), then taking square roots:
\[z = \pm \frac{\sqrt{13}}{2}\]
To get the solution for the variable that we are really looking for, we can back substitute: \(x = z + \frac{7}{2}\). Therefore,
\[x = \frac{7 \pm \sqrt{13}}{2}\]
Now we can use this method to solve for \(x\) in the general case.
We start with the same steps as before:
\(ax^{2} + bx + c = 0\)
Divide by a:
\[x^{2} + \frac{b}{a}x + \frac{c}{a} = 0\]
Moving the constant:
\[x^{2} + \frac{b}{a}x = - \frac{c}{a}\]
We now substitute \(z\) to get rid of the linear term. We set \(x = z - \frac{b}{2a}\).
We can now substitute this expression into our original equation, giving
\[\left( z - \frac{b}{2a} \right)^{2} + \frac{b}{a}\left( z - \frac{b}{2a} \right) = - \frac{c}{a}\]
Expanding gives us
\[z^{2} - \frac{b}{a}z + \frac{b^{2}}{4a^{2}} + \frac{b}{a}z - \frac{b^{2}}{2a^{2}} = - \frac{c}{a}\]
We notice that the linear \(z\) terms cancel out!
Collecting all like terms, we end up with
\[z^{2} - \frac{b^{2}}{4a^{2}} = - \frac{c}{a}\]
which is much easier to solve!
Moving the constant to the right side and simplifying, we now have
\[z^{2} = \frac{b^{2} - 4ac}{4a^{2}}\]
Therefore
\[z = \frac{\pm \sqrt{b^{2} - 4ac}}{2a}\]
Because \(x = z - \frac{b}{2a}\), we can substitute our expression for \(z\) to find \(x\), what we are really looking for:
\[x = \frac{- b \pm \sqrt{b^{2} - 4ac}}{2a}\]
The Golden Ratio
Definition
An ancient problem in geometry leads to an interesting quadratic equation.3 Draw a line segment then divide it up into a short segment and a long segment. How could we divide it up such that the ratio of the long segment to the short segment, \(\frac{\mathcal{l}}{s}\), is the same as the whole line to the long segment \(\frac{\mathcal{l +}s}{\mathcal{l}}\)?
Now, we can set up an equation:
\[\frac{\mathcal{l}}{s} = \frac{\mathcal{l +}s}{\mathcal{l}}\]
We can assume that \(s = 1\), because with any line segment, we can scale it down to these proportions. Now we have an equation to solve for l, our ratio.
\[\mathcal{l =}\frac{\mathcal{l +}1}{\mathcal{l}}\]
Multiplying by l on both sides, we obtain a quadratic
\[\mathcal{l}^{2}\mathcal{= l +}1\]
We can solve by the usual means of completing the square. We move all the variable terms to one side:
\[\mathcal{l}^{2}\mathcal{- l} = 1\]
To complete the square, we add on \(\left( \frac{b}{2} \right)^{2}\), which is \(\frac{1}{4}\) in this case:
\[\mathcal{l}^{2}\mathcal{- l +}\frac{1}{4} = \frac{5}{4}\]
Now we can rewrite the left side as a perfect square:
\[\left( \mathcal{l -}\frac{1}{2} \right)^{2} = \frac{5}{4}\]
Now we can easily solve the equation by taking square roots:
\[\mathcal{l -}\frac{1}{2} = \pm \frac{\sqrt{5}}{2}\]
Therefore
\[\mathcal{l =}\frac{1 \pm \sqrt{5}}{2}\]
This equation has given us one positive and one negative solution. Only the positive solution makes geometric sense, with the line example, so \(\mathcal{l =}\frac{1 + \sqrt{5}}{2}\).
This constant is known as the golden ratio, often denoted by the Greek letter phi (\(\Phi\)). \(\Phi\) is approximately 1.618. The golden ratio has many amazing properties, both geometric and algebraic. In fact, the pentagram is traditionally associated with the Pythagoreans, an ancient mathematical society devoted to numbers and ratios.4 It contains the golden ratio everywhere.
\[\boxed{\Phi = \ \frac{1 + \sqrt{5}}{2}}\]
Geometric Properties
If I take a regular pentagon with side lengths 1, then draw diagonals:
The diagonals have length \(\Phi\)! Moreover, the golden ratio occurs several more times in the pentagram, as ratios between various lengths:
If we draw a rectangle with side lengths of 1 and \(\Phi\):
We can take a square off one side, like this:
And by our defining equation for the golden ratio, we can prove that the small rectangle on the right is also a golden rectangle!
We can continue to take off squares in the same fashion, because all of the small rectangles are still golden.
This image is often decorated with quarter circles inside the squares, to form the famous golden spiral, a special spiral that looks the same at every scale!
The Fibonacci Sequence
The golden ratio also has deep connections to a sequence of numbers known as the Fibonacci numbers. To construct this sequence, start with the numbers 0 and 1. Then, each next number is the sum of the previous two numbers. So, the sequence goes 0,1,1,2,3,5,8,13,21…
This sequence can be visualized by drawing rectangles. First, construct a 1x1 square (the second and third Fibonacci numbers). Next, draw a square next to the original, with the dimensions of one side. The new rectangle is now 2x1. Repeating this process yields a 3x2 rectangle, then a 5x3, then 8x5. All of these rectangles have dimensions corresponding to the Fibonacci numbers!
What’s more, if we take the ratios of the side lengths, \(1,\ \frac{2}{1},\ \frac{3}{2},\ \frac{5}{3},\frac{8}{5},\frac{13}{8}\)… they approach the golden ratio!
For example, \(\frac{5}{3} \approx 1.67\), while \(\frac{8}{5} = 1.6\) and \(\frac{13}{8} = 1.625\). It does in fact look like these are tending toward the golden ratio! Even more magical, you can start this recurrence with any two positive numbers, and the ratios of consecutive terms will tend towards the golden ratio!
This golden ratio isn’t just a mathematical construct; it even shows up in the real world! For example, some pinecones have shapes very similar to the golden spiral. It also shows up in sunflowers.5
While the golden ratio may be very famous for its geometric properties and artistic appeal, it has an infinite number of lesser-known cousins, known as the metallic means.
The Metallic Means
To demonstrate this, what if, instead of taking off one square to get a similar rectangle, we take off two?
If we scale the short side to 1 and call the long side \(s\), we get a new equation of
\[s^{2} = 2s + 1\]
After solving, we find
\[s = \sqrt{2} + 1 \approx 2.414\]
This constant is called the silver ratio, to show it is related to the golden ratio. The silver ratio has many analogues of the properties of the golden ratio. Just like how the golden ratio occurs in the diagonals of a pentagon, the silver ratio is the length of a diagonal spanning three sides of a regular octagon with unit side length:
The ratios of consecutive Fibonacci numbers tend towards the golden ratio, and ratios from a similar sequence can approximate the silver ratio.
This time, instead of just adding the numbers together, we multiply the last entry by 2, then add the numbers together. Starting with 0 and 1, we get the sequence of \(0 + (2*1) = 2\), then \(1 + (2*2) = 5\), then \(2 + 2*5 = 12\), so our sequence is 1, 2, 5, 12… This can also be represented by rectangles similar to the golden ratio, but this time we are adding two squares instead of one.
In a similar fashion, we can define the bronze ratio (β) to be the aspect ratio of a rectangle where you take three squares off and get a similar rectangle. Its defining equation is
\(b^{2} = 3b + 1\), so \(b = (3 + \sqrt{13})/2\)

It also has a geometric interpretation in a regular 13-gon with unit side length: \(b = D_{1} + D_{3} + D_{4} - D_{5}\), where \(D_{k}\) is the chord joining vertices \(k\) steps apart. Here \(D_{1}\) is a side, so this is a combination of chord lengths, not a single diagonal.6
We can keep constructing more numbers similar to the golden/silver/bronze ratios. This family of constants is known as the metallic means, and they all share similar properties.
The nth metallic ratio satisfies the quadratic equation \(x^{2} - nx - 1 = 0\).
\[\boxed{x_{n}\ = \ \frac{n\ + \ \sqrt{n^{2}\ + \ 4}}{2}}\]
For the nth metallic rectangle, you need to remove n squares to get a similar rectangle.
In addition, to construct a sequence whose consecutive-term ratios tend towards the nth metallic ratio,
Start with \(M_{0} = 0\) and \(M_{1} = 1\)
and use the relation \(M_{a} = {n*M}_{a - 1} + M_{a - 2}\) for \(a \geq 2\)
Then \(M_{a}/M_{a - 1}\) tends towards that ratio as a grows, starting with \(a \geq 2\) so the denominator is nonzero.
We have found several ways to solve quadratic equations and seen how their solutions turn up in geometry and number patterns. What happens when the highest power is three instead of two?
Footnotes
Modern adaptation of YBC 4663, Problem 8; Alexander Jones, Numbers on Clay (ISAW, 2010), 2.↩︎
J. J. O’Connor and E. F. Robertson, “François Viète,” MacTutor History of Mathematics Archive, University of St Andrews, accessed October 14, 2026, https://mathshistory.st-andrews.ac.uk/Biographies/Viete/.↩︎
Euclid, Elements, VI, definition 3, online edition by David E. Joyce, Clark University, accessed October 14, 2026, https://mathcs.clarku.edu/~djoyce/elements/bookVI/defVI3.html.↩︎
Lucian, “A Slip of the Tongue in Salutation,” sec. 5, in The Works of Lucian of Samosata, trans. H. W. Fowler and F. G. Fowler (Oxford: Clarendon Press, 1905), https://lucianofsamosata.info/wiki/doku.php?id=home:texts_and_library:essays:a-slip-of-the-tongue-in-salutation.↩︎
For Fibonacci patterns in sunflower seedheads, including non-Fibonacci exceptions, see Jonathan Swinton, Erinma Ochu, and The MSI Turing’s Sunflower Consortium, “Novel Fibonacci and Non-Fibonacci Structure in the Sunflower: Results of a Citizen Science Experiment,” Royal Society Open Science 3, no. 5 (2016): 160091, https://doi.org/10.1098/rsos.160091.↩︎
For metallic rectangles and the distinction between the bronze mean and a single polygon diagonal-to-side ratio, see Antonia Redondo Buitrago, “Polygons, Diagonals, and the Bronze Mean,” Nexus Network Journal 9 (2007): 321–326, https://doi.org/10.1007/s00004-007-0046-x.↩︎