10
$\begingroup$

When we do vector products, we use two different methods. One is the vector dot product, another is vector cross product. The equation of the vector dot product is $$\textbf A \cdot \textbf B =|\textbf A| | \textbf B| \cos\theta,$$ where $\theta$ is the angle between the vectors $\textbf A$ and $\textbf B$.

Why do we use cosine as the expression?

$\endgroup$
2

8 Answers 8

26
$\begingroup$

Let $\vec{\mathbf a} = (x_1, y_1) = (a \cos \alpha, a \sin \alpha)$

Let $\vec{\mathbf b} = (x_2, y_2) = (b \cos \beta, b \sin \beta)$

Then $\theta = |\beta - \alpha|$

By definition,

\begin{align} \vec{\mathbf a} \circ \vec{\mathbf b} &= x_1x_2 + y_1y_2 \\ &= ab(\cos \alpha \cos \beta + \sin \alpha \sin \beta) \\ &= ab \cos(\beta - \alpha)\\ &= ab \cos \theta \end{align}

(Note $\cos(\theta) = \cos(-\theta)$)

$\endgroup$
5
  • 1
    $\begingroup$ I'm not fully sure how $ab*cos(\theta)$ relates to $|a|*|b|$, because I think it should be $|a|*|b|*cos(\theta)$. I am seeing the right symbols though. For the mathematically challenged like me, I've googled a few things. Here's a proof for $ab*cos(\beta+\alpha)$ which is almost the same as $ab*cos(\beta-\alpha)$. khanacademy.org/math/precalculus/x9e81a4f98389efdf:trig/… Moreover, here's a Desmos graph to play around with to get some intuition: desmos.com/calculator/kz0b7jsnm7 $\endgroup$ Mar 30, 2022 at 18:42
  • 2
    $\begingroup$ @MelvinRoest: I have always used $a = |\vec{\mathbf a}|$ and $b = |\vec{\mathbf b}|$. I'm so used to doing it that way that I didn't even think it would be misinterpreted. I was wrong, $\endgroup$ Sep 11, 2022 at 3:52
  • 1
    $\begingroup$ How might we generalize this explanation to 3D and higher dimensions? $\endgroup$
    – user1210203
    Oct 1 at 2:58
  • $\begingroup$ I wonder why this explanations is missing from things like Wikipedia or textbooks? Do authors assume that every single reader is automatically aware of this? $\endgroup$ Nov 30 at 13:38
  • 1
    $\begingroup$ @ScienceDiscoverer : I suppose because the dot product is more fundamental than trigonometry. Also because the dot product can be similarly defined in n-dimensional spaces while the trigonometry "trick" only works in two-dimensional spaces. $\endgroup$ Dec 2 at 6:19
15
$\begingroup$

enter image description here

The dot product of two vectors $A$ and $B$ is just the product of the magnitude of one vector with the scalar projection of the other one on itself. Hence the $cos$ term. Also, note that the $cos$ function is greater for smaller angles, and lesser for larger ones, just like the length of the projection. (both are the same thing, actually.)

$\endgroup$
1
  • $\begingroup$ "with the scalar projection of the other one on itself" I did not understand this part. It took me a few hours to understand it. Here's how I would explain this quote: "with the magnitude of $A$ its shadow onto $B$". If you rearrange $B$ to be the x-axis, then it's easy to see from basic trig knowledge why the magnitude $A$ its shadow onto $B$ would be $|A|*cos(\theta)$. Also note, the image is not fully understandable IMO (as a math layman). This is because the magnitude of $B$ ($|B|$) is not depicted. $|B|$ is the length/magnitude of vector $B$. $\endgroup$ Mar 31, 2022 at 6:30
2
$\begingroup$

This is entirely determined by what we consider a rotation in the plane.

Let $u, v$ be two unit vectors. Let the angle between them be $\theta$, and we can naturally write $v$ as

$$v = u \cos \theta + u_\perp \sin \theta$$

where $u_\perp$ is a unit vector perpendicular to $u$. Then clearly, the dot product is $u \cdot v = \cos \theta$.

But, if you're not in a Euclidean plane anymore, this relationship no longer holds. For example, in a Lorentzian space, instead of cosine and sine, we get hyperbolic functions instead:

$$v = u \cosh \theta + u_\perp \sinh \theta$$

And the dot product is $u \cdot v = \cosh \theta$. A physicist should recognize that this $\theta$ is the "rapidity", and that the form of $v$ given here is exactly that of any Lorentz boost.

So the reason we use sine and cosine in Euclidean space is because they are dictated by the use of sine and cosine in rotations. In other spaces, with different rotation operators, you use the functions that are associated with those rotations instead.

$\endgroup$
2
  • $\begingroup$ What does this have to do with rotations? This just looks like decomposition of $v$ into $v_{\|}$ and $v_{\bot}$ parts. $\endgroup$ Feb 22, 2015 at 20:22
  • 1
    $\begingroup$ Whether you use cosine or hyperbolic cosine depends on what the rotation operations are, on which set of vectors is the set of unit vectors. $\endgroup$
    – Muphrid
    Feb 22, 2015 at 21:17
2
$\begingroup$

The dot product is defined in that way. Note that $cos\theta$ is a suitable function; since by the Schwarz inequality: $$|\mathbf{A} \cdot \mathbf{B}| \leq |\mathbf{A}| |\mathbf{B}|$$ and thus the dot product ranges continuosly between -1 and 1, as $cos \theta$ for $\theta \in [0,\pi] $.

$\endgroup$
0
$\begingroup$

In dot product we use cos theta because in this type of product 1.) One vector is the projection over the other. 2.) The distance is covered along one axis or in the direction of force and there is no need of perpendicular axis or sin theta. In cross product the angle between must be greater than 0 and less than 180 degree it is max at 90 degree. let take the example of torque if the angle between applied force and moment arm is 90 degree than torque will be max. That's why we use cos theta for dot product and sin theta for cross product.

$\endgroup$
0
$\begingroup$

Because here cosine is responsible for doing any type of work e.g work done cosine is use . Here one axis is use for work done I.e x -axis and for x -axis we are using cosine

$\endgroup$
0
$\begingroup$

Cosine is used to make both the vectors point in same direction. For dot product we require both the vectors to point in same direction and cosine does so by projecting one vector in the same direction as other.

$\endgroup$
-2
$\begingroup$

It is actually the definition of the dot product of two vectors.

$\endgroup$
2
  • 11
    $\begingroup$ The point of this question is to ask why one would want to express the dot product as something involving the cosine, not what the definition is. $\endgroup$
    – Danu
    Feb 15, 2015 at 11:31
  • 6
    $\begingroup$ Besides, it is more commonly seen the other way around - the angle $\theta$ is defined by this formula, while the dot product is defined by a symmetric matrix. $\endgroup$ Feb 15, 2015 at 13:57

You must log in to answer this question.