### Quick description

A quadratic equation is an equation like : it takes an unknown and forms an equation out of , and a number. This article explains several approaches to solving equations of this kind, ending up with the famous formula , which is the formula for the roots of the equation . One of the themes of this article is that there are many circumstances where one should *not* use this formula.

### Prerequisites

Before trying to understand quadratic equations you need to understand about multiplying out brackets. For example, you should know how to work out that , though in one or two places this article has reminders about how this process works. (These reminders can be found if you click on text that is underlined with a dotted line.) More generally, you should also be comfortable with the idea of letting letters stand for numbers. You will also need to know about negative numbers, and to know basic facts about them, such as that the product of two negative numbers is always positive.

### Method 1: factorizing by trial and error

Let us think about the example above, of the equation . It turns out that if you multiply by you get . To see this in more detail, note that

This is very helpful, because if you have two numbers that multiply together to give 0, then one of the two numbers has to be 0. Therefore if we can deduce that or , which tells us that is either 1 or 2.

It may seem as though the problem is now completely solved, but mathematicians like to be careful under circumstances like this. Strictly speaking, what we have shown is that *if* , *then* is either 1 or 2; but we have not shown that and are solutions to the equation . (To put that another way, we know that we cannot have any solutions *other* than 1 or 2, but we still haven't checked that 1 and 2 are solutions.)

So let us quickly check this: if then , and if then So 1 and 2 are indeed solutions. A better way of seeing that they are both solutions is to note that they are obviously both solutions of the equation , which, as we have seen, is a rewriting of the original equation.

**Very important point:** quadratic equations can (and usually do) have more than one solution.

So far, we do not have anything like a *method* for solving quadratic equations: in the above example, once we had been shown that was equal to , it was then straightforward to solve the equation. But what do you do if there is nobody to give you a big clue like this?

Let's think about this question with the help of another example: the equation . What we would very much like is two numbers and with the property that , since then we would be able to use exactly the same reasoning as we used for .

How do we find such a pair of numbers and ? The question is difficult as it stands because looks very different in form from . But we can do something about that: we just have to multiply out the brackets. Then we get , which equals . This is because

In words, we would like and to add up to 3 and to multiply together to give -10. This tells us straight away that one of and needs to be negative and one positive. Let's go for being positive and being negative, and let's write , where is positive. If we do that, then what we want in terms of and is that should equal 3, and should equal 10. Can we find two numbers with a difference of 3 that multiply together to give 10? Yes of course we can: 2 and 5. So we take to be 5 and to be 2, which tells us that is -2.

If and , then , so what we have just shown is that can be rewritten as . Therefore, the equation is equivalent to the equation . And now we see that one of or must be 0, so or .

What we have just done is called *factorizing* the expression : we have written it as a product of the two factors and . We did that by searching for factors of the form and , working out what properties and would have to have, and then finding a pair of numbers and that had those properties. It is actually more usual (though mathematically less natural) to search for factors of the form and , so let us quickly rerun the argument in its more usual form.

First, we multiply out to obtain . This tells us that we want to find and with and . And this time we find that we can take and , which gives us again.

**Summary of method 1.** If you want to write in the form then you need to find and that add up to and multiply together to give . This works even if one or both of and is negative. Sometimes one can find such a pair and by simple trial and error.

### General discussion

Let's try this method with the equation . Method 1 tells us to look for two numbers and that add up to 4 and multiply together to give 2. This is impossible unless and are both positive. Why? Well, if , then and are either both positive or both negative. But if they are both negative then cannot equal 4. But the only way of getting and to multiply together to give 2, at least if they are both whole numbers, is to take and or vice versa. But 1 and 2 do not add up to 4.

Could we perhaps find and that are *not* whole numbers, with and ? This is the question we shall think about next.

It doesn't seem to be easy to find a pair and of this kind by trial and error. We want to do something more systematic. So let's see if we can solve the pair of simultaneous equations and . A natural way of doing this is to use the first equation to tell us that and to substitute this into the second equation. If we do that then the second equation becomes . Multiplying out the bracket gives us , and if we take everything over to the right-hand side then we get , which we could rewrite as . Now we have an equation in just one variable. Can we solve it?

Unfortunately, apart from the fact that the variable is called rather than , this equation is exactly the equation we started with! Our attempt to solve the original equation systematically has led us round in a big circle. Before we see how to break out of this circle, let us discuss another method for solving quadratic equations.

### Method 2: some kinds of quadratic equations are easy to solve

A quadratic equation doesn't have to be in the form . For example, is a quadratic equation, since it is equivalent to the equation (as you will see if you multiply out the brackets). And if you are asked to solve the equation then the answer is easy: must be or .

Here's another easy quadratic equation: . Here the coefficient of is 0, and this is what makes the equation easy: all we have to do is rearrange it as , and we see immediately that the answer is .

**Very important principle.** If you know that is equal to a positive number then what you know about is that it is equal to either or . This is what underlies the fact that quadratic equations tend to have two solutions.

Can we extend our repertoire of quadratic equations that are easy to solve? Yes we can. Here's a variant of the equation we've just solved: . What that equation says is that if you take , subtract 3 from it and square the result then you get 5. So to get all you have to do is reverse the process: take (plus or minus) square roots and add 3. That is, we start by deducing that and from that we obtain the solution .

It is very important to understand that this slightly complicated looking-expression is not just the solution of the equation —it is *obviously* the solution. And the reason it's obvious is a combination of the argument in the previous paragraph and the simple observation that if you subtract 3 from either or and square the result then you will get 5.

**Another important principle:** any equation of the form is easy to solve, and the solution is .

One can of course also solve equations of the form : this time the solution will be .

### Method 3: completing the square

Why is it interesting to discuss special cases where it happens to be easy to solve quadratic equations? It doesn't seem to help us with the equation , for instance. What are we supposed to do when a quadratic equation is not given to us in a nice convenient form that makes it easy to solve?

Well, the idea of method 1 was to *put* an equation into a convenient form, in that case a form such as or . The problem was that when we tried to find a systematic way of doing that, we ended up back where we started. But that doesn't imply that we will *always* end up back where we started whenever we try to put a quadratic equation into a convenient form. So why don't we take the equation and try to put it into the form , which we know how to solve?

Again, if we want to be systematic about this, then what we should do is rewrite the equation and see what we can learn about and if we are to obtain the equation . So we expand the bracket in the equation to obtain , and then we bring over to the left-hand side to obtain .

This will be the same as the equation if and . And luckily for us this has given us two equations for and that are very easy to solve: we just solve the first one to get , and plug that into the second one to get , which tells us that as well.

What this shows is that we can rewrite the equation as . (If you want to check this, then expand and rearrange the second equation. But we know we'll get the first equation because we carefully chose and to make sure that that would happen.) And now we have an equation in a form that we know how to solve: the solution is .

This process is called *completing the square*. The idea is that when we have an equation like , we regard as part of a squared bracket—that is, something of the form . Now , so since our partial square is , we had better take to be 2. Then we get . This addition of 4 "completes" and makes it into . Of course, we can't just add 4 unless we subtract it again, so the correct thing to say is that . From this it follows that , so the equation is equivalent to the equation .

### Quadratic equations where the leading coefficient is not 1

So far we have been looking at equations of the form . But quadratic equations can be more general than this. For example, the equation is a quadratic equation, but now there is a coefficient of 2 in front of .

It is sometimes possible to solve these more general quadratic equations by trial and error, just as it is for the simpler ones. One way of doing it for this example is to write and see what we can say about , , and . Multiplying out the brackets on the right-hand side gives us

So we would like to be 2, to be 7, and to be -4.

This looks quite complicated, but because 2 is a small number, if there is going to be an easy solution then it won't take too long to find it. Let's try taking and . Then we need to be 7 and to be -4. That tells us that will have to be odd (if it's a whole number) so we don't have much choice other than and or and . Of these two possibilities, only the second gives us , so we end up taking and .

Putting all this back, we have shown that , so the solution to the equation is or .

**Useful fact.** If the leading coefficient is not zero, then there may be solutions given by simple fractions.

In fact, a sort of converse to this statement is also true: if the leading coefficient is 1 (that is, if the equation is of the easier form ), then solutions must either be whole numbers or irrational numbers.

What if we want to solve the more general quadratic equations more systematically in cases where trial and error doesn't work? In that case there is a simple trick: divide the whole equation by the leading coefficient. For example, the above equation is clearly equivalent to the equation . And now we're back to the first situation.

Notice that we can solve the equation by our first trial-and-error method: we need two numbers that add up to and multiply together to give 2. It seems likely that one of the numbers will be a multiple of 1/2, and once one is thinking along those lines it doesn't take too long to come up with and , which leads us to the equation , which again gives the solution or . (We didn't quite get the same product of brackets as before, but it's equivalent, since if and only if .)

### Method 4: the quadratic formula

This article has attempted to convince you that there are several good ways of solving quadratic equations. Not every method is good for every single quadratic equation, but some methods, such as trial and error, are very short and simple *when they work*. So if you have a quadratic equation to solve, it is worth stopping for a few seconds to consider what the best method might be. Completing the square *always* works, and in that sense it is the best method. And since it always works, we can try applying it to a completely general quadratic equation to see what we get.

The first step is to divide everything by , to get . Now we complete to make it into a square . Since , we need to take . That is, for this value of we will have . In other words again, .

It follows that the equation is equivalent to the equation . This equation in its turn is equivalent to the equation .

We now have a slightly complicated looking equation, but it is easy to solve, since we can just take (plus or minus) square roots and then subtract from both sides. That is, first we note that and then we rearrange so that we can say .

This doesn't quite look like the usual quadratic formula. But if we multiply both sides by we find that . If this doesn't seem obvious to you, the reason is that multiplying a square root by is the same as multiplying what's inside the square root by , at least if you don't worry too much about which square root you are taking, which we don't need to here as we're taking *both* square roots. And now we can divide both sides by to obtain the usual formula . But if you prefer the formula we had at the end of the previous paragraph, it is just as valid.

If you have the appetite for more formulae, there is a nice one to remember for when the coefficient of has a factor of 2 in it. If you start with the quadratic equation , then the solution is .

## Comments

## Method 5

Sun, 19/04/2009 - 02:27 — Ricardo SandovalI just added method 5 but maybe it should put somewhere else in the article letting the last method be the quadratic formula.

Is that method really in the spirit of this Tricki? Or it should be somewhere else?

I just remembered this method from my reflections about the quadratic equation and felt it was a good idea.

Thanks for this great site everybody.

## I had a vague plan to convert

Sun, 19/04/2009 - 11:54 — gowersI had a vague plan to convert an old blog post of mine on solving cubics into a Tricki article. If so, then this Method 5 would fit in naturally there.

For now, the title of the method suggests a rather general idea, but I wonder whether it really is. Perhaps it should be given a more specific title such as "Think of a good substitution." In this case, the basic idea is to think of the two roots as and and solve for and which turns out to be easy. And one can motivate the idea by the observation that in specific instances we observe that the solutions are of the form

Added later: that article now exists