yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Representing systems of equations with matrices | Matrices | Precalculus | Khan Academy


5m read
·Nov 10, 2024

I'm a big fan of looking at the same problem in different ways or different ways to conceptualize them. For example, if I had a system of three equations with three unknowns, let me just make one up:

Three x minus two y minus z is equal to negative one. That's one equation, and in three dimensions, this would represent a plane. Then, I have another one:

Two x plus five y plus z is equal to zero. That would represent another plane.

Now, if you had two non-parallel planes, they would intersect each other and form a line. But then, if we have a fourth plane, so let me write that as negative four x minus y is equal to eight, it's possible, not always going to be the case, but it's possible that they will all intersect in exactly one x, y, z coordinate.

In other videos, we talk about solving systems of equations like this with three equations and three unknowns. Now, what I want to do in this video is connect this idea to the notion of matrices and matrix multiplication, which we've already reviewed in other videos.

So, we can think of this exact same problem in the following way. If we take all of the coefficients and we create a three by three matrix with them, let me do that. So, for example, let me get all of the x coefficients: three, two, and a negative four, and I'll put it in this first column here: three, two, and negative four. Let me get all the y coefficients: negative two, five, and essentially a negative one; negative two, five, and a negative one.

Then, last but not least, all the coefficients on the z's: a negative one, a plus one, and then there's implicitly a zero z here you can't see it, so it would be negative one, plus one, and then a zero. So, these are the coefficients on x in purple, on y in yellow, and in like a salmon color for the z's right over here.

If we said that that is going to be multiplied by a three-dimensional vector that is, I guess we could say unknown x, y, and z, that is going to be equal to a second three-dimensional vector, which we do know, and that's negative one, zero, and eight. And I know there's a lot of things going on in your brain right now. You're like, "Sal, this looks somewhat magical. You just took the coefficients, put the xyz here, put the right-hand sides of the equal sign, in this case, the sides that didn't have the variables on it, put it over here. Does this actually make sense? Does this actually work?"

To validate that, let's actually multiply out the left-hand side of this equation right over here. So, in other videos, we've talked about multiplying a 3 by 3 matrix times, in this case, a 3 by 1 matrix, and this is going to actually give us a three by one matrix, so that's looking good already.

The reason why we know that is these two have to match in order for the multiplication to even be defined, and then the dimensions of the product are going to be three by one. But let's actually multiply things out. Well, we know one way to construct this. I'm just going to focus on the left-hand side here.

I would say, all right, let's essentially take this row and this column, and then take the sum of the product of the corresponding terms, I guess you could say. So, this is going to be three times x, which is 3x, minus 2 times y, minus 2y, minus 1 times z, minus 1z, like that.

And then the next one, I'm going to take all of this business and multiply it by this column, so it's going to be 2 times x, and this is just a review of multiplying matrices, plus 5 times y, plus 5y, plus 1 times z, plus 1z.

Then, last but not least, if I take this and I do the same thing with that column, it’s going to be negative 4 times x, negative 4x, minus 1 times y, minus y, and then 0 times z, which I could write if I want to or not write, but I could write it. Let me just write it to make things clear.

So, the product of what we have on the left-hand side is this right over here. It might look like a three by three, but it’s actually a three by one here, where this would evaluate, if you knew what x, y, and z are. This is going to evaluate to some number; likewise, this is going to evaluate to some other number, and this is going to evaluate to another number.

We know from this, I guess you'd say, matrix vector, this matrix equation that we've set up, that what the left-hand side, this product, needs to be equal to what we have on the right-hand side. It needs to be equal to negative one, zero, and eight, which means, and I think things might be connecting for you now, that this needs to be equal to that, and that this needs to be equal to that.

Last but not least, negative four x minus y plus zero z needs to be equal to eight, which is exactly what that original system of equations was telling us. Now, I know there's still probably some things that are circulating in your mind. One question is, well, that's all nice. You found a different way of representing that, but how does this introduce a new way of solving this?

The answer I'll give you for now is yes; it will lead to a new way of solving this. Because if you think about it, we're taking the product of a matrix and a vector here to get another vector. If there's some way to essentially unwind this matrix multiplication, then you might be able to do that, apply it to this vector on the right, and then solve for this unknown vector here.

That's the way that things, like a computer, a lot of computer algorithms, actually try to solve problems like this by representing them as matrices. Now, another interesting thing, just with the representation itself, is it makes you think about the problem a little bit differently. You could view this as three planes in three dimensions, and where what is the x, y, z coordinates where they could intersect?

Or, you could view this three by three matrix here as a transformation matrix that's being applied to some unknown three-dimensional vector. Under transformation, that a known three-dimensional vector is equal to this known three-dimensional vector, negative one, zero, and eight.

So, the question of solving this would say, all right, can we somehow perform a reverse transformation, an inverse transformation so to speak, on the right-hand side to figure out what that unknown vector really is? And I'll just leave you there, and we'll continue that line of thought in future videos.

More Articles

View All
Two Days to Delivery | Big Fish Texas
Yeah baby, let the games begin! We have 15,000 pounds of fish to catch. That’s a lot of fish to pull over rail! I don’t care who you are. I almost got every hook. Might be little great here on me, but I got this. I’ve been doing this my whole life! Yeah,…
Caught in an Underwater Avalanche | Expedition Raw
We’re heading down to explore an underwater cave. We always run a guideline, and you place it very carefully because you have to assume that you’re going to come out in no visibility. Without that line, you have low odds of getting out. Then all of a sud…
why is it so hard to live in the moment?
How much of life do you remember? [Music] Sam, you felt like you’re present in the current moment. You’re physically here, but our minds are always busy, always somewhere else. I heard this call and can’t stop thinking about it: you’re depressed because…
YC Fireside: Surbhi Sarna + Reshma Shetty and Jason Kelly - Founders of Ginkgo Bioworks
Hi, welcome Reshma and Jason and everybody on the call. Hi, my gosh, I am so excited to chat with the two of you, pioneers in the field of synthetic biology. So to kick us off, the audience today is going to be a mix of people with a tech background and …
Single Photon Interference
[Applause] Previously on Veritasium, we saw how our understanding of light has changed over the centuries. In the late 1600s, Hyans proposed that light was a type of wave, while Newton considered it a stream of particles. This debate appeared to be settl…
Finding zeros of polynomials (1 of 2) | Mathematics III | High School Math | Khan Academy
[Voiceover] So, we have a fifth-degree polynomial here, p of x, and we’re asked to do several things. First, find the real roots. And let’s sort of remind ourselves what roots are. So root is the same thing as a zero, and they’re the x-values that make th…