in this video we're going to explore the dot product again but we're looking at an alternative definition for it recalling that the first version of our dot product said that if we have two vectors v and w we can compute that dot product the value of that dot product by taking the length of each vector separately and multiplying those and then multiplying by the cosine of the angle between them that form is helpful when we want to be thinking about angles between vectors but a lot of times we have components for our vectors and there it's not as obvious of how we would get the angle between them fortunately it turns out that this definition of the dot product is not the only one that works we can also take the dot product of two vectors by literally taking the components here we're taking a three dimensional vector and think of it as lambda one lambda two lambda three is the x y and z components and for the other vector calling them here mu 1 mu 2 mu 3 we take the x components and multiply those then we take the y components and we multiply those down to here and last but not least we take the z components and we multiply them and once we found those products we simply take the sum of those three products notice that this again gives us a scalar value in the end which is what we expected from our earlier definition as well here we had a scalar times a scalar times a scalar and we end up with a scalar here as well it's important to note that it is not obvious that this way to compute a product is even close to the version that has the angle involved we don't see the angles here but somehow miraculously these do tie but somehow these do actually become the same value and we're going to demonstrate that next ideally we would prove this you can see a proof in your textbook or any other textbook in first year calculus however we're going to do it more through a demonstration just reinforce that it would work in practice with a relatively simple example so imagine we have the vector 1 1 and 0 3. let's call that our vector v and that our vector w if we do the component dot product that is certainly the simplest case here because we have the vectors and components v dotted with w is 1 1 dotted with 0 3 and to do that product we take the x component and x component so 1 times 0 and then we add the y component times the y component 1 times 3. so we end up with 0 plus 3 or 3. fair enough what about the angle notation or the angle version well if you look at the angle formula we're going to need to draw those two vectors and again notating where we are here's x here's y the 1 1 vector is up at a 45 degree angle and the zero three vector is all vertical so it would be up here like so zero three and we can tell from the diagram then that the angle between them is going to be 45 degrees or pi over 4 radians if that's the case then we can take the dot product again but now using the angle version angle and length formula and if we do that correctly the length of v is the length of a one by one sided triangle the hypotenuse of that so that would be the square root of one squared plus one squared the length of w is simply three we don't have any component in x so it's easier to calculate and the cosine of pi over four not pi over 2 my apologies the cos of pi over 4 is one of those classic triangle ones it's one over root two well that's handy because we then see root two times 1 over root 2 we get exactly the same value so both definitions give the same value again this isn't a proof that this always works it's an illustration with a single example but you can go back to the textbooks again and see how this is proved in the general case so that we can rely on this dot product with components always giving us the same value as the angular definition we will use both the component and the angle ideas to look at this problem here we're asked to find a vector u which has two components a b so the components are there already magnitude or length one and which is perpendicular to so that involves our angle definition to the vector three i plus seven j or in component notation simply the 3 7 vector okay well the nice thing about this angle information is that we know that 3 7 dotted with a b must equal zero we know that through the cos of the angle having to equal zero if the vectors are perpendicular and i'll use this perpendicular symbol here occasionally as a shortcut so that's using the angle definition well we can also then tie in the component definition and compute the same dot product explicitly as three a plus seven b equals zero now we note that there is one possible solution already if we have a equals zero and b equals zero this would satisfy the equation however is there a problem with that as shortcoming there absolutely is we wanted to get a vector of length 1 and that is not going to be a length one vector it's going to be a length 0 vector if that's what we picked as our solution so that's off the table all right well that's off the table then the other thing we can do is look for positive solutions to this and see what we get well what we can do initially is note that three a would equal negative seven b's or that a would equal negative seven b over three well that's one piece of information that helps show the relationship between the two components the x and y components in our vector that we're looking for we can also bring in the magnitude or the length of the vector as well so we need length one that means that a squared plus b squared all square rooted has to equal one as well there are several ways to work with these two equations it's entirely up to you how you do it i would be tempted simply to sub in this a value here and start solving so if we sub in the a value into our equation here we would have negative seven b over three all squared plus b squared equals one and we can actually square everything here and that'll just get rid of the annoying square root sign and then we can expand these terms inside as well so we'll have 49 over 9 b squared plus b squared equals 1. then we can start factoring things which we'll do on the next page we have b squared and we had 49 over 9 and we had 1b squared equals 1. putting these on a common denominator we would end up with nine over nine here and n and 49 together give us 58 over nine equals one times b squared so b squared is going to equal nine over 58. and so b would equal plus or minus 9 over 58 all square rooted all right if we take the positive root of that the positive square root of 9 over 58 then the a value that matches that is going to be going back a page the a value once we have b is negative seven thirds of that negative seven thirds of our square root of nine over fifty eight does that make any sense well let's draw a quick picture if we draw the vector three seven so three and seven more up than right that is our vector here we have found the vector u which is a negative seven thirds times square root of 9 over 58 time our comma comma the b value which we are taking the positive root to start 9 over 58 like so and there's an interesting thing we can do here which is invert the scalar multiplication both of these have a common factor of the square root of 9 over 58 that lets us pull out that one expression from both the components and what that lets us do is see this vector a little more easily in fact i'm also going to do is pull out a 1 3 or maybe a better way to think of it is multiply this vector by a 3 and then put a 1 3 out front to cancel it so we have 1 3 square root of 9 over 58 and then i take into account that i divided by 3 by multiplying by 3 here and lo and behold this is a direction or captures the direction of the vector all the rest of the information here was put in place to make sure that the magnitude of the vector was one but from here i can tell that we're going left mostly left and up like so but all the calculations would guarantee that it's length one and so what we would see is a perpendicular vector being constructed here which matches our design goal so again what we've done is use the idea of perpendicularity to give us information about the dot product between these two vectors and then we use the component nature of the dot product to be able to solve for the vector we were looking for and get a non-obvious answer to this particular problem it's worth noting that there are other answers to this in particular we skipped over the b value that was negative the square root of all that and we can see just from a simple diagram again that if we have the vector 3 7 we found the vector u that was going this way but of course there's a perfectly valid opposite direction version and all that is the same vector but with the b value flipped so we could have also found the direction u in the opposite direction which would have been we can actually predict that now let's call that u2 it would have been one-third square root of nine over 58 times going back a page here we had negative x and positive y what if we had positive x and negative y that would capture that b value there and that would be a perfectly good alternative perpendicular vector to the vector37 with unit length