Looking for deductions to find the angle between vectors

Click For Summary
SUMMARY

The discussion focuses on deriving the sine and cosine of the angle between two vectors, specifically using the dot product and cross product. The cosine is defined as $$\cos(\vec A, \vec B) = \frac{\vec A ⋅\vec B}{|A||B|}$$, while the sine can be derived using the identity $$\sin(\vec A, \vec B) = \sqrt{1 - \cos^2(\vec A, \vec B)}$$. The participants emphasize the importance of understanding these relationships in both 2D and 3D vector spaces, and the discussion includes references to the inner product and geometric interpretations of the sine and cosine functions.

PREREQUISITES
  • Understanding of vector operations, specifically dot product and cross product.
  • Familiarity with trigonometric identities, particularly $$\sin^2(\theta) + \cos^2(\theta) = 1$$.
  • Basic knowledge of vector geometry in 2D and 3D spaces.
  • Proficiency in manipulating mathematical expressions involving vectors and angles.
NEXT STEPS
  • Study the derivation of the sine and cosine functions from the dot and cross products in vector analysis.
  • Explore geometric interpretations of vector operations, particularly in relation to angles between vectors.
  • Learn about the properties of inner products in higher-dimensional vector spaces.
  • Investigate applications of vector angles in physics, such as torque and rotational dynamics.
USEFUL FOR

Students of physics and mathematics, particularly those studying mechanics and vector calculus, as well as educators seeking to enhance their understanding of vector relationships and trigonometric identities.

opus
Gold Member
Messages
717
Reaction score
131
I have a question in my text (Intro Mechanics by Kleppner) and a question is to find the cosine and sine between two vectors.
It gives me the cosine piece: $$\cos(\vec A, \vec B) = \frac{\vec A ⋅\vec B}{|A||B|}$$ which I assume is just from the dot product, but it has no derivation of this, and doesn't mention it for sine.

I've looked around Google for derivations of this, but only find worked examples of problems like the one I have given. Could anyone reference me to the derivations for these?
 
Physics news on Phys.org
In what form do you know the definitions of the dot and cross product of two vectors? If you know them in terms of the angle between the vectors, use that. If you know them only in terms of multiplication of the components (e.g. A.B = AxBx + AyBy + AzBz) then you can draw some triangles and use trigonometry to rewrite A.B in terms of |A|, |B| and the angle between A and B. I would start with 2D vectors because the trig is much simpler, and an answer that works in 2D that doesn't specifically involve the components or Cartesian angles must look the same in 3D (or any D).
 
  • Like
Likes   Reactions: opus
In terms of dot product, I know we can use either ##\vec A⋅\vec B = |A||B|\cos(\theta)## or also ##\vec A ⋅ \vec B = A_1B_1+A_2B_2+A_3B_3##
For the cross product, I derive this by crossing ##\vec A_xi## with ##\vec B## and then cyclically permuting through x,y,z i,j,k to find the other terms.
Not entirely sure of what you mean with the triangles, but I'll try to work something out with that and see what I get.
 
So, you want to go from:

opus said:
In terms of dot product, I know we can use either ##\vec A⋅\vec B = |A||B|\cos(\theta)##

To:

opus said:
It gives me the cosine piece: $$\cos(\vec A, \vec B) = \frac{\vec A ⋅\vec B}{|A||B|}$$ which I assume is just from the dot product, but it has no derivation of this, and doesn't mention it for sine.
 
  • Like
Likes   Reactions: opus
PeroK said:
So, you want to go from:
To:
Yes, just came up with this. Got tripped up for a second on how the book has it labeled as ##\cos(\vec A, \vec B)##

Still working on the sine piece. Currently trying to derive it by using the fact that the magnitude of the cross product of A and B is the area of a parallelogram and go from there.
 
Although you have the possibility of using the cross product and it to some extent may be easier. If you just want the sine and you have the cosine there is a nice trigonometric identity to use ...

In more general vector spaces equipped with an inner product, the angle is defined through the relation you gave in #1.
 
  • Like
Likes   Reactions: opus
Orodruin said:
Although you have the possibility of using the cross product and it to some extent may be easier. If you just want the sine and you have the cosine there is a nice trigonometric identity to use ...

In more general vector spaces equipped with an inner product, the angle is defined through the relation you gave in #1.
I think I may be following.
##\sin^2(\theta)+\cos^2(\theta)=1##
##\implies \sin(\vec A,\vec B) = \sqrt{1-\cos^2(\vec A, \vec B)}##
 
opus said:
I think I may be following.
##\sin^2(\theta)+\cos^2(\theta)=1##
##\implies \sin(\vec A,\vec B) = \sqrt{1-\cos^2(\vec A, \vec B)}##
The right side should be ##\pm \sqrt{1-\cos^2(\vec A, \vec B)}##, where you choose the appropriate sign according to the angle between the two vectors. I.e., if ##0 \le \theta \le \pi## then ##\sin(\theta) \ge 0##, and if ##\pi \le \theta \le 2\pi##, then ##\sin(\theta) \le 0##. And similar for other ranges of angles.

Also, the notation can be appreciably simplified if you simply define ##\theta## as the angle between the two vectors.
 
  • Like
Likes   Reactions: opus
Mark44 said:
The right side should be ##\pm \sqrt{1-\cos^2(\vec A, \vec B)}##, where you choose the appropriate sign according to the angle between the two vectors. I.e., if ##0 \le \theta \le \pi## then ##\sin(\theta) \ge 0##, and if ##\pi \le \theta \le 2\pi##, then ##\sin(\theta) \le 0##. And similar for other ranges of angles.

Also, the notation can be appreciably simplified if you simply define ##\theta## as the angle between the two vectors.
Typically ”the angle between two vectors” refers to the minimal angle of rotation necessary to rotate one to be parallel to the other. This angle is always between zero and pi and therefore the ##\pm## is not necessary in this case.
 
  • Like
Likes   Reactions: opus
  • #10
Yes, there is an ambiguity in the notation \sin(\vec A,\vec B) since \sin\theta is an odd-function of \theta. Of course, \cos\theta is an even function.

Given two vectors \vec A and \vec B,
one might interested in "the [non-negative] angle-between-the-vectors" |\theta_B-\theta_A|
or the "[signed] angle from \vec A to \vec B" (\theta_B-\theta_A) , for example when talking about torque (and wanting the sense, directly) or when writing a computer program.

Since you are following Kleppner's text (and potentially higher-level textbooks),
I suggest you use the signed-angle as a definition [and make that clear],
dropping back into its magnitude as you need to.
This is similar to using displacement as a definition, and [say] distance as a special case (as needed).
 
  • Like
Likes   Reactions: opus
  • #11
Very helpful everyone, thank you.
 
  • #12
opus said:
In terms of dot product, I know we can use either ##\vec A⋅\vec B = |A||B|\cos(\theta)## or also ##\vec A ⋅ \vec B = A_1B_1+A_2B_2+A_3B_3##
For the cross product, I derive this by crossing ##\vec A_xi## with ##\vec B## and then cyclically permuting through x,y,z i,j,k to find the other terms.
Not entirely sure of what you mean with the triangles, but I'll try to work something out with that and see what I get.

Is your question one of wanting to know how to go from (1) to (2) below, or vice-versa?
$$ \begin{array}{cclr}
{\bf A} \cdot {\bf B} &=& A_1 B_1 + A_2 B_2 + A_3 B_3& \hspace{3ex}(1)\\
{\bf A} \cdot {\bf B} & =& |{\bf A}| | {\bf B}| \cos \theta & \hspace{3ex}(2)
\end{array}$$

Well, both forms are unchanged under a rotation, so that if ##{\bf A}' = R {\bf A}## and ##{\bf B}' = R {\bf B}## for a rotation ##R##, we have ##|{\bf A}'| = |{\bf A}|##, etc, and
$$ {\bf A}' \cdot {\bf B}' = {\bf A} \cdot {\bf B}$$ for either way (1) or (2) of defining the dot product.

So, if we rotate the vectors until ##{\bf A}'## points along the ##x_1 -## axis and ##{\bf B}'## lies in the ##x_1\; x_2 -## plane, and letting ##A = |{\bf A}|, B = |{\bf B}|## we have
$${\bf A}' = (A,0,0), \: {\bf B}' = (B \cos \theta, B \sin \theta, 0),$$ so that ##\sum_i A_i B_1 = \sum_i A'_i B'_i = AB \cos \theta.##
 
  • Like
Likes   Reactions: opus
  • #13
Ray Vickson said:
Is your question one of wanting to know how to go from (1) to (2) below, or vice-versa?
$$ \begin{array}{cclr}
{\bf A} \cdot {\bf B} &=& A_1 B_1 + A_2 B_2 + A_3 B_3& \hspace{3ex}(1)\\
{\bf A} \cdot {\bf B} & =& |{\bf A}| | {\bf B}| \cos \theta & \hspace{3ex}(2)
\end{array}$$

Well, both forms are unchanged under a rotation, so that if ##{\bf A}' = R {\bf A}## and ##{\bf B}' = R {\bf B}## for a rotation ##R##, we have ##|{\bf A}'| = |{\bf A}|##, etc, and
$$ {\bf A}' \cdot {\bf B}' = {\bf A} \cdot {\bf B}$$ for either way (1) or (2) of defining the dot product.

So, if we rotate the vectors until ##{\bf A}'## points along the ##x_1 -## axis and ##{\bf B}'## lies in the ##x_1\; x_2 -## plane, and letting ##A = |{\bf A}|, B = |{\bf B}|## we have
$${\bf A}' = (A,0,0), \: {\bf B}' = (B \cos \theta, B \sin \theta, 0),$$ so that ##\sum_i A_i B_1 = \sum_i A'_i B'_i = AB \cos \theta.##
The cosine forms were clear, it was the sin form that confused me at first, but I've got them now. But now that you mention it, I'm not sure what you mean on "change under rotation". Are you referring to how when the derivative of a vector is taken and the magnitude remains constant, that it can only rotate?
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
14
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
1
Views
1K