Main content

## College Algebra

### Course: College Algebra > Unit 5

Lesson 4: The quadratic formula- The quadratic formula
- Understanding the quadratic formula
- Worked example: quadratic formula (example 2)
- Worked example: quadratic formula (negative coefficients)
- Quadratic formula
- Using the quadratic formula: number of solutions
- Discriminant review

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# The quadratic formula

The quadratic formula helps us solve any quadratic equation. First, we bring the equation to the form ax²+bx+c=0, where a, b, and c are coefficients. Then, we plug these coefficients in the formula: (-b±√(b²-4ac))/(2a) . See examples of using the formula to solve a variety of equations. Created by Sal Khan.

## Want to join the conversation?

- How difficult is it when you start using imaginary numbers?(27 votes)
- Don't let the term "imaginary" get in your way - there is nothing imaginary about them. They are just extensions of the real numbers, just like rational numbers (fractions) are an extension of the integers. Remember when you first started learning fractions, you encountered some different rules for adding, like the common denominator thing, as well as some other differences than the whole numbers you were used to. It seemed weird at the time, but now you are comfortable with them. Well, it is the same with imaginary numbers. They have some properties that are different from than the numbers you have been working with up to now - and that is it.

The name "imaginary number" was coined in the 17th century as a derogatory term, as such numbers were regarded by some as fictitious or useless. The term "imaginary number" now means simply a complex number with a real part equal to 0, that is, a number of the form bi.

"What's that last bit, complex number and bi" you ask?!

You'll see when you get there. Meanwhile, try this to get your feet wet:

https://www.mathsisfun.com/numbers/imaginary-numbers.html

NOTE: The Real Numbers did not have a name before Imaginary Numbers were thought of. They got called "Real" because they were not Imaginary. Really!(62 votes)

- i know how to do the quadratic formula, but my teacher gave me the problem ax squared + bx + c = 0 and she says a is not equal to zero, what are the solutions. i am not sure where to begin(17 votes)
- The solutions are just what the x values are! So you just take the quadratic equation and apply it to this. In Sal's completing the square vid, he takes the exact same equation (ax^2+bx+c = 0) and he completes the square, to end up isolating x and forming the equation into the quadratic formula. In other words, the quadratic formula is simply just ax^2+bx+c = 0 in terms of x. So the roots of ax^2+bx+c = 0 would just be the quadratic equation, which is:

(-b+-√b^2-4ac) / 2a. Hope this helped!(34 votes)

- I feel a little stupid, but how does he go from 100 to 10?4:30, thanks a lot!(21 votes)
- The square root fo 100 = 10.

Square roots reverse an exponent of 2.

Since 10^2 = 100, then square root 100 = 10.(20 votes)

- At13:35, how was he able to drop the 2 out of the equation?

Thanks!(12 votes)- Sal skipped a couple of steps.

Factor out a GCF = 2:`[ 2 ( -6 +/- √39 )] / (-6)`

The common facgtor of 2 is then cancelled with the -6 to get:`( -6 +/- √39 ) / (-3)`

Hope this helps.(13 votes)

- I still do not know why this formula is important, so I'm having a hard time memorizing it.(11 votes)
- Some quadratic equations are not factorable and also would result in a mess of fractions if completing the square is used to solve them (example: 6x^2 + 7x - 8 = 0). The quadratic formula is most efficient for solving these more difficult quadratic equations.

Have a blessed, wonderful day!(13 votes)

- how to find the quadratic equation when the roots are given?(7 votes)
- Let's say that P(x) is a quadratic with roots x=a and x=b. This means that P(a)=P(b)=0. This is true if P(x) contains the factors (x - a) and (x - b), so we can write

P(x) = (x - a)(x - b).

Notice:

P(a) = (a - a)(a - b) = 0(a - b) = 0.

P(b) = (b - a)(b - b) = (b - a)0 = 0.

Since P(x) = (x - a)(x - b), we can expand this and obtain

P(x) = x² - bx - ax + ab = x² - (a + b)x + ab.(16 votes)

- if the "complete the square" method always works what is the point in remembering this formula?(7 votes)
- Completing the square can get messy. You will sometimes get a lot of fractions to work thru. In those situations, the quadratic formula is often easier.(14 votes)

- I just watched the video and I can hardly remember what it is, much less how to solve it. My head is spinning on trying to figure out what it all means and how it works. Can someone else explain how it works and what to do for the problems in a different way?(5 votes)
- https://www.khanacademy.org/math/algebra/quadratics/solving-quadratics-using-the-quadratic-formula/v/proof-of-quadratic-formula

the proof might help you understand why it works(14 votes)

- How do you know whether to add or subtract when using the formula?(3 votes)
- If you are referring to the +/- that is before the square root, you end up doing both. Quadratic equations will have 2 solutions unless the square root = 0, then it degrades to just one solution. The +/- in front of the square root is what creates the two different solutions. One solution is calculated using "+" and the other is created with the "-".

Hope this helps.(9 votes)

- What's the main reason the Quadratic formula is used? Is there like a specific advantage for using it?(4 votes)
- Yes. You see, there are times when a quadratic may not be able to be factored (mainly a method called "
**completing the square**"), or factoring it will produce some strange irrational results if we use the method of factoring. The quadratic formula, however, virtually gives us the same solutions, while letting us see what should be applied the square root (instead of us having to deal with the irrational values produced in an attempt to factor it).(6 votes)

## Video transcript

In this video, I'm going to
expose you to what is maybe one of at least the top five
most useful formulas in mathematics. And if you've seen many of my
videos, you know that I'm not a big fan of memorizing
things. But I will recommend you
memorize it with the caveat that you also remember how to
prove it, because I don't want you to just remember
things and not know where they came from. But with that said, let me
show you what I'm talking about: it's the quadratic
formula. And as you might guess, it is to
solve for the roots, or the zeroes of quadratic equations. So let's speak in very general
terms and I'll show you some examples. So let's say I have an equation
of the form ax squared plus bx plus
c is equal to 0. You should recognize this. This is a quadratic equation
where a, b and c are-- Well, a is the coefficient on the x
squared term or the second degree term, b is the
coefficient on the x term and then c, is, you could imagine,
the coefficient on the x to the zero term, or it's
the constant term. Now, given that you have a
general quadratic equation like this, the quadratic formula
tells us that the solutions to this equation are
x is equal to negative b plus or minus the square root of
b squared minus 4ac, all of that over 2a. And I know it seems crazy and
convoluted and hard for you to memorize right now, but as you
get a lot more practice you'll see that it actually is a pretty
reasonable formula to stick in your brain someplace. And you might say, gee, this is
a wacky formula, where did it come from? And in the next video I'm
going to show you where it came from. But I want you to get used to
using it first. But it really just came from completing
the square on this equation right there. If you complete the square here,
you're actually going to get this solution and that
is the quadratic formula, right there. So let's apply it to some
problems. Let's start off with something that we could have
factored just to verify that it's giving us the
same answer. So let's say we have x
squared plus 4x minus 21 is equal to 0. So in this situation-- let me
do that in a different color --a is equal to 1, right? The coefficient on the
x squared term is 1. b is equal to 4, the coefficient
on the x-term. And then c is equal
to negative 21, the constant term. And let's just plug it in the
formula, so what do we get? We get x, this tells us that
x is going to be equal to negative b. Negative b is negative 4-- I put
the negative sign in front of that --negative b
plus or minus the square root of b squared. b squared is 16, right? 4 squared is 16, minus 4 times
a, which is 1, times c, which is negative 21. So we can put a 21 out there
and that negative sign will cancel out just like that with
that-- Since this is the first time we're doing it, let me
not skip too many steps. So negative 21, just so you
can see how it fit in, and then all of that over 2a. a is 1, so all of that over 2. So what does this simplify, or
hopefully it simplifies? So we get x is equal to negative
4 plus or minus the square root of-- Let's see we
have a negative times a negative, that's going to
give us a positive. And we had 16 plus, let's see
this is 6, 4 times 1 is 4 times 21 is 84. 16 plus 84 is 100. That's nice. That's a nice perfect square. All of that over 2, and so this
is going to be equal to negative 4 plus or
minus 10 over 2. We could just divide both of
these terms by 2 right now. So this is equal to negative 4
divided by 2 is negative 2 plus or minus 10 divided
by 2 is 5. So that tells us that x could be
equal to negative 2 plus 5, which is 3, or x could be equal
to negative 2 minus 5, which is negative 7. So the quadratic formula
seems to have given us an answer for this. You can verify just by
substituting back in that these do work, or you could even
just try to factor this right here. You say what two numbers when
you take their product, you get negative 21 and when you
take their sum you get positive 4? So you'd get x plus 7
times x minus 3 is equal to negative 21. Notice 7 times negative 3 is
negative 21, 7 minus 3 is positive 4. You would get x plus-- sorry
it's not negative --21 is equal to 0. There should be a 0 there. So you get x plus 7 is equal
to 0, or x minus 3 is equal to 0. X could be equal to negative
7 or x could be equal to 3. So it definitely gives us the
same answer as factoring, so you might say, hey why bother
with this crazy mess? And the reason we want to bother
with this crazy mess is it'll also work for problems
that are hard to factor. And let's do a couple of
those, let's do some hard-to-factor problems
right now. So let's scroll down to get
some fresh real estate. Let's rewrite the formula again,
just in case we haven't had it memorized yet. x is going
to be equal to negative b plus or minus the square root
of b squared minus 4ac, all of that over 2a. I'll supply this to
another problem. Let's say we have the equation
3x squared plus 6x is equal to negative 10. Well, the first thing we want
to do is get it in the form where all of our terms or on the
left-hand side, so let's add 10 to both sides
of this equation. We get 3x squared plus the
6x plus 10 is equal to 0. And now we can use a
quadratic formula. So let's apply it here. So a is equal to 3. That is a, this is b and
this right here is c. So the quadratic formula
tells us the solutions to this equation. The roots of this quadratic
function, I guess we could call it. x is going to be equal
to negative b. b is 6, so negative 6
plus or minus the square root of b squared. b is 6, so we get 6 squared
minus 4 times a, which is 3 times c, which is 10. Let's stretch out the radical
little bit, all of that over 2 times a, 2 times 3. So we get x is equal to negative
6 plus or minus the square root of 36 minus-- this
is interesting --minus 4 times 3 times 10. So this is minus-- 4
times 3 times 10. So this is minus 120. All of that over 6. So this is interesting, you
might already realize why it's interesting. What is this going
to simplify to? 36 minus 120 is what? That's 84. We make this into a 10,
this will become an 11, this is a 4. It is 84, so this is going to be
equal to negative 6 plus or minus the square root of-- But
not positive 84, that's if it's 120 minus 36. We have 36 minus 120. It's going to be negative
84 all of that 6. So you might say, gee,
this is crazy. What a this silly quadratic
formula you're introducing me to, Sal? It's worthless. It just gives me a square root
of a negative number. It's not giving me an answer. And the reason why it's not
giving you an answer, at least an answer that you might want,
is because this will have no real solutions. In the future, we're going to
introduce something called an imaginary number, which is a
square root of a negative number, and then we can actually
express this in terms of those numbers. So this actually does have
solutions, but they involve imaginary numbers. So this actually has no real
solutions, we're taking the square root of a negative
number. So the b squared with the b
squared minus 4ac, if this term right here is negative,
then you're not going to have any real solutions. And let's verify that
for ourselves. Let's get our graphic calculator
out and let's graph this equation right here. So, let's get the graphs that y
is equal to-- that's what I had there before --3x squared
plus 6x plus 10. So that's the equation and we're
going to see where it intersects the x-axis. Where does it equal 0? So let me graph it. Notice, this thing just comes
down and then goes back up. Its vertex is sitting here
above the x-axis and it's upward-opening. It never intersects
the x-axis. So at no point will this
expression, will this function, equal 0. At no point will y equal
0 on this graph. So once again, the quadratic
formula seems to be working. Let's do one more example,
you can never see enough examples here. And I want to do ones that are,
you know, maybe not so obvious to factor. So let's say we get negative 3x
squared plus 12x plus 1 is equal to 0. Now let's try to do it just
having the quadratic formula in our brain. So the x's that satisfy this
equation are going to be negative b. This is b So negative b is
negative 12 plus or minus the square root of b squared, of
144, that's b squared minus 4 times a, which is negative 3
times c, which is 1, all of that over 2 times a, over
2 times negative 3. So all of that over negative 6,
this is going to be equal to negative 12 plus or
minus the square root of-- What is this? It's a negative times a negative
so they cancel out. So I have 144 plus 12, so
that is 156, right? 144 plus 12, all of that
over negative 6. Now, I suspect we can
simplify this 156. We could maybe bring
some things out of the radical sign. So let's attempt to do that. So let's do a prime
factorization of 156. Sometimes, this is the hardest
part, simplifying the radical. So 156 is the same thing
as 2 times 78. 78 is the same thing
as 2 times what? That's 2 times 39. So the square root of 156 is
equal to the square root of 2 times 2 times 39 or we could say
that's the square root of 2 times 2 times the
square root of 39. And this, obviously, is just
going to be the square root of 4 or this is the square root
of 2 times 2 is just 2. 2 square roots of 39, if I
did that properly, let's see, 4 times 39. Yeah, it looks like
it's right. So this up here will simplify to
negative 12 plus or minus 2 times the square root of 39, all
of that over negative 6. Now we can divide the numerator
and the denominator maybe by 2. So this will be equal to
negative 6 plus or minus the square root of 39
over negative 3. Or we could separate these
two terms out. We could say this is equal to
negative 6 over negative 3 plus or minus the square root
of 39 over negative 3. Now, this is just a 2
right here, right? These cancel out, 6 divided
by 3 is 2, so we get 2. And now notice, if this is plus
and we use this minus sign, the plus will become
negative and the negative will become positive. But it still doesn't
matter, right? We could say minus or plus,
that's the same thing as plus or minus the square root
of 39 nine over 3. I think that's about as simple
as we can get this answered. I want to make a very clear
point of what I did that last step. I did not forget about
this negative sign. I just said it doesn't matter. It's going to turn the positive
into the negative; it's going to turn the negative
into the positive. Let me rewrite this. So this right here can be
rewritten as 2 plus the square root of 39 over negative 3 or 2
minus the square root of 39 over negative 3, right? That's what the plus or minus
means, it could be this or that or both of them, really. Now in this situation, this
negative 3 will turn into 2 minus the square root
of 39 over 3, right? I'm just taking this
negative out. Here the negative and the
negative will become a positive, and you get 2
plus the square root of 39 over 3, right? A negative times a negative
is a positive. So once again, you have
2 plus or minus the square of 39 over 3. 2 plus or minus the square
root of 39 over 3 are solutions to this equation
right there. Let verify. I'm just curious what the
graph looks like. So let's just look at it. Let me clear this. Where is the clear button? So we have negative 3 three
squared plus 12x plus 1 and let's graph it. Let's see where it intersects
the x-axis. It goes up there and then
back down again. So 2 plus or minus the square,
you see-- The square root of 39 is going to be a little
bit more than 6, right? Because 36 is 6 squared. So it's going be a little bit
more than 6, so this is going to be a little bit
more than 2. A little bit more than 6 divided
by 2 is a little bit more than 2. So you're going to get one value
that's a little bit more than 4 and then another value
that should be a little bit less than 1. And that looks like the case,
you have 1, 2, 3, 4. You have a value that's pretty
close to 4, and then you have another value that is a little
bit-- It looks close to 0 but maybe a little bit
less than that. So anyway, hopefully you found
this application of the quadratic formula helpful.