Let 𝐴 be the vector one, negative two, one and 𝐵 be the vector negative two, one, two. Find the vector component of 𝐴 in the direction of 𝐵.
We’re given the components of two vectors 𝐴 and 𝐵. And we have to find the vector component of one of those vectors in the direction of the other. First, we need to know for any two vectors 𝐴 and 𝐵 what the vector component of 𝐴 in the direction of 𝐵 means. If we’re given any two vectors 𝐴 and 𝐵, and to be clear these two vectors I’ve drawn aren’t supposed to be accurate representations of the vectors 𝐴 and 𝐵 in the question, then I can write the vector 𝐴 as the sum of two other vectors 𝑢 and 𝑣. Where 𝑢 points along the same line as the vector 𝐵, we say that 𝑢 is in the direction of 𝐵, and where 𝑣 is perpendicular to 𝐵. And in fact, 𝑢 and 𝑣 with these properties are unique. There’s exactly one pair of 𝑢 and 𝑣, such that 𝑢 is in the direction of 𝐵, 𝑣 is perpendicular to 𝐵, and 𝑢 plus 𝑣 equals 𝐴. The vector component of 𝐴 in the direction of 𝐵, also known as the vector projection of 𝐴 onto 𝐵, is the vector 𝑢. This vector 𝑢 is the vector we have to find.
Luckily for us, there’s a formula for 𝑢 in terms of the vectors 𝐴 and 𝐵, which we have in the question. But I’d like to quickly derive this formula rather than just state it as I think it gives some insight. The first thing to notice is that as this vector 𝑢 is in the direction of the vector 𝐵, it’s a multiple of the vector 𝐵. So let’s write it as 𝑘 times 𝐵, where 𝑘 is some number. Now the question becomes what is the value of 𝑘? What multiple of 𝐵 is the vector 𝑢. Well, it turns out that 𝑢 is the multiple of 𝐵, whose dot product with 𝐵 is the same as 𝐴’s dot product with 𝐵.
We can show this algebraically by taking 𝐴 equals 𝑢 plus 𝑣 and finding the dot product with 𝐵 on the both sides. Now, the dot product is distributive over vector addition. So we can expand the brackets on the right-hand side to get 𝑢 dot 𝐵 plus 𝑣 dot 𝐵. And remember that 𝑣, by definition, is perpendicular to 𝐵. And so its dot product with 𝐵 is zero. And swapping the site, we get 𝑢 dot 𝐵 equals 𝐴 dot 𝐵, as claimed. How does this help us? Well, we remember that 𝑢 is 𝑘 times 𝐵 for some number 𝑘 that we want to find. We substitute 𝑘𝐵 for 𝑢. We use the fact about how the dot product interacts with scalar multiplication to write the left-hand side as 𝑘 times the dot product of 𝐵 and 𝐵. And the dot product of 𝐵 and 𝐵 is just some number, which we can divide by to find the value of 𝑘. And having found the value of 𝑘, we can substitute it to find 𝑢 in terms of 𝐴 and 𝐵.
We find that 𝑢 is 𝐴 dot 𝐵 over 𝐵 dot 𝐵 times the vector 𝐵. This is a formula which would make sense to remember. But it’s easiest to remember if we understand where it comes from. If we understand that 𝑢 must be a multiple of 𝐵, then we’ll know that the formula must have the form 𝑢 equals something times 𝐵. And if you remember that 𝑢 dot 𝐵 is 𝐴 dot 𝐵, it’s not hard to find out what that something must be. We can check our formula by dotting both sides with 𝐵 and seeing that the 𝐵 dot 𝐵s cancel.
Now that we found our formula, all we have to do is apply it. We are told in the question that 𝐴 is the vector of one, negative two, one and 𝐵 is the vector negative two, one, two. And we substitute these components in. We evaluate the dot product in the numerator and the denominator, starting with the numerator. We get one times negative two plus negative two times one plus one times two. And it’s exactly the same process in the denominator, where we get negative two times negative two plus one times one plus two times two. Evaluating these expressions, we get negative two in the numerator and nine in the denominator.
Now, we just have to multiply each of the components of the vector by negative two-ninths. Negative two-ninths times negative two is four-ninths. Negative two-ninths times one is negative two-ninths. And negative two-ninths times two is negative four-ninths. This is the vector 𝑢 that we were looking for. It’s the vector component of 𝐴 in the direction of 𝐵, also known as the vector projection of 𝐴 onto 𝐵. We found this vector 𝑢 by entering the values of vectors 𝐴 and 𝐵 into a formula we found for 𝑢 in terms of 𝐴 and 𝐵. And we saw one way of deriving that formula. With some understanding of where the formula comes from, it becomes easier to remember.