HomeОбразованиеRelated VideosMore From: 3Blue1Brown

# Dot products and duality | Essence of linear algebra, chapter 9

More From: 3Blue1Brown
10766 ratings | 660318 views
Html code for embedding videos on your blog
Alpha Pictures (7 minutes ago)
*visible confusion*
Matheus Urbano (17 hours ago)
Is it wrong to say that numbers are 1D vectors?
Frederick Fan (3 days ago)
GOAT
dcavaller (3 days ago)
Thanks for you simplicities
Prateek Singh (3 days ago)
[email protected]>Explanation!
John Wayne (6 days ago)
My love for u grows stronger by every video.
beardymonger (8 days ago)
I think of the dual space as having negative dimension, and scalars as having 0 dimension, so mulplying say a row 3 vector with a column 3 vector gives a scalar, dim 3 and dim -3 gives 0
Fausto Conigliaro (10 days ago)
This just unlocked another 10% of my brain
Prakhar Singh (10 days ago)
At 00:57 , what does list of numbers of same length mean?
bookashkin (8 days ago)
It's *two* lists of numbers of same length. Length of one list = length of the other list, where length = how many numbers in the list.
Danielle Anderson (12 days ago)
I understand what the dot product has to do with projections and the angle between two vectors, but where you've lost me is your tangent about duality. I think bringing in the number line somehow made it harder to understand by distracting me from the fact that the dot product is really just the magnitude of two vectors and the cosine of their angle all multiplied together. In other words, it's a measure of, pretending some object is at the origin, how well those two vectors help each other pull that object in their respective directions. If they're pointing in roughly the same direction, they help each other. If they're perpendicular, they're not really helping each other but not hurting, either. If they're pointing in the opposite direction, they're fighting against each other, which is the negative of helping each other. You can then break this interpretation into x and y components to informally derive the familiar x_1 * x_2 + y_1 * y_2 form. You multiply their efforts in the x direction with each other to determine how well they work together in that direction, do the same thing for the y direction, and then add them together. I'm not a physicist, but imagining the physics of vectors really helps to understand dot products. Maybe the duality tangent and involving number lines helps some people, but I think this is a topic that benefits from multiple interpretations of what's going on.
Mark Kennedy (12 days ago)
Also, just one thing I don't fully understand. Why can one just transpose a vector. The dot product would not be possible without the ability to transpose vectors (ie we couldn't then transform the second vector to the number line). Is a transposed vector a fundamentally different object to the vector itself
MuffinsAPlenty (9 days ago)
Great question! Yes, a transposed vector *is* fundamentally different from a vector, but in terms of algebraic structure, ends up being the same. This is the amazing thing about duality. In the view Grant is taking here and in most linear algebra textbooks and classes, we view all vectors as column vectors. All other matrices (including row vectors) are thought of as linear transformations: transforming a space into another space. A row vector with n entries is then a linear transformation from n-dimensional space to 1-dimensional space, since the input is an n-dimensional column vector, and the output is a 1-dimensional column vector. If you are familiar with the abstract definition of the dual space of a vector space, this corresponds to the fact that the dual vectors are linear functionals. After choosing a basis, dualizing everything is given by transposing everything. Then it becomes clear why the dual space is isomorphic to the vector space you started with if the space is finite dimensional and it becomes clear why the double dual space is naturally isomorphic to the vector space itself.
Mark Kennedy (12 days ago)
Hi Grant. Like everyone else here I think your videos are truly amazing. They really get me thinking beyond the dry presentation of my college course. One thing that struck me was if you are thinking of the transposed vector in the dot product as just a 1 by 2 matrix that transforms another vector to the number line, can we think of the transposed vector in the dot product as really a 2 by 2 matrix with the transposed vector just the first row and zeroes in the second row. Indeed you can think of any vector (transposed or not) like this no? In the case of a column vector it would obviously be a column of zeroes. Always bugged me what exactly the relationship between matrix and vectors actually was.
Analytical1 (7 days ago)
Is the dot product supposed to tell you how much "energy" two vectors contribute to each other when both are experienced together or is it something else? If you are on a boat going north with vector (0, 4) and the current is going northeast (2, 1), then you would end up going (2, 5) and the length of the resulting vector would be (2)^2+(5)^2= sqrt(29). What does the dot product tell you then since the new vector has a magnitude of sqrt(29) while the dot product is 4?
Analytical1 (7 days ago)
I think I figured it out. You can have a 1 dimensional space “living” in a 2 dimensional space like in the span video. When you are dotting two vectors you are treating the vector on the left of the operation as a unit vector of the transformed space. Like the box matrix, the left is performing a transformation where each number encodes where the unit vectors lie in the new space. The 1x2 matrix only encodes one vectors which is the new unit vector. That yellow vector is the new unit vector!! If you take that number line in the video that’s u-hat and rotate it clockwise, u-hat is 1 in length. But since the yellow vector later has a unit vector that isn’t one you must scale the vectors by that new base vector. Hope this helps people who are confused. It’s like translating languages
Kristian Maglasang (15 days ago)
To those who are struggling with this topic like me, perhaps this might help - https://www.youtube.com/watch?v=KDHuWxy53uM&t=328s
Horacio R Martinez (16 days ago)
Brilliant !!!
Lord Flufflebuns (21 days ago)
I don't know...I feel this tutorial invested too much time into duality and matrices rather than the dot product itself and what overall uses it has. I learned how to calculate it for sure, but not so much what I can use that calculation for in the grand scheme of things.
Jordan Purcell (22 days ago)
"Sometimes you realize that it's easier to understand it (a vector) not as an arrow in space, but as the physical embodiment of a linear transformation - it's as if a vector is a conceptual shorthand for a linear transformation." Definitely one of the most beautiful ideas I have ever learned, thank you for articulating it so well.
ancient child (23 days ago)
This is really how dot-products should be introduced. Here in germany, we don't even learn about matrices in our highschool-equivalent, just about vectors. Matrices then only come up in college... I honestly think that separating these subjects in such a way doesn't do any good. As can be seen here, an intuition about the dot-product can be easily obtained when one has understood the basic concepts of matrices as linear transformations.
Miss Supriya (24 days ago)
how to find the length of the projection in order to proceed with the dot product.
cmmndrblu (26 days ago)
I love your channel and I consistently struggle to understand over and over until I get it. I think I heard once that a dot product is a measure of the parallelness of two vectors and the cross product was a measure of their perpendicularity. Is this accurate? Anyone? Thanks for the correction in advance.
David K (26 days ago)
I join the group of commenters who found this to be the first confusing video. I wonder if it could be split into two videos, each of approx. 10 minutes (the typical length): (1) dot products, expanded, (2) relationship between dot products and linear transformations, expanded. ... 10 minutes later... Lol I just realized that's exactly what you did with cross products.
Nam Ti Lao (26 days ago)
I left my well paying job for Math, after watching your videos, it feels like 100% worth it!!!
Innoxent Boy (27 days ago)
plz make a video on vector space and subspace...By the way you are great....
Shy Grandeur (1 month ago)
score!
장용연 (1 month ago)
this explanation makes the cauchy-schwarz proof almost trivial
Baris Sannan (1 month ago)
wonderful. thanks a lot.
Ahmed Ali (1 month ago)
I think this one was too complicated
Tzisorey Tigerwuf (1 month ago)
I really wish they'd emphasised these more in school in the 90's, given how important they are for game programming today.
Gordei Pribõtkin (1 month ago)
Something is still not clear to me. 10:34 I understood why we the associated transformation for unit vector u is [ux uy], why i-hat and j-hat land where they land. But why would i-hat and j-hat land on 3ux and 3uy when we scale up u? If we take their projections on the "number line" they would still land on just ux and uy, wouldn't they? Why can we use the associated transformation [3ux 3uy]?
Gordei Pribõtkin (1 month ago)
@장용연 Thank you for this explanation, that part males more sense now!
장용연 (1 month ago)
As for the second question, "If we take their projections on the "number line" they would still land on just ux and uy, wouldn't they?", too be honest I'm not certain if I got it correctly but I'll try to share the little that I understood. The projections always lands on the same spot regardless of the scaling of u. Then why do we multiply it by the scalar(3 in this case)? It's to get the dot product. When the vector gets projected onto the line IT IS NOT A VECTOR. It's a vector that is TRANSFORMED INTO A NUMBER. The arrow is very misleading. Remember at the beginning of the video, when 3b1b was showing what dot product meant geometrically? Multiplying the length of v and the length of the projection of w. The scalar we multiplied onto u is actually the length of v(the length of u is 1). The length between the zero vector(0,0) and the visual point where w fell at(or just the number we got with the vector after the transformation through (ux, uy)) represents the length of the projection of w. So we would multiply those two together to get the dot product.
장용연 (1 month ago)
Because u was a unit vector with a length of 1. I-hat and j-hat also have the length of 1. It's sort of hard to explain but think of the grid expanding when u gets scaled. The positions of i-hat and j-hat, which are no longer 1 now, would have to scale accordingly with u as their fixed positions on the gird would move as the grid scales.
Aweirdanomaly (1 month ago)
The vector u is used in the context of a transformation matrix. Hence, the instructions [3ux 3uy] say to first project i-hat to ux and then multiply by three and to later do the same to j-hat. In other words, scaling up u also implied multiplying the numbers inside the transformation matrix by 3
charan Vjy (1 month ago)
I am simply overwhelmed by the clarity that I get after watching your video. Inspiring. Keep making these videos. Please.
g g (1 month ago)
thank you very much for the good explination! but, could you maybe explain, what is actually the meaning of the dot product between two matrices?
holloloh (1 month ago)
I think it would be good to mention that the length of the projection for v will also be doubled because the projection triangles with original v and 2v side are similar to each other. It's not that hard to realize it, but I feel without it the explanation seems a bit confusing
holloloh (1 month ago)
And lastly, It is not clear why the transformation matrix becomes [3ux 3uy]. If we go by original logic (projecting i and j vectors to the u), the projections of those vectors should still be [ux, uy]. Length of the vector u does not play any role at all. I guess you've meant that we look at specifically [3ux 3uy] transformation with kinda ignoring the previous example, but it makes it again a bit confusing.
holloloh (1 month ago)
And another thing is that I feel like the linearity of of the projection transformation was not justified well (yes it passed visual test, but I don't think that's good enough, what if it becomes more and more non-linear the further we go from the origin?). I'm not sure how to improve that point in video though, I guess you just have to do it by hand if you want to justify it.
Samgnya Shamasunder (1 month ago)
From what I understand dot products are a way to transform n dimension vector into a point on the number line. Question is what's it use ???
herrizaax (1 month ago)
To me, duality is not clear after this. The other video's were really clear, but this is the first one I've watched twice and I still don't understand it. Duality, and how projection is brought into this, are two things that are still vague.
Zhixun He (1 month ago)
NukeML (1 month ago)
but why is the value equal to specifically |v||w|cos(v∠w) ?
Fagan Joe (1 month ago)
That's a great question. When you project v onto w how long is the projection? Call the projection z. It’s one side of a triangle that has a hypotenuse v and angle v∠w. The cosine of that angle is defined to be the adjacent length z divided by the hypotenuse v. That is cos(v∠w)=|z|/|v| So |z| = |v| cos(v∠w) Remember that the dot product is the product of the length of the projection v, times the length of w v.w = |z||w| = |v| cos(v∠w) |w| = |v||w| cos(v∠w)
Saravana kumar (1 month ago)
I'm saving this playlist for my children.
?
kargaroc386 (1 month ago)
I'm just too stupid :(
Mr President (1 month ago)
He lost me at the diagonally positioned number line part... how can a number line be diagonally positioned and why is that important, what's the point?
Fagan Joe (1 month ago)
Here's why. He's saying that a linear transformation T maps vectors (v) to a single number x. T(v)=x. But geometrically every linear transformation can ALSO be thought of as projecting the vector v onto some line L that goes through the origin and that's stretched by the right amount. That's that diagonally positioned line you're talking about. Every transformation T will have its own line L (angle and stretching factor) that can represent T. How do you find L? Well you only need to know what T does to the unit vectors, call this the vector u. T is represented by 1x2 matrix and as if by magic, give the co-ordinates of u. u is just the transpose of T. So you can flip from the T representation to the L representation. In T land, to do the transformation you premultiply any vector v by the transformation matrix T. In L land, you take the dot product of u and v.
XueGuang Lu (1 month ago)
You blow my mind, this series is gold
Jake Gonder (1 month ago)
7:02 i feel stupid for just realizing that theres always "three blue and one brown" π in those talking animations
hasina banu (1 month ago)
THis channel is like the temple of Math education.
Heleoic (1 month ago)
(6:11) Why is the red vector moving its origin from 0 to 4?
Zaoshi Kaba (1 month ago)
It's trying to explain what is happening. It's essentially movement from î + movement from ĵ. Imagine a point at the origin. It moves 4 times in the direction of î and then 3 times in the direction of ĵ.
paul van gastel (2 months ago)
Translate into the world of transformations...
Leif (2 months ago)
Who writes the background music for these videos and what's it called?
Siddhi Sharma (2 months ago)
What was that piano music that just started running near the end? I know the music but not its name
MagixBox (2 months ago)
Never realised this is useful until I'm making a game
Roland Heinze (2 months ago)
I've understood all the previous videos very well, and have reviewed this one for hours, but I still fail to see the "beauty" or rather the "significance" of the duality explanation. It just makes sense naturally... so I don't get what is so enlightening about the unit vector projection example.
Karthik Rambhatla (2 months ago)
Im lost.. I need to listen this again😁 some where some how in lost 🤔
after watching this video for the 3rd time it finally clicked, everything leads up to basically @10:00 thank you very much 3b1b for this, this is awesome stuff!
Kausar Meutuwah (2 months ago)
Hey, I have An Amazing Suggestions if you are up for the challenge. Make a series for the essence of trigonometry.
Yousef Zam (2 months ago)
I wish I watched your videos back when I was taking my linear algebra course. Life would have been really simple! You are an Ubermensch by all means, Cheers!
Emery Y (2 months ago)
I watched this series three times now. It opens up my interest in linear algebra and other related topics. However, when I search other topics further down the road, this series keeps coming up, as if it's the best that Youtube can offer. Can @3Blue1Brown make more videos in this series? I use econometrics and machine learning algorithms all the time. Those applications keep me curious about how math describes spatial relationships. Thank you!
Guest46 12346 (2 months ago)
This visualization makes the concept so clear! Thanks for the great videos.
Valentin Stolz (2 months ago)
By watching the video to 1.42 i thought about calculating the angle between v and w. By using the information on the projection and the rectangular triangle we can use pytagoras, the sinus sentence and the lenght of a vektor using its "betrag" i mean (v1^2 + v2^2)^(1/2) Sorry native german speaker Is that right?
Jakub Matejka (2 months ago)
6:20 Don't you have an error there? 4*1+3*(-2) = -1.. not -2 What do I see wrong?
Leon Blattmann (2 months ago)
4-6= -2
Lio Jio (2 months ago)
ty
learner la (2 months ago)
all went over my hat
Doodelay Explains (2 months ago)
I actually understand the videos leading up to this now and my god, I nearly understand the essence of linear algebra now!
Andrew6James (2 months ago)
The dot product also has uses in quantum mechanics, as wavefunctions can be represented as vectors. When considering orbital overlap in Chemistry for example, we are concerned with how efficiently the two orbitals overlap. As you can see here, if we can represent orbitals as vectors we have a much easier time of evaluating overlap integrals (which can be very complex) by simply considering their dot product.
Aleksandr Ivanov (2 months ago)
Bravo sir. This was absolutely brilliant! Having a degree in math from one of the most trending universities, but seeing the first time in years this actually not-so-simple concept the way it was intended to be... Here is my deepest bow.
ankit rahaman (2 months ago)
Hats off to the geometric explanation provided here..I just stumbled upon the best thing on internet it seems....
Karthi Ramachandran (2 months ago)
How did you learn these when none of universities in all the world taught ? That's awesome
Salvatore Zungri (2 months ago)
@Random Dude Agree.
Random Dude (2 months ago)
I think every Mathematician(idk if Grant is 1) imagines these stuff *in their head* . It's just that they don't have time to explain others since they are busy in research. We're lucky that Grant has shared his knowledge with us.
Massimiliano C (2 months ago)
The god of math blesses you, Grant! Finally, I had the answer I was looking for since my engineering studies... an answer I wasn't able to find until this video. Thanks a lot for your contribution to the world of knowledge.
Anand Patel (3 months ago)
@6:57 , isn't that 1*2 matrices tells respective i coordinates and j coordinates where as 2D matrices will tell only i coordinates by consequent two movement (like instead 2*2 matrix here it is just 2*1 (only i) matrix)?
PiIsRational (3 months ago)
Did I miss a video? What does it mean to project w onto the line formed by the origin and v?
Random Dude (2 months ago)
Simple, u just drop perpendiculars from the tip & tail of w onto the line. The process is called projection. I guess u r still in school(<10th grade). Cuz in my country, we were taught vector algebra in 12th grade.
Johannes H (3 months ago)
Thanks, now I understand. Also, a vector is a n x 1 matrix projecting 1D space into n-D space with Rank one.
Inaam Ilahi (3 months ago)
I had to watch this video twice to understand it. But after I did understand it; then I came to know about the awesomeness of the video.
Harry M (3 months ago)
Is it possible to calculate the angle between the vectors without using the law of cosines? Maybe scale both of them to length = 1?
aida bach (3 months ago)
2:57
JustInCase (3 months ago)
I feel like I am close before understanding linear algebra, but I guess I have to watch this video again :D
xsli2 (3 months ago)
I highly respect and love this professor. However, to be honest, this video is very confusing. Please check out this you-tube video, which explains dot product much more clearer: https://www.youtube.com/watch?v=FrDAU2N0FEg&feature=youtu.be
Արման (3 months ago)
This video was needlessly overcomplicated for such an easy topic. It is sometimes fascinating that some unrelated things can be corresponding to each other, but that's just a bonus and IMO should not be the default explanation for the dot product of vectors. I was expecting to see an intuitive way to grasp why x1*x2+y1*y2+z1*z2 were exactly |a||b|cos(alpha). Similarly instead of 'bending the two-dimensional space' to explain this you could just use the fact that bcos(alpha) is the b's projection onto an axis under exactly alpha angle. That could be explained intuitively too. While this video in my opinion does not address the essence of dot product and the fundamental 'why' still is unanswered by it.
BENJAMIN ESCOBAR (3 months ago)
I´m so in love with your videos, thank you so much for making understanding maths so awesome
sushant vaidik (3 months ago)
but what is projection? You never defined what it means by "w projected onto the line that passes through origin and the tip of v" in this or prior chapters.
Bakermen flabalitsh (3 months ago)
is that actually the liner algebra we took in school, i mean i took it as a simple way to find x1,x2,x3 etc and learned about the matrices on my own, but still everything i'v learned isn't like that piece of art kind of playlist.
E K (3 months ago)
Hey this series has helped me understand linear algebra to a degree that I didn’t think I ever could. That being said, this video is the point where I got confused. I see a lot of people in this comment section with the same visualization problem I had and I thought this might help you because it helped me. The dot product alone isn’t the projection of one vector onto another in itself. The formula for projection of u onto v is ( (u•v)/|v^2| )*v where |v^2| is the length of v squared. So this means that after you take the dot product you still need to divide the result by the magnitude of the initial vector and then set it in the direction of the initial vector (hence the *v at the end of the formula and the second division of the magnitude of v resulting in v^2 being on the bottom) Hope this helps
Asdayasman (3 months ago)
Ok I was kinda keepin' up but now I'm gosh darn fucked. I think I need to rewatch a bunch.
Eric (3 months ago)
Dude that thing just clicked in my brain and it seriously feels like a drug
How all of these relate to work done along a line?
Alessandro Giannini (3 months ago)
The overall series in great but I lost myself in this video. There's one fundamental thing that I don't grasp. In 10:10 the 2x1 matrix transform a vector in a point that is in the diagonal number line. But in 12:40 an apparently similar 2x1 matrix transform the vector in a point on X axe.. The point is the key because the diagonal line is the reason why we can say that a 2x1 matrix and a 1x2 vector are the same thing
Glenn W (3 months ago)
you are amazing dude
This is greatt.. Btw can you make same playlist for linear algebra upon polynomials? Thank you so much <3
Naser h rezayi (3 months ago)
You are a teacher par excellence.
Larry Wen (3 months ago)
I went through it for more than 1 hour pausing at each point made. I have never attended college and learned through textbooks recommended by first class colleges and the Khan Academy teachings (in particular) to get my engineering credentials for a living. I jammed into my head all these math proofs like an Ape and try to relate them to the real world of tangible things. Thank God that I found You to light up the bulbs and cast away the shadows (vague conjectures of realities). Example on dot product. You sum it beautifully as a linear transformation from 2D space not defined as numerical vectors but projecting space onto a diagonal copy of a number line. I take this and others as wings to fly now. Yes. I signed onto Patreon as a small token of appreciation.
Eltarionus (4 months ago)
Bravo. Finally, now I understand the sense of dot product, thank you for such a clear and precise explanation with all these marvelous visualizations!
Eltarionus (4 months ago)
There is maybe only one thing that can make it better: direct mentioning about cosine formula: a · b = |a| |b| cos <a,b> .
Taha Magdy (4 months ago)
Math is built on axioms and definitions which are things we believe in this is a one-to-one mapping to religions. by the way, read about Islam.
joe bob (4 months ago)
If the dot product of two vectors is defined as the LENGTH of the projection on a vector multiplied by the LENGTH of the vector being projected on then how can the resulting value ever be negative? I thought that length could not be negative!?!
Jenni H (4 months ago)
Love it, so clear. Always come back to watch it when confused! Hope it is always here.
Sivasankar (4 months ago)
Now, I know what is dot product but can somebody please tell me why do we need and its applications? Why do we want to convert from 2D to 1D?
Himanshu Singh Chauhan (4 months ago)
Can you please make a video on inner product space.
Jordan Harry (4 months ago)
11:16 Here you just finished talking about how you can get to [ 3u_x 3u_y ] by thinking of how i-hat and j-hat get scaled when applying the whole linear transformation of projecting and scaling all at once. But I think it's worth breaking it down into the successive application of projecting onto u-hat (which you already describe is the linear transformation given by [ u_x u_y ]), and then applying the transformation of scaling that resulting line by 3. When you focus on that last part, you can ask the same question we've been asking the whole time when dealing with linear transformations: what happens to the unit vector basis of our coordinate system? That is, what happens to u-hat? Well, it's clear that if the transformation is simply a stretching of a factor of 3, then u-hat (a unit vector) must go to 3. That means that we can write our second linear transformation as the one-by-one matrix that just represents the one-dimensional number that our one-dimensional unit vector ends up at: [ 3 ]. So, our full project-and-stretch linear transformation can be written as the successive application of the projection matrix [ u_x u_y ] and our stretching matrix [ 3 ], which (happy day!) gives us the same result [ 3u_x 3u_y ]! And this way we get to approach the same problem but using the composition of two linear transformations that you already beautifully defined! Edit: My only problem with what I just said is it feels like I have to go FROM treating u-hat as just the unit vector in two-dimensional space that happens to lie on the line we're projecting to, TO treating u-hat as the new one-dimensional basis vector of our new coordinate space. Maybe someone here can tell me if that's an okay thing to do or not :)
Mihir Gupta (4 months ago)
Now I know why dot product of two perpendicular vectors is 0. Such an amazing series, loving it.
NukeML (5 months ago)
Joker77 (5 months ago)
I'm a bit irritated because of the order of the videos. If you look at the chapter number in the name, they are in the wrong order, but if you look at the announcement of the next video, the order seams to fit. Are they named wrong?
Sandeep Kumar (5 months ago)
wow
rexeon ma (5 months ago)
There are also some not beautiful things with dot product, cause you can't restore the transformed vector by the transformation and the dot product.
yarepka 1 (5 months ago)
I damaged a pencil with my teeth :( I'm trying to get an idea of this video for 4 days..
MAFAGAFO SUSPEITO (5 months ago)
Já se foram quase 4 dias e aqui estou eu...