53
$\begingroup$

I know how to calculate the dot product of two vectors alright. However, it is not clear to me what, exactly, does the dot product represent.

The product of two numbers, $2$ and $3$, we say that it is $2$ added to itself $3$ times or something like that.

But when it comes to vectors $\vec{a} \cdot \vec{b}$, I'm not sure what to say. "It is $\vec{a}$ added to itself $\vec{b}$ times" which doesn't make much sense to me.

$\endgroup$
  • $\begingroup$ Adding $\vec{a}$ to itself $b$ times ($b$ being a number) is another operation, called the scalar product. The dot product involves two vectors and yields a number. $\endgroup$ – Yves Daoust May 22 '14 at 22:40
38
$\begingroup$

The dot product tells you what amount of one vector goes in the direction of another. For instance, if you pulled a box 10 meters at an inclined angle, there is a horizontal component and a vertical component to your force vector. So the dot product in this case would give you the amount of force going in the direction of the displacement, or in the direction that the box moved. This is important because work is defined to be force multiplied by displacement, but the force here is defined to be the force in the direction of the displacement.

http://youtu.be/KDHuWxy53uM

$\endgroup$
  • 14
    $\begingroup$ For this interpretation it's important that the vector you are projecting onto has unit length, otherwise you are getting the component of vector 1 along vector 2 scaled by the length of vector 2 $\endgroup$ – rVitale May 22 '14 at 22:52
  • $\begingroup$ Work is a good example of magnitude as well as direction. W = F.D, i.e work is the scalar product of the force and displacement vectors (assuming constant force and direction). $\endgroup$ – Tom Collinge May 23 '14 at 7:37
  • 2
    $\begingroup$ This answer is vague. As rVitale points out, your first sentence is only true if the "other" vector is a unit vector. When you say "[pull] a box 10 meters at an inclined angle", you need to be clearer about what the two vectors are: presumably, you mean the force vector and the vector along which the box moves. $\endgroup$ – David Richerby May 23 '14 at 9:08
  • 3
    $\begingroup$ Obviously it helped the OP. The criticism of the King is blasphemous. $\endgroup$ – King Squirrel May 23 '14 at 13:05
  • $\begingroup$ Oh this makes sense now. The dot product is zero when they're orthogonal because they don't have any common component! $\endgroup$ – Kenneth Worden Sep 13 '15 at 18:08
14
$\begingroup$

It might help to think of multiplication of real numbers in a more geometric fashion. $2$ times $3$ is the length of the interval you get starting with an interval of length $3$ and then stretching the line by a factor of $2$.

For dot product, in addition to this stretching idea, you need another geometric idea, namely projection. Imagine the line $L$ parallel to $\vec b$ through the origin $O$. Now imagine projecting from the tip of the vector $\vec a$, along a line perpendicular to $L$, until hitting $L$ at a point $P$. The dot product $\vec a \cdot \vec b$ is the length of the line segment you get by starting with the line segment $OP$ and then stretching the plane by a factor equal to the length of $\vec b$.

I'm being a little careless about plus and minus signs, but those can be incorporated into this picture too.

$\endgroup$
  • 3
    $\begingroup$ What's the importance of this? What do we get from the product? I mean why we are so interested in finding this dot product? $\endgroup$ – Wasiq Noor Jul 24 '18 at 2:26
10
$\begingroup$

Geometric Meaning

As other answers have pointed out, the dot product $\vec{a} \cdot \vec{b}$ is related to the angle $\theta$ between $\vec{a}$ and $\vec{b}$ through:

$$\vec a \cdot \vec b = ||\vec a||_2 \, ||\vec b||_2 \, \cos \theta$$

Assumming that $a$ and $b$ point into the similar directions, i.e. $\theta <= 180°$, we can visualize what this relationship means (skipping the vector arrows and Euclidean norm subscript from now on):

enter image description here

$p$ is the vector resulting from a orthogonal projection of $a$ onto $b$. As the $\cos$ is the ratio between adjacent leg ($p$) and hypothenuse ($a$) in the right triangle

$$\cos \theta = \frac{||p||}{||a||}$$

we get for the inner product:

$$a \cdot b = ||a|| \, ||b|| \, \frac{||p||}{||a||} = ||p|| ||b||$$

So, the inner product is the length of the vector $p$, the projection of $a$ onto $b$, multiplied by the length of $b$. If $a$ and $b$ point into opposite directions, i.e. $\theta > 90°$, the dot product will be the negative: $a \cdot b = - ||p|| ||b||$

Derivation

The problem is that the relationship between the dot product and the angle $\theta$ is not inherently given. By definition,

$$a \cdot b = \sum_i a_i b_i$$

So we need to find a link between this and the cosine. From the definition of the dot product, we can see that it scales proportionally with the input vectors, so for non-unit vectors $u$ and $v$ with the corresponding unit vectors $\hat{u}$ and $\hat{v}$:

$$u \cdot v = ||u|| \cdot ||v|| \cdot \hat{u} \cdot \hat{v}$$

So, for simplicity, we will assume $a$ and $b$ to be unit vectors. Thus, we only need to show

$$a \cdot b = \cos \theta$$

or by the definition of $\cos$, we need to show

$$a \cdot b = ||p||$$

So let's calculate the length of the projection $p$ using $a$ and $b$. We can start by using the Pythagorean theorem:

$$||p||^2 = ||a||^2 - ||c||^2$$

Now, we need to calculate the length of $c$ using the other rectangular triangle:

$$||c||^2 = ||d||^2 - ||b|| - ||p|| ||b||^2$$

As $d = b - a$, we get

$$||p||^2 = ||a||^2 - ||a - b||^2 + ||b|| - ||p|| ||b||^2$$

Replacing the squared Euclidean norms with sums:

$$||p||^2 = \sum_i a_i^2 - \sum_i (a_i - b_i)^2 + \sum_i (b_i - ||p|| b_i)^2$$

Now, we get the $||p||$ out of the sum as it is a scalar:

$$||p||^2 = \sum_i a_i^2 - \sum_i (a_i - b_i)^2 + (1 - ||p||)^2 \sum_i b_i^2$$

Expanding the binomials:

$$||p||^2 = \sum_i a_i^2 - \sum_i a_i^2 + \sum_i 2 a_i b_i - \sum_i b_i^2 + 1 - 2||p|| + ||p||^2 \sum_i b_i^2$$

Making use of the fact that $b$ is a unit vector and thus $\sum_i b_i^2 = 1$:

$$||p||^2 = \sum_i 2 a_i b_i - 2||p|| + ||p||^2$$

This finally gives us

$$||p|| = \sum_i a_i b_i$$

q.e.d.

$\endgroup$
9
$\begingroup$

I think of dot product as the "same-ness" of two vectors. If two vectors are orthogonal (90 degrees on one another) they are 'not at all the same' (dot product =0), and if they are parallel they are 'very much the same'. If you divide their dot product by the product of their magnitude, that is the argument for a cosine-function to find the angle between them. My application for the dot product is finding the angle between two vectors for calculating the force required to pull a cable through two or more pipes with a bend. It's hard to do this in a three dimensional world without knowing how to calculate the dot product. Math makes life really easy :)

$\endgroup$
8
$\begingroup$

First of all, if we write $\vec{a} = a \vec{u}$ and $\vec{b} = b \vec{v}$, where $a$ and $b$ are the length of $\vec{a}$ and $\vec{b}$ respectively, then $$\vec{a} \cdot \vec{b} = (a \vec{u})\cdot (b \vec{v}) = ab \,\, \vec{u} \cdot \vec{v};$$ this is a pretty natural property for a product to have.

Now as for $\vec{u} \cdot \vec{v}$, this is equal to $\cos \theta,$ where $\theta$ is the angle between $\vec{u}$ and $\vec{v}$.

As King Squirrel notes, this is also the length of the projection of $\vec{u}$ onto the line through $\vec{v}$, and also the length of the projection of $\vec{v}$ onto the line through $\vec{u}$.

So altogether we get

$$\vec{a} \cdot \vec{b} = a b \, \cos \theta,$$ and it has the interpretation in terms of projecting one vector onto another that King Squirrel discusses.

$\endgroup$
  • $\begingroup$ does this meaning have any remnant when used over $\Bbb F_p$? $\endgroup$ – Turbo Dec 9 '14 at 7:18
2
$\begingroup$

Dot product is the product of magnitudes of 2 vectors with the Cosine of the angle between them. You can take the smaller or the larger angle between the vectors. That is if theta is the angle then you can take (360-theta) as well.

Geometrically, it will also be equal to (read it slowly) the product of “projection” of magnitude of one vector on the other and the magnitude of the 2nd vector.

In Physics, as an example, Mechanical Work is a scalar and a result of dot product of force and displacement vectors. Like-wise, Magnetic flux is the dot product of magnetic field and vector area

Dot product is a scalar quantity. Watch this video that I have made to understand this better-

What is Dot Product of Vectors

$\endgroup$
0
$\begingroup$

The dot product of two vectors u,v is the area of the parallelogram u,v' where v' is v rotated by 90 degrees.

$\endgroup$
-2
$\begingroup$

When directions are considered, we essentially bring a new dimension to the perception of the entity. (Speed vs Velocity: 5km/h vs 5km/h towards east). Bringing the sense of direction, the question arises, how the entities interact?

In dot product, diagrammatically, what we find is, essentially, the area that is affected by the two entities taken together.

Consider Tetris. You have built a foundation already. Now, a new part is falling and you have the arrow keys to move it around. Two competing vectors, your movement and the falling of the brick/part, will determine how the new part is arranged. The area covered by the falling part would be determined by the dot product of the said vectors.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.