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

Using matrices to transform a 4D vector | Matrices | Precalculus | Khan Academy


4m read
·Nov 10, 2024

We've already thought a lot about two by two transformation matrices as being able to map any point in the coordinate plane to any other point or any two-dimensional vector to any other two-dimensional vector. What we're going to do in this video is generalize a bit and realize that the same principles can be used for n dimensional spaces.

Now, I know that sounds a little bit fancy, and it really is on some level, but it's really the same ideas. So, for example, let's extend what we know about two dimensions; let's extend it to say four dimensions. So let's write a four-dimensional vector here, and it is hard to visualize in four dimensions. So don't be hard on yourself if you have trouble. Two dimensions — not too hard; three dimensions — not too hard; four dimensions — a little bit hard for us, maybe we have to think about time as the fourth dimension.

But in matrix world or in vector world, it's pretty easy to represent them. As hard as it is to visualize, a four-dimensional vector will just have four numbers: negative one, let's see, negative three, I'm just making these up randomly, negative five, and one. This is a four-dimensional vector, and we could view it as being a weighted sum of the unit vectors in the different dimensions of four-dimensional space.

I guess you could say that this is the same thing as... actually, let me color code a little bit. This would be equal to negative 1 times the 1, 0, 0, 0 vector plus negative 3 times the 0, 1, 0, 0 vector plus negative 5 times the 0, 0, 1, 0 vector. I think you see where this is going.

And then last but not least, plus 1 times the 0, 0, 0, 1 vector. Now, when I write it this way, you might immediately start realizing, "Oh, I think I know how to do transformations here." For example, if I were to give you the transformation matrix, and this would be a transformation matrix for four dimensions. So it's going to be a four by four matrix.

So I'm going to write some random numbers here: 1, 0, negative 3, negative 1; 2, 0, negative 3, 1; 3, 2, 0, 2; 3, negative 1, 0, and 3. So my question to you is, what would be the mapping of this four-dimensional vector if we were to apply this transformation to four-dimensional space? What would be the result?

Pause this video and think about it. Well, it's completely analogous to what we did in the two by two world. In two-dimensional space, we thought about, "All right, instead of the 1, 0, 0, 0 vector, we're now going to use this vector. Instead of the 0, 1, 0, 0 vector, we're now going to use this vector." Instead of this one in that blue-green color, we're now going to use this one. And last but not least, instead of that, I guess we could say, salmon-colored vector, we're now going to be using this one.

So another way to think about it is this: the mapping of this vector. Let me write it this way; let me make a little line here so we can separate things a little bit. But we could write — I'll write it a little bit smaller; hopefully, you can see this. So this is our original vector: negative 5, 1. But we want to do the prime; what does it get mapped to under this transformation?

Well, this is going to be negative 1 instead of this unit vector right over here; it's going to be negative 1 of this one right over here. So it's negative 1 times all of this business: 1, 2, 3, and 3. And then, instead of plus negative 3, I could just write minus 3 times all of this business: 0, 0, to negative 1.

And then we have minus 5 times all of this business: negative 3, negative 3. And then we get 0, 0, and then — and that definitely gets a little bit more work involved the more dimensions we have — plus 1 times this business. So plus 1 times negative 1, 1, 2, 3.

And so what's this going to be equal to? So — and actually, this could be a good time to pause the video too and have a go at it. All right, so this is going to be this first one. I just make all of these negatives: negative 1, negative 2, negative 3, negative 3. And to that, I'm going to add — let's see, if I multiply all of those times negative 3, I'm going to get 0, 0, negative 6, and positive 3.

And then if I multiply all of these times negative 5, I am going to get 15, 15, 0, and 0. And then if I multiply all of these times 1, well, I just get those things again. So that's going to be negative 1, 1, 2, and 3. And we are in the home stretch! So now we can just add everything together, the corresponding terms.

And so this is going to be negative 1 plus 0 plus 15 plus negative 1. So that's going to be the same thing as 15 minus 2, which is going to be 13. The negative 2 plus 0 plus 15 plus 1, so that's going to be 16 minus 2.

Which is then we have negative 3 plus negative 6, which is negative 9. And then we add 2 to that, so that is negative 7. And then negative 3 plus 3 is 0, plus 0 is 0, plus 3 is 3. And we are done! We have found the mapping of this four-dimensional vector based on a four by four transformation matrix. Very cool!

More Articles

View All
why i stopped drinking alcohol
What’s up, Graham? It’s guys here. So I’ve recently noticed a growing trend among entrepreneurs, business owners, and even people here on YouTube who’ve started becoming more and more vocal about why they’ve stopped drinking alcohol. At first, I kind of j…
Knock Knock, You’re Busted | Drugs, Inc.
In a Queensland suburb, cops are raiding a suspected dealer’s home. The suspect alerted police. They know he could be flushing vital evidence, or worse, setting up a trap. They go in hard, but not hard enough. The front door has been specially reinforced.…
Ali Partovi - Startup Investor School Day 3
Ali is the founder and CEO of neo, which he can explain what that is. It’s a very cool new organization, but he’s also an entrepreneur, a social entrepreneur whom I admire a ton for the things he’s done. We met, like I said, too many years ago when he and…
6 STOIC LESSONS FROM SENECA FOR MASTERING MENTAL TOUGHNESS | STOICISM INSIGHTS
Every one of us at some point feels like life is spinning out of control, whether it’s a lost job, a broken relationship, or just the chaotic pace of daily routines. These moments can leave us feeling helpless and overwhelmed. But what if I told you there…
Plessy v. Ferguson | The Gilded Age (1865-1898) | US history | Khan Academy
Long before Rosa Parks refused to move to the back of the bus, Homer Plessy boarded a train car in New Orleans to protest Jim Crow segregation laws. Plessy was arrested and convicted in Louisiana, but his test case for segregated public transportation rea…
Why Shower Thoughts Are Actually Deep
Everyone loves shower thoughts. It’s the most successful format on this channel. There’s an entire subreddit dedicated to shower thoughts and thousands of TikToks daily talking about profound ideas, paradoxes, and concepts; things that you need to think a…