Understanding the Quadratic Formula
Transcript
Hello and welcome to the very first episode of Lockdown Math. So in this first lecture, what I'm going to talk with you guys about is the quadratic formula. And traditionally, I think the quadratic formula is one of the most famously memorized things in high school. We almost all kind of have this song that sings in our head related to it. And yet, if you actually ask someone, how often do you expect you're going to be using this in the real world? I mean, how many people are going to give an answer that's greater than zero to that question? Now what I want to do is give you guys a lesson regarding the quadratic formula that's a little bit different from the traditional approach. And the main thing I want to focus on is connecting it to other common patterns in math that are useful for general problem solving. Now the tactic that I'm going to talk through,
it's not the usual completing the squares bit that some people will learn in high school. And when you learn that, you often think, okay, in principle, I could re-derive the quadratic formula, but frankly, it's going to be a bit of a pain. What I will talk about is somewhat similar to something that Po Shen-Lo put out a couple months ago. For those of you who don't know him, he has a YouTube channel, but more than that, he's the coach of the USIMO team, and he has a company called X-Py, does a lot of great math stuff. So he talked about kind of an alternate way that we could teach the quadratic formula. The way I'm going to talk about it is a little bit different from how he did, but certainly very similar in spirit. Again, the upshot that I want you guys to come away with is the fact that you should connect this to other common patterns in math so as to make yourself a better problem solver.
And that should be the main takeaway lesson for, you know, this particular topic. Now these lectures in general, I'm going to be shooting for something roughly on the order of an hour for each one of them, and the dynamic that I'm going for is one where there's questions that I'm asking the audience, and then the audience interacts with it in a very, well, in a very live way. Now the thing about live stuff though is sometimes it doesn't go the way that you intended. So the general technology that we're going to have for this is going to involve me pulling up some kind of question, like for example right here, the question is asking kind of facetiously about your relationship with the quadratic formula. And I even had this going over the intro animation for you guys. And then what you see is the statistics associated with what the answers, you know, other people are entering are. And they'll kind of get overlaid, we see the bars.
At the moment all you see are question marks. We don't know what the most common answer was, but at some point I can choose to grade that and then we'll see. Except for the fact that it looks like there's quite a few of you guys and it's giving our servers a little bit of trouble. So we have a couple people who are going to be working on that in the background. In the meantime I'll just be asking the questions that are pushing us through the lesson. For future streams this will hopefully be a much more dynamic situation where as you answer we're kind of grading it and you see how it's going. For this particular one, who knows, some magic might happen halfway through. But there's a lot of excitement among you guys right now which is awesome and I love that. And let's see if we can translate that into some of the math itself. So one of the questions that I was going to ask is how many times do you expect to use the quadratic formula? And when we were doing this a little bit earlier with a couple people, for sure the most common answer was zero.
Zero times is when I think I'll use the quadratic formula outside of school. And a funny story about that, I actually was once giving this talk at Pixar where I brought it up as this example of something that we teach every student and it's unclear why. They're not going to use it. And I should have known better than to say this to a bunch of engineers at Pixar because one of them looked at me and he was like oh I'll have you know I actually use the quadratic formula all the time. His name was Tim Babb and he very kindly sent over basically a storyboard for a video, something I think he was pitching me on. And the basic idea he was talking through an image that he created purely with computer graphics. I think this is totally beautiful. You would think that this is a photograph of some reflective billiard balls but this is entirely computer graphics. And the tactics used behind this involve something called ray tracing.
So the basic idea there is you sort of imagine a camera shooting out a bunch of rays through each pixel of your screen and then depending on whether it hits the sphere and how it hits the sphere that tells you how to color each pixel. Now part of that problem though is to know hey if I'm shooting a ray in some direction will it hit a given sphere? And so what you might do is define a certain vector, you might imagine an amount of time that the beam of light is moving, and then you can come up with a graph for how close is that ray to the sphere as a function of time. And in some cases if it passes through the sphere you're going to have two solutions there. And once you work out the math it turns out this is a quadratic equation so what you need is a systematic way to plug in these solutions to a quadratic equation and it needs to be programmatic it needs to be some kind of formula because you're doing this for every single pixel on the screen.
You also need to be able to know is it just glancing off of the sphere or does it not go through it at all? And again all of that comes down to solving a quadratic. And this particular engineer at Pixar he did a loose back of the envelope calculation for me that suggested the movie Coco probably used the quadratic formula over a trillion times just given how many lights there are for every single frame in that shot. So in some very real sense the quadratic formula is useful to the point of being used a trillion times to produce a movie. Nevertheless I don't necessarily think that's representative of most people's future and it could be the case that the reason we teach people this formula is because maybe they happen to be that Pixar employee. You never know what's going to be useful. But I want to make the case again that we can connect it to other patterns and problem solving bits in math. And the way that I'm going to go about this is to start in a place
that's frankly completely unrelated to quadratics and quadratic functions. I just want to talk about some mental math tricks. Because I think if you are thinking about arithmetic, something very basic, something we do in elementary school, and you think about it deeply enough, some of the patterns that you observe become relevant to stuff that you're doing later on. So for example let's say I ask you to factor the number 35. You know it's easy to see that five goes into it and goes into it seven times. Each of those is prime. Great! We know how to factor 35. Now factoring is kind of an annoying task the bigger the numbers get, especially if there's no obvious small factors that go into it. Because if I asked you, hey let's factor 143, I mean how do you go about it? I think the way a lot of us think about it is we initially think, okay, we know that two doesn't go into it because it's not even.
Three, there's a nice divisibility check where you do one plus four plus three, and that sum in this case is five plus three or eight is not divisible by three, so that's out. Five we can see doesn't go into it. Seven, okay you have to think about that for a moment, but you might see that seven goes into 140 evenly because that's 20 times seven. Okay so that's right out. And at this point you might be annoyed with whoever was asking you the question, but if you go one step further you might see, okay 11. Actually 11 does go into it and it ends up being 11 times 13.
I just love the fact that right now people probably have no idea what any of this has to do with the quadratic formula, but I assure you, highly related. Because what if I asked you 3,599? And this particular example isn't randomly chosen by the way. I was reading this article about a Russian programmer in an interview that he had, I think it was at Goldman Sachs, and he was describing kind of the intensity of that interview environment. And in one of them he just walks in the door, hadn't even met the person, and the person just shouts at him, factor 3,599.
You know the programmer's like, uh, all right. And he actually was able to spit out the factors particularly quickly, which is impressive given the fact that if we imagine going through all of the different primes, you know, does two go into it? No. Does three go into it? No. Five? No. You're going to be sitting there for quite a while. So clearly something different was happening in his head, and the question is, what? Well one thing you might notice about the numbers that I've chosen here is that 35 is awfully close to a square. It's actually just one less than six squared. And maybe it kind of makes sense that its factors are each kind of close to six. You know, five times seven, it's probably not going to equal six times six, but the fact that they're of similar sizes should be intuitive, and as it happens it's precisely one less. And something similar happens with the other example I chose.
143 is rather close to a square number, 144. In fact it's one less. And it's no coincidence that its two factors are hovering right around the square root of that value. One of them is 12 minus 1, and the other one is 12 plus 1. So it kind of makes sense that the product will be something around 12 times 12. And so from this you might make a guess that, hey, maybe any time that you have some number that's one less than a perfect square, and this, you know, it's suspiciously close to a very round seeming number, 3600.
Well, what is 3600? We recognize the 36 as being six squared and 100 is 10 squared, so that's 60 times 60. And maybe you think, okay, the guess, if it's going to follow the same pattern as what we've seen above, is that this would be one less than 60 times one more than 60. But of course you don't just want a pattern match. Let's see if there's a nice reason that it's a true. You can work it out algebraically, which we will, but as you guys know I love animation, so let's just see if there's a nice visual way to understand this particular property.
And if we're going to think about this, the natural place to turn is to think about squares. So let me just pull up an image of a square, and if we want to say, can I factor a number which is one less than a square, what I might have us imagine doing is taking the corner off of that square, okay? So let's say it's x by x, whatever x is, in this case it happens to be six, but you want to think a little bit more abstractly than that. And I'm going to take that bottom right corner, get it out of here, we don't want it. The question of factoring is to say, can I rearrange the quantity that remains into some kind of rectangle? And in this case if I take that bottom row, sloop it on up to the right, what you can see is it forms a rectangle, one with a side length x plus one, and another with a side length x minus one. So this general property holds quite well, and I think that's really cool, right?
You see this visually, you see that it's this neat mental arithmetic trick where any time you have some sort of square number minus one, you can factor that as x plus one times x minus one. But of course we can go one step further than that if we really want to. It doesn't have to be one sitting there. If we go back to our diagram, what you might instead do is say, hey, what if I chopped off a bigger corner of that square? What if I wasn't taking x squared minus one, I was taking x squared minus y squared? Well, I can rearrange what remains into a rectangle where it's x plus y on one side and then x minus y on the other side.
Now that's the geometric way that you can view it, which I think gives a certain satisfaction. And when we view it in terms of numbers, it gives us a reminder of how powerful it is. And yet somehow when we do this algebraically, the magic is a little bit lost. It's definitely easier to see, and that demonstrates the power of algebra. But if I just said x plus y times x minus y, actually, you know what, let me change the variable names there. I don't like x and y because those don't necessarily have the same meaning. What I might do is try to picture, you know, let's picture the original two numbers that we had, something that's like 59 and 61 on a number line. And I want to think in terms of the midpoint m and then the distance between m and each of the other numbers. So plus and minus d. In this case, d is just one, but in principle, it might be something more. So if I ask you multiply m minus d times m plus d,
you know, at this point, it's pretty straightforward algebra. The first term is m times m. We get m squared. Next, we have negative d times m. So that's minus d m. Next, we have m times plus d, m plus d. That's plus d and then negative d times d. So minus d squared. And indeed, what comes out is m squared minus d squared. And if you're anything like me, the first time you see this in an algebra class, it's just one of a whole bunch of exercises that you're doing. You're like, yeah, okay, can expand this one way. I guess some terms cancel out nicely.
But the more you think about this, the more intriguing it is, because any two numbers we can express, you know, if I just take any numbers r and s, I could write that down as some midpoint plus or minus a distance. And what this is telling us is to think about products is always the same as thinking about a difference of squares, which is weird, because products can be very chaotic. If I just walk through the number line, and I don't know, we I say look at 101, 102, 103, and I just say, take a look at all the numbers on the number line. And I want you to systematically tell me, can each one of them be broken down as a product of two smaller whole numbers? Well, we know that what that's asking is, what are the primes? Because only the primes can't be broken down like that. And yet, evidently, that's a very similar question to saying, when can I walk through those numbers and say, hey, am I able to express you as a difference of squares?
Could I add a square number to you to get another square? That still feels hard. But that feels like a very different question to me. So I think if you were doing some arithmetic, and you had this in the back of your mind, that's a good pattern. And that's a pattern that's going to come up later in life. For example, let's say later in life, you find yourself wanting to understand quadratic functions. And so here, we're going to talk about the simpler version of the quadratic formula, which is really just refactoring the original thing. but I hope you see it's much easier to actually solve a random quadratic that's thrown at you if you're going by um if you're going by the method that I want to show you right here. So what's the task?
Anytime you have some function that looks like ax squared plus bx plus c, okay, for any numbers a, b, and c. So maybe that's something like 3x squared minus 4x plus 5. And you want to know when that equals zero, what are the two roots? Now, this is actually equivalent to rescaling everything. And I think it's a good common pattern to rescaling, where I'm going to divide everything by a. So I just want that first coefficient to be equal to a. Because that's way easier to work with. So I'm going to call that x squared plus b prime x plus c prime, where b prime and c prime are just the rescaled versions there. And this is a different function. It is a different quadratic function, but the roots are going to be the same.
And one way that you might see this is if you just graph them. So let's go over and pull up our best friend of Desmos, right? So let's say I have some kind of parabola. In this case, I've written it so that one of the roots is going to be two and the other is four. And then g of x here is just the scaled version of the expanded version of that. It's exactly the same graph. But let's say I wanted to scale that up and down, right? So I might take this and then I will multiply it by some kind of constant. What do you guys want to call that constant? See, this is the thing. If I had the question framework working right now, I could just ask you, what do you want the constant to be? And we would see the statistics come up with what people had. But instead, maybe I'll throw in a slider.
And as I change that, the function changes. It is a different function, but the roots are still two and four. So solving for this rescaled version of the quadratic is the same. And that should kind of make sense because s times zero is always going to be zero. So it doesn't matter how much we scale it. So going back to what we're working with here, the reason that I think it's much nicer to make sure that that leading coefficient is a one is because if we're thinking of our quadratic in terms of its roots, and I say, okay, you know, it's going to intersect the x-axis at r and s, or maybe it does, maybe it doesn't, but let's just write one that does like this. Another way that I could express that particular quadratic is as x minus r times x minus s.
Because if I plug in r, it's clear that we're going to get zero. And if I plug in s, again, this term will also cancel out to zero. So if I expand this, whatever r and s are, they're the unknowns, I should get the same thing as what we have up here. And this is generally useful. This is not just for the quadratic formula, but a very good relationship to have with polynomials is to know how the roots correspond to the coefficients, especially in a circumstance where that leading coefficient is one, and the whole polynomial has been kind of normalized in that way. And in this case, if you just expand it out, what we'll get is x squared minus r plus s times x, because we have this minus r times x and then x times minus s. And then the constant term will be negative r times negative s, so that becomes a positive r times s. Okay, so what does this tell us?
This tells us the first two of the three key facts that are needed to be able to solve any quadratic without really needing to memorize all that much. So the first key fact is that this b value, I'll call it b prime, just to remind ourselves that it's after you've scaled things down, is the same as the negative sum of the two roots. Okay, and then similarly, c prime is going to be the product of those two roots, which is kind of cool, because what we have right here is, you know, it's a system that feels like it should have a solution. We have two equations and two unknowns, but it's not obvious how we would go about solving it. And every now and then, I think classes will have a unit in factoring quadratics, where they basically tell you to just guess and check.
So in some very fortunate circumstances, if you have something like, you know, x squared, let's see, minus 7x plus 12. They basically say, see if you can guess and find two different numbers that add up to be 7 and that multiply to be 12. And if you just kind of sit back there and think, you're like, okay, can I find any two numbers that add to 7 and multiply to 12? Well factoring 12, we get 3 and 4, and 3 and 4 do add to 7. So yeah, in that case, you just totally luck out. And you could write this as x minus 3 and x minus 4, because those are the two roots.
And then you typically move on from that chapter and it's like, well, in most cases, you won't be able to just guess and check. And in any case, what you're going to look for is a general formula anyway, so hope you had fun with that. But it turns out there's actually a systematic way to take this puzzle of finding two numbers that have a known sum and a known product and figure out what they are. And the key comes down to thinking in terms of not the two numbers themselves, but the mean of those two numbers, and then the distance between that mean and each one of them.
And you can see where this is going. This is why we talked about difference of squares, because the third key fact to come away with, or to come into it with, I should maybe say, is that we could re-express that product as m minus d times m plus d. And you see where I'm going, right? That means that the product that we know looks like m squared minus d squared. So just to give an example here, it's often much more helpful to have numbers. Let's say that you were given a quadratic like x squared, I don't know, let's do six, even numbers will make this easier for us, and then seven.
And you were tasked with knowing when does this equal zero? So I haven't told you how to solve it yet, but these three key facts are going to be enough to just basically walk yourself into the answer. Well, what is what is m, right? Because we're going to ultimately express our roots r and s As m plus or minus d for some kind of midpoint. Well, that midpoint is the sum of the two numbers over two. That's how we define averages. And because we know the sum of the two numbers is negative b prime, that's the same as negative b prime over two, which you can basically read off of the equation as just negative one half times whatever's sitting right there, which in this case will be negative three. Awesome, we know what m is. But look at the equation we have up here. We have an expression for c, the last coefficient, in terms of m, which we now know, and d, which is the only thing we don't know left.
So we could rearrange this, and so that was saying c prime is that, we could say that d squared, the square of this kind of standard deviation between our roots, is m squared minus c prime, the product of the two roots. But we know both of those values, we could just write that down over here. Maybe I'll change colors again, be a little flamboyant. d squared is equal to m squared, which in our example turns out to be nine, minus c prime, which is that last coefficient, or seven.
Seven. Handwriting is terrible, but I think you guys can work with me. You see why I usually animate stuff. So that means that's two. So look, when we said r and s is some midpoint plus or minus a distance, that midpoint is negative three, plus or minus, well if d squared is two, that means d is the square root of two. There you go. You could do that for any quadratic that I give you. You could just walk through that particular process. And let me just show you what it looks like in general, so that you can maybe remember it as a formula if you wanted to. In general, for any quadratic, that midpoint is just the rescaled version of b if the leading coefficient wasn't already one, divided by two.
And then that distance, well what did we just do? We took the square root of the midpoint squared minus the product of the two. And when I'm sort of thinking into my head, I've been saying like m squared minus p, just because p has a readable meaning. I think of it as the midpoint squared minus the product. But of course p in this context is just whatever the last coefficient of our quadratic was. So over in this example, the product of the two coefficients was seven. So for me, what I think the simpler quadratic formula is, if you're going to memorize anything, is to come away and say it's m plus or minus the square root of m squared minus p.
All you have to do is first find m, which is, you know, just a factor times one of the coefficients you're looking at, and then find p, which is also, if not already, a factor, a coefficient that you're looking at, a rescaling of one of them. So this to me is way simpler than the traditional quadratic formula. And if you were to try to sing a song to yourself for it, the song is almost too short. It's no fun. You're just sitting there like m plus or minus square root of m squared minus p. That's it. No song. No song to be had. So let's do a couple practice problems, because I do think practice will make it easier. And for future streams, again, it'll ultimately be the case that I'm giving you these questions, and then you'll be able to go to 3b1b.co.live and answer them. But because there's too many of you, we can't have any fun today. This is the equivalent of trying to run a class where you have, you know, I don't know, 20 seats sitting out and you're going to do a normal lecture.
And then there's just people banging at the doors and trying to cram themselves in, and the fire marshal comes in and they're like, ah, you got to cut out the class. You can't have this the way that you hoped for. But it's cool that there's so many of you here enthusiastic to learn about math. So let's just do some examples. Okay. That'll kind of highlight what this process looks like. Let's say we had x squared plus 10x plus three. So in this case, it's nicely already rescaled for us. That's always lovely. So I often, I just like to draw the picture for myself, whether or not the two roots turn out to be real or even positive. It's just nice to remind myself what we're looking for. We're looking for where the two roots are. And I know that a different way to think about products is to think about a difference of squares. So I just kind of think in my head, okay, I'll be thinking of that in terms of their mean and the kind of standard deviation. So I just write down for myself, what does that mean?
Well, it's negative b prime over two. And if I forget that fact, if I forget that that's what the sum of the two roots is, I could always just go through this little rigmarole again and say, okay, if I systematically wanted it to be a quadratic with roots r and s, this is what it would look like. This is how it would expand. So you can re-derive it on the fly. There's not too much memorization needed. In this context, that works out to be negative five. And by the way, if I do ever make any mistakes, which I'm quite positive I will, go ahead and throw them in the chat and those will be forwarded to me and I'll be able to correct myself there. So we know the midpoint. And then we just ask ourselves, what's the square of the distance? And based on difference of squares, that'll be that midpoint squared minus the product, which in this context is negative five squared or 25 minus the product, which is that last coefficient, minus three.
So what are the roots r and s? Well, it's negative five plus or minus the square root of 25 minus three or 22. There you go. Another quadratic solved. Ain't no thing. Let's try another. Just because I do think it's kind of nice to get a little bit of practice here. And as I'm going, if you have a piece of paper and pencil, please follow along. If you can just kind of race ahead and do the same process before I do it, that's awesome. That is the best kind of learning experience. If you're watching this in the future, by the way, as with any video, I highly encourage you to pause and ponder. I really think that's the best way to learn math.
If you're looking at some kind of lecture in those crucial moments where there's a question asked, pause, see if you can do it yourself and then see what the answer turns out to be. I guarantee you'll learn more effectively that way. I don't know. What should we do? Let's do maybe three x squared. I think I wrote one down earlier, didn't I? Just as kind of a offhanded thing. What did I write? That wasn't there. Oh yeah, it was at the top. Let's do that one. Three x squared minus four x plus five. Why not? Three x squared minus four x plus five.
All right. So in this case, step one, we've got to rescale things. The first one gives the coefficients a nice readable meaning. Minus four thirds x plus five thirds. Great. And now same process. I'm sort of thinking in my head of this particular image where I want to know the midpoint and the distance. So I say that midpoint is negative of this second coefficient divided by two. So that will become positive four thirds. But then that four divided by two gives us a two. So that midpoint will be two thirds. And then the distance squared is m squared minus the product, which in this case is five thirds.
Okay. And m squared in this case is, let's see, two thirds squared minus five thirds. All right. So this one, you know, it gets a little messier. We've got to work out our fractions, but that's not too bad. Two thirds squared is going to be four ninths. Oh, I'm off screen a little. And then what is five thirds in terms of ninths? That's going to be fifteen ninths if I'm not wrong. So we end up getting a negative number, which is always fun. So here we have negative eleven ninths. Okay. So what that means is that our final answer, the roots of this polynomial are in s. The values that will make the polynomial zero are going to be two thirds plus or minus the square root of negative eleven over d. Negative eleven over d. What am I saying? Negative eleven over nine.
Okay. So that's fun. In this case, the square root is a negative. So that means we have complex roots. And there's actually a very fun way to think about the way that complex roots play into this difference of squares perspective on the quadratic formula. Let me actually try it with a simpler example, but it ends up relating to the Pythagorean theorem, which I think is cool because the whole purpose of this is to try to connect various patterns in math that come up a lot. Things that might be useful outside of this particular class that you're doing. So I actually have written down for myself an example that will work out with nice numbers here.
I mean nice-ish. X squared minus six x plus ten. Okay. So we go through the same rigmarole. We say m, the midpoint, is going to be negative b prime over two. So in that case, it works out to just be three because we take the negative of this term and divide by two. d squared is going to be m squared. So three squared is nine minus the product, which in this case is ten. So nicely that's exactly negative one, which means that our two roots, and I'm down to the y or on the page that I've been writing with here, our two roots are three plus or minus i.
Okay. So what that means for us is that the actual parabola here, it doesn't look like something that crosses the x-axis. Instead it would be something that maybe sits above it. But it does have imaginary roots. So if we were to look at the input space, not just in terms of the real number line, but let me draw it out. Let me go back to black. Black will be our complex plane color for this moment. We'll call this our imaginary axis, where numbers like i and negative i, the square root of one, or maybe I should say square roots of one, it's got two of them. You interchange them, it's fine.
And then we've got just the real numbers. One two three four. So in this case, our two roots live at three plus i and three minus i. So this, I should be very clear, this is not an x-axis and a y-axis. This entire plane now is where the input lives, where x lives. If you were going to graph it, you'd get some kind of graph that's outside of the paper. And any of you who've watched the channel Welsh Labs, which if you haven't, you absolutely should, might be bringing to mind right now an absolutely awesome like artificial reality effect he does, where he sort of pulls out that graph. Highly worth watching, super great moment. But what's interesting about this is if we look at the magnitude of the roots, okay?
Because I could ask you, what is the magnitude of that root? And it's a right triangle that we're looking at. We've switched from algebra to geometry now. And based on the Pythagorean theorem, it'll be the square root of one of the lengths squared, which is in this case three squared, plus the other length squared, which is one squared. So square root of three squared plus one squared, and that ends up being root 10. It is not a coincidence at all that the magnitude of our roots, I guess sort of no pun intended, the magnitude of the roots of our quadratic equation here are the square root of that constant coefficient. Because remember that constant coefficient is telling us what is the product of the two roots. And if you know something about complex numbers, you might know that if I have two complex numbers and I multiply them together,
the magnitude of the product is the same as the product of the magnitudes. So in this case, given that I'm going to have two separate roots who are symmetric, you know, it's going to be three plus or minus some imaginary number, each of them is going to have the same magnitude. The product of their magnitudes needs to be 10. We know that offhand. So you kind of know ahead of time that it should be magnitude of square root of 10. And the reason that this is happening is basically because when you do difference of squares, something like m plus d times m minus d, but that distance is an imaginary value, i, what you get is m squared minus i times d squared. But because i squared is by definition negative one, you get a sum of squares.
So even sums of squares, which come up in geometry, Pythagorean theorem stuff, all of that, can be expressed as a kind of difference of squares, which itself gives a kind of factoring. And this, this shows up in a lot of very, very beautiful math later down the road. One of my favorite videos that I've made actually is, oh, what did I title it? I think pi hiding in prime regularities, where you're counting lattice points inside a circle. And the key insight associated with doing that is to realize that asking when you can express something as the sum of two squares is a sort of factoring problem, but it's factoring not where you're dealing with prime numbers on the real number line, but primes in complex numbers, these things called Gaussian primes. So even simple, I shouldn't say simple stuff, but even stuff that comes up in high school, like the quadratic formula, I think if you're learning it the right way,
it ends up connecting to all sorts of other delightful things. And remembering these patterns comes up, like I said. So just to re-emphasize, how did we get here? What three key facts do you need to be aware of with quadratics to be able to kind of rediscover a kind of quadratic formula on the fly? The first one is how to read the coefficient sitting in front of x. And if we have a quadratic that looks like x squared plus b prime x plus c prime, you can read that first coefficient as the negative sum of the roots. You don't know that already, you can rediscover it on the fly, but that is actually worth coming away with. Similar with how you can read the other coefficient, it's the product of the roots. Then the only other thing you need to know is that we could express that product of roots as a difference of squares with respect to the mean and the kind of standard deviation of those roots.
And you can just solve any quadratic that comes to you on the fly. The only thing that looks remotely like memorization is if you want to jumpstart to the end and just say m plus or minus m squared minus p. Now to finish things off, I think it would be very satisfying to remind ourselves that this is actually equivalent to the traditional quadratic formula, something that looks much bigger. So let's go ahead and actually do that exercise. And again, if you can, pause and just work it out for yourself right now. So let's remind ourselves of how that goes.
So we've got, what are we solving? Any kind of quadratic. Ax squared plus bx plus c. We want to say no matter what a, b, and c are, give me a systematic way to find these roots. Again, maybe you're doing something beautiful like ray tracing. Let me pull up that image again. That was a really nice image. I just can't believe that this is something that a computer generated. I guess I should believe it because like Pixar movies are amazing. But evidently, if you know the kind of math that can lead you to create an image like this one, that's the kind of thing that can get your job as an engineer at Pixar.
And of course, what is that math? That math is exactly what we're doing right now. So let's work it out again. Ax squared plus bx plus c equals zero. This time, we're just going to write everything in terms of a, b, and c. No new variables coming up. So when we do the first step of rescaling, we say x squared is equal to b divided by a times x plus c divided by a. We don't give it any new names. Now remember how our trick works. We sort of picture in our head, hey, imagine this quadratic has some roots. Let's call them r and s. And we're trying to find the midpoint and the standard deviation. And we can read off that that midpoint is the negative of the second term divided by two. So in this case, that's going to be negative b over 2a. Great. And then that standard deviation is going to be m squared minus the product of the roots, which in this case looks like negative b over 2a squared minus,
and the product here is what that last term is, c divided by a, c over a. And remember, if you don't remember this idea that, oh, that's what the distance is, just re-derive it for yourself on the fly. Just go and say, okay, I remember that the product p is just the product of my two roots, which can be expressed as m minus d, m plus d. Oh, okay, that's something I can write as m squared minus d squared. Oh, okay, that's what gives me an expression for d squared in terms of m squared and p.
Don't feel like you have to just come in and know it off the top of your head. But after you do it a couple times, it sticks in your memory. So that's m, that's d, and the quadratic formula is just telling us that the roots are m plus and minus, that's standard deviation, which in this case looks like, maybe I'll write it out on two lines because this will be a lot, negative b, actually no, I'll write it on one line for this one, negative b plus or minus, I'm jumping to the original quadratic formula, a little bit too hard ingrained, we'll go back to two lines, negative b divided by 2a, divided by 2a plus or minus the square root, oh, I wrote this incorrectly, oh, someone should have corrected me. This is what d squared is equal to, d squared is this whole thing, so d itself is the root of those. I'm sure lots of people were shouting that in the live chat, I don't have it pulled up now, but to those of you who did, much appreciated.
So what do we have here? Well, it's going to be the square of negative b over 2a minus c over a, minus c over a. Okay, now we just got to expand this thing, which is frankly not super fun, but it'll connect it to the original quadratic formula to for us. So I can pull out this 2a squared, and I'm just going to write that as 1 over 4a times negative b squared, negative b, yeah, negative b squared, and then I want to also pull out 1 over 4a, I want to be able to say that the last term also looks like 1 over 4a times something, and that something to make it equal to c over a would have to cancel out the 4, it would have to cancel out an extra a, and then c, sorry, because this is really 1 over 4a squared.
Let's see, have I done this right? Yeah, because I pulled out the 2a, so that should be 4 times a squared, so over here I have 4 times a squared. I want that to cancel to become c over a, which it looks like it does, so that's awesome. So you can go over here, negative b over 2a, plus or minus, and if this feels tedious, that's kind of the point. The whole quadratic formula is more complicated than it needs to be, because we were just solving any quadratic that was thrown at us without having to do this, but this is what happens if you don't introduce any new variable names on your way. It's like code that hasn't been refactored properly. Okay, so what can we do here?

Ask anything
We've read this whole study set, so questions about it get the best answers.