Video Transcript
Dot Product in Two Dimensions
In this video, weโll learn how to
find the dot product between two vectors. Weโll see one way of interpreting
this geometrically. And weโll see how we can use this
to find various properties of our vectors, for example, the magnitude of two
vectors, the angle between two vectors, and how to determine whether two vectors are
perpendicular. First, weโre going to need to
discuss exactly what we mean by the dot product between two vectors. So letโs start with a vector ๐ฎ
equal to the vector ๐ฅ one, ๐ฆ one and a vector ๐ฏ equal to the vector ๐ฅ two, ๐ฆ
two.
Now weโve already seen one way of
multiplying a vector. For example, we know how to do
scalar multiplication of a vector and a scalar. In this scenario, we would just
multiply each component of our vector by our scalar. However, thatโs the product between
a vector and a scalar. The dot product is going to give us
a method of multiplying two vectors together. We represent the dot product with a
dot between our two vectors. This says the dot product between
the vector ๐ฎ and the vector ๐ฏ. Now, to find the dot product
between two vectors, we want to find the sum of the product of corresponding
components of our two vectors. So for vectors ๐ฎ and ๐ฏ, the dot
product between ๐ฎ and ๐ฏ will be ๐ฅ one times ๐ฅ two plus ๐ฆ one times ๐ฆ two. All we do is multiply the
corresponding components and then add all of these together.
And thereโs something thatโs worth
pointing out here. First, we can see we start with two
vectors. However, the result of this is just
going to be a number. Because we just end up with a
number or a scalar, sometimes the dot product is called the scalar product. Next, we can see in our definition
we need to multiply corresponding components together. So we can only take the dot product
between two vectors if they have the same number of components, or in other words
they need to have the same dimension. Another thing worth pointing out
here is the position of the dot in the dot product. We write this in the middle and not
at the base of our two vectors. Finally, itโs worth pointing out we
can in fact extend this definition to vectors with more dimensions.
If instead of the vectors ๐ฎ and ๐ฏ
we have the vectors ๐ฎ star and ๐ฏ star, where the components of ๐ฎ star are ๐ข one,
๐ข two all the way up to ๐ข ๐ and the components of ๐ฏ star are ๐ฃ one, ๐ฃ two all
the way up to ๐ฃ ๐, then once again we can calculate the dot product of these two
vectors in exactly the same way. We take the product of
corresponding components and then add all of these together. ๐ฎ star dot ๐ฏ star is equal to ๐ข
one ๐ฃ one plus ๐ข two ๐ฃ two all the way up to adding ๐ข ๐ ๐ฃ ๐. And, of course, this only makes
sense if ๐ฎ star and ๐ฏ star have the same dimension. However, in this video, weโre going
to focus on the case of two dimensions. Letโs now see an example of how we
would calculate the dot product of two vectors.
Given the vector ๐ฏ is seven,
two and the vector ๐ฎ is three, six, find the dot product between ๐ฎ and ๐ฏ.
In this question, weโre given
two vectors, and we can see that both of these vectors are in two
dimensions. This is because each vector has
two components. Weโre asked to find the dot
product between these two vectors. So letโs start by recalling how
we calculate the dot product between two vectors in two dimensions. We recall if ๐ฎ is the vector
๐ฅ one, ๐ฆ one and ๐ฏ is the vector ๐ฅ two, ๐ฆ two, then to calculate the dot
product between ๐ฎ and ๐ฏ, we want to add together the products of the
corresponding components. In other words, ๐ฎ dot ๐ฏ is
equal to ๐ฅ one times ๐ฅ two plus ๐ฆ one times ๐ฆ two.
In the question, weโre told
that ๐ฎ is the vector three, six. So weโll set ๐ฅ one equal to
three and ๐ฆ one equal to six. And weโre also told that ๐ฏ is
the vector seven, two. So weโll set ๐ฅ two equal to
seven and ๐ฆ two equal to two. This means weโre now ready to
calculate the dot product between ๐ฎ and ๐ฏ. We need to find the product of
all the corresponding components and then add these together. In this case, thatโs three
times seven plus six times two. And this gives us 21 plus 12,
which we can evaluate is equal to 33. Therefore, we were able to show
the dot product between ๐ฎ and ๐ฏ is 33.
However, there is one more
question we can ask. What if instead we were asked
to calculate the dot product between ๐ฏ and ๐ฎ? To calculate the dot product
between ๐ฏ and ๐ฎ, we would set up our dot product in exactly the same way. However, the roles of ๐ฎ and ๐ฏ
would be switched around. Now, to calculate this dot
product, we want to multiply the corresponding components and add the
results. This gives us seven times three
plus two times six. But now we can notice something
interesting. We know that multiplication is
commutative, so we couldโve written these in the opposite order. And then, we would get exactly
the same statement as the dot product between ๐ฎ and ๐ฏ. And because multiplication is
always commutative, we can always do this.
So for these two specific
vectors, the dot product between ๐ฏ and ๐ฎ is equal to 33. However, more importantly, for
any two vectors ๐ฎ and ๐ฏ, the dot product between ๐ฎ and ๐ฏ is going to be
equal to the dot product between ๐ฏ and ๐ฎ. And of course, itโs worth
pointing out the same statement holds in higher dimensions.
Letโs see an example of how we can
use the dot product to calculate the magnitude of a vector.
๐ dot ๐ is equal to
blank.
In this question, weโre given a
vector ๐ and weโre asked to find an expression for the dot product between the
vector ๐ and itself. Thereโs a few different ways of
doing this. Letโs start with vector ๐
being a two-dimensional vector. So letโs let ๐ be the vector
with horizontal component ๐ one and vertical component ๐ two. We want to find an expression
for the dot products of ๐ with itself. Now, remember, to find a dot
product between two vectors, we need to multiply the corresponding components
and then add all of the results. So in this case, we multiply
the first components together. Thatโs ๐ one times ๐ one. And then we need to add the
second components multiplied together. Thatโs ๐ two times ๐ two. And of course we can simplify
this to give us ๐ one squared plus ๐ two squared.
Now, we could leave our answer
like this for the two-dimensional case. However, this is actually equal
to a very useful result. We need to notice that this
appears in the modulus of ๐. Recall that the modulus of a
vector is the sums of the squares of its component and then we take the square
root of this value. In this case, the modulus of ๐
is the square root of ๐ one squared plus ๐ two squared. And this is of course the
square root of the expression we have for the dot product between ๐ and
itself.
So if we were to square the
modulus of ๐, then we would see something interesting. The modulus of ๐ squared is ๐
one squared plus ๐ two squared, the sums of the squares of its components. Therefore, weโve shown, in the
two-dimensional case, the dot product between ๐ and itself is equal to the
modulus of ๐ squared. And in fact, we can show
exactly the same result is true for vectors in any number of dimensions. If we let ๐ be the
๐-dimensional vector ๐ one, ๐ two all the way up to ๐ ๐, then we can
calculate the dot product between the vector ๐ and itself in exactly the same
way. We multiply the corresponding
components and add the results. This is ๐ one times ๐ one
plus ๐ two times ๐ two, and we add all the way up to ๐ ๐ times ๐ ๐.
We can simplify each term in
exactly the same way we did before. And in exactly the same way,
the sums of the squares of the components will be the modulus of ๐ squared. Therefore, we were able to show
the dot product between a vector ๐ and itself is equal to the modulus of ๐
squared.
Letโs now see how we can use this
result to help us prove a very useful formula to do with the dot product. We want to use the dot product to
help us find the angle between two vectors. So letโs consider the following two
vectors: vector ๐ฎ and vector ๐ฏ. And remember, whatโs important
about vectors is their magnitude and direction, so we can draw both of our vectors
starting at the origin. We want to find the value of ๐,
which is the angle between our two vectors. And letโs also say that ๐ฎ is the
vector ๐ฅ one, ๐ฆ one and ๐ฏ is the vector ๐ฅ two, ๐ฆ two.
And before we continue, itโs worth
pointing out that the exact same reasoning weโre going to use will work in higher
dimensions. However, itโs easier to visualize
this in two dimensions. To help us find the value of ๐,
weโre going to use what we know about the dot product and some trigonometry. First, we construct the following
triangle by constructing the vector ๐ฏ minus ๐ฎ. And we know we can find an
expression for this vector by subtracting ๐ฎ from ๐ฏ component-wise. Itโs the vector ๐ฅ two minus ๐ฅ
one, ๐ฆ two minus ๐ฆ one.
At this point, thereโs two things
we can do to this diagram. Letโs first try applying the laws
of cosines to this diagram. Remember, we can find the lengths
of these vectors by taking the modulus of them. And our angle ๐ is opposite the
side with length modulus of ๐ฏ minus ๐ฎ. Therefore, applying the laws of
cosines to this triangle, we get the modulus of ๐ฏ minus ๐ฎ all squared is equal to
the modulus of ๐ฎ squared plus the modulus of ๐ฏ squared minus two times the modulus
of ๐ฎ times the modulus of ๐ฏ multiplied by the cos of ๐.
Now, if we knew the vectors ๐ฎ and
๐ฏ, we could find the angle between them by using this formula. However, we can actually simplify
this formula by using what we know about dot products. Remember, a vector dot producted
with itself is equal to its magnitude squared. Therefore, the magnitude of ๐ฏ
minus ๐ฎ all squared is actually equal to the vector ๐ฏ minus ๐ฎ dot producted with
the vector ๐ฏ minus ๐ฎ. And we know an expression
component-wise for the vector ๐ฏ minus ๐ฎ. So we can write these two vectors
out in full and actually calculate the dot product. We need to multiply the first
components together and then add on the product of the second components. This simplifies to give us ๐ฅ two
minus ๐ฅ one all squared plus ๐ฆ two minus ๐ฆ one all squared.
Letโs now distribute the squares
over both of our parentheses. Distributing and rearranging, we
get ๐ฅ two squared plus ๐ฅ one squared minus two ๐ฅ one ๐ฅ two plus ๐ฆ two squared
plus ๐ฆ one squared minus two ๐ฆ one ๐ฆ two. And at first, it might not seem
like weโre simplifying at all. However, we can now simplify this
expression. First, we notice ๐ฅ one squared
plus ๐ฆ one squared is the modulus of ๐ฎ squared. Similarly, ๐ฅ two squared plus ๐ฆ
two squared is the modulus of ๐ฏ squared. And for our last two terms, weโre
going to start by taking out the shared factor of negative two. And this gives us an extra term of
negative two times ๐ฅ one ๐ฅ two plus ๐ฆ one ๐ฆ two.
But we know how to simplify ๐ฅ one
times ๐ฅ two plus ๐ฆ one times ๐ฆ two by using our dot product. Inside of our parentheses is
exactly the dot product between the vectors ๐ฎ and ๐ฏ. So letโs think about exactly what
weโve shown. We found two different expressions
for the modulus of ๐ฏ minus ๐ฎ all squared. Therefore, these two expressions
have to be equal. So letโs set both of these two
expressions equal to each other. We can immediately see some ways of
simplifying. For example, we can subtract the
modulus of ๐ฎ squared and the modulus of ๐ฏ squared from both sides of the
equation. This leaves us with negative two
times the modulus of ๐ฎ multiplied by the modulus of ๐ฏ times the cos of ๐ is equal
to negative two times the dot product between ๐ฎ and ๐ฏ.
Of course, we can simplify this
further. We can divide through by negative
two. And remember, when we initially set
up this problem, we wanted to find the angle between vectors ๐ฎ and ๐ฏ. So in particular, it wouldnโt be
very useful if either ๐ฎ or ๐ฏ was the zero vector because then we couldnโt find the
angle between these vectors anyway. It wouldnโt make sense. So in this context, it makes sense
that the modulus of ๐ฎ and the modulus of ๐ฏ is not zero. So weโll divide through by this,
and this gives us a really useful result. If ๐ is the angle between the
vectors ๐ฎ and ๐ฏ, then the cos of ๐ will be equal to the dot product between ๐ฎ
and ๐ฏ divided by the magnitude of ๐ฎ times the magnitude of ๐ฏ. And of course, we can solve for ๐
by taking the inverse cosine of both sides of this equation.
And there is something interesting
worth pointing out about our value of ๐. Our value of ๐ is going to be
between zero and 180 degrees inclusive. And this makes sense if we looked
at our diagram. Of course, in any diagram, thereโs
two possible values for ๐. We could have the internal angle
between our two vectors, or we could have the external angle between these two
vectors. Both are solutions to this
equation; however, weโre interested in the internal angle.
Letโs see an example of how we
could use this to find the angle between two vectors.
Given the vectors ๐ฎ four, one
and ๐ฏ two, five, find their dot product and the angle between them to one
decimal place.
In this question, weโre given
two two-dimensional vectors ๐ฎ and ๐ฏ, and weโre asked to determine two
things. First, we need to find the dot
product between these two vectors. Then, we need to find the angle
between these two vectors, and we need to give our answer to one decimal
place. To do this, letโs start by
recalling how we calculate the dot product between two vectors. We recall if ๐ฎ is the vector
๐ฅ one, ๐ฆ one and ๐ฏ is the vector ๐ฅ two, ๐ฆ two, then the dot product between
๐ฎ and ๐ฏ is the sum of the products of their corresponding components. So ๐ฎ dot ๐ฏ is ๐ฅ one times ๐ฅ
two plus ๐ฆ one times ๐ฆ two.
We want to use this to find the
dot product between the vector four, one and the vector two, five. We need to multiply the
corresponding components together and then add these. Thatโs four times two plus one
times five. And of course, this simplifies
to give us eight plus five, which is equal to 13. The next part of this question
wants us to determine the angle between these two vectors. So letโs start by recalling how
we do this. We recall if ๐ is the angle
between the vectors ๐ฎ and ๐ฏ, then the cos of ๐ will be equal to the dot
product of ๐ฎ and ๐ฏ divided by the modulus of ๐ฎ times the modulus of ๐ฏ.
Weโve already found the dot
product between these two vectors, so letโs find the modulus of each vector. Remember, to find the modulus
of a vector, we need to sum the squares of the components and take the square
root of this value. The modulus of ๐ฎ is the square
root of four squared plus one squared, which we can calculate is equal to the
square root of 17. Similarly, the modulus of ๐ฏ
will be the square root of two squared plus five squared, which we can calculate
is the square root of 29. Now we can substitute these
values into our formula. Doing this gives us the cos of
๐ is equal to 13 divided by the square root of 17 times the square root of
29.
Finally, we can find our value
of ๐ by taking the inverse cosine of both sides of the equation. This gives us ๐ is equal to
the inverse cos of 13 divided by root 17 times root 29, which to one decimal
place is 54.2 degrees, which is our final answer. Itโs also worth pointing out it
can be useful to check our answer by sketching both of these vectors on a
diagram. If we were to do this, we would
get a sketch which looks like this. The horizontal component of ๐ฎ
is four, and the vertical component is one. And the horizontal component of
๐ฏ is two, and the vertical component is five. And we draw both vectors
starting from the origin, giving us that ๐ is the angle between them. We could then also find the
value of ๐ by using trigonometry. Either way, we showed the dot
product between these two vectors was 13 and the angle between them to one
decimal place was 54.2 degrees.
Letโs now see an example where the
angle between our vectors is obtuse.
Find the angle between the
vectors ๐ฎ three, negative two and ๐ฏ negative five, negative three. Give your answer to one decimal
place.
We want to find the angle
between two vectors. So letโs start by sketching the
situation. Our vector ๐ฎ has horizontal
component three and vertical component negative two. And our vector ๐ฏ has
horizontal component negative five and vertical component negative three. We want to find the angle
between these two vectors. This will be the angle ๐, and
we know a formula to do this. We recall if ๐ is the angle
between two vectors ๐ฎ and ๐ฏ, then the cos of ๐ will be equal to the dot
product of ๐ฎ and ๐ฏ divided by the modulus of ๐ฎ times the modulus of ๐ฏ.
So to find our value of ๐, we
need to find the dot product of our two vectors and both of their
magnitudes. Letโs start with the dot
product. Remember, to find the dot
product of two vectors, we multiply their corresponding components and add the
result. This gives us three times
negative five plus negative two times negative three, which we can calculate is
equal to negative nine. Letโs now find the modulus of
our vectors ๐ฎ and ๐ฏ. Letโs start with the modulus of
๐ฎ. We need to take the square root
of the squares of the sum of our components. The modulus of ๐ฎ is the square
root of three squared plus negative two all squared, which we can calculate is
the square root of 13.
We can do the same to find the
modulus of ๐ฏ. Itโs the square root of
negative five squared plus negative three squared, which is the square root of
34. Now we can substitute these
values into our formula and take the inverse cosine to find our value of ๐. This gives us that ๐ will be
the inverse cos of negative nine divided by the square root of 13 times the
square root of 34, which to one decimal place is our final answer of 115.3
degrees.
Letโs now see one last example of
how this angle formula can be used.
Given that ๐ is the vector
negative four, ๐ and ๐ is the vector negative 12, negative three and ๐ is
perpendicular to ๐, determine the value of ๐.
In this question, weโre given
two vectors and weโre told that ๐ is perpendicular to ๐. We need to use this to
determine our value of ๐. To answer this question, letโs
first recall if ๐ and ๐ are perpendicular, then the angle between them must be
equal to 90 degrees. And this is useful because we
also know a formula involving the angle between two vectors. We recall if ๐ is the angle
between two vectors ๐ and ๐, then the cos of ๐ will be equal to the dot
product of ๐ and ๐ divided by the magnitude of ๐ times the magnitude of
๐. And in our question, our
vectors are perpendicular, so the angle between them, ๐, should be equal to 90
degrees.
So we can ask the question,
what happens if we substitute the value of 90 degrees into this formula? Well, the cos of 90 degrees is
equal to zero. Therefore, the dot product of
๐ and ๐ divided by the magnitude of ๐ times the magnitude of ๐ should be
equal to zero. And we can see the only way
this will happen will be if the dot product between ๐ and ๐ is zero. This gives us a really useful
result about two vectors. If ๐ฎ and ๐ฏ are perpendicular,
then their dot product must be equal to zero. We can now use this to answer
our question. ๐ and ๐ are perpendicular, so
their dot product is equal to zero. So we can find an equation for
๐ by solving the dot product of these two vectors is equal to zero.
Remember, to find the dot
product of two vectors, we multiply the corresponding components and add the
results. So the dot product of ๐ and ๐
is negative four times negative 12 plus ๐ times negative three, which we can
simplify. Negative four times negative 12
is 48, and ๐ times negative three is negative three ๐. And remember, this is equal to
zero because ๐ and ๐ are perpendicular. Now we can just rearrange this
equation for ๐. We add three ๐ to both sides
of our equation and divide through by three, giving us if the vectors ๐ and ๐
are perpendicular, then our value of ๐ must be equal to 16.
Now letโs go over the key points of
this video. First, we saw if ๐ฎ is a vector
with components ๐ข one, ๐ข two up to ๐ข ๐ and ๐ฏ is the vector with components ๐ฃ
one, ๐ฃ two up to ๐ฃ ๐, then we can calculate the dot product between ๐ฎ and ๐ฏ by
multiplying the corresponding components and then adding all of these together. We also saw this only makes sense
if they have the same number of components. In other words, our vectors must be
of the same dimension. We also saw that the result we get
from the dot product of two vectors is a scalar. So this is sometimes called the
scalar product.
Next, we saw a few useful results
involving the dot product, the most important of which is if ๐ is the angle between
๐ฎ and ๐ฏ, then the cos of ๐ will be equal to the dot product of ๐ฎ and ๐ฏ divided
by the modulus of ๐ฎ times the modulus of ๐ฏ. And this gives us a useful
result. If ๐ฎ and ๐ฏ are perpendicular
vectors, the angle between them should be 90 degrees. And the cos of 90 is zero, so the
only way this can happen is if the dot product between ๐ฎ and ๐ฏ is zero.