I Looking for deductions to find the angle between vectors

AI Thread Summary
The discussion centers on deriving the sine and cosine of the angle between two vectors, as presented in Kleppner's "Intro Mechanics." The cosine is derived from the dot product formula, while the sine can be approached using the cross product and the relationship between the area of a parallelogram formed by the vectors. Participants highlight the importance of understanding both the geometric and algebraic definitions of the dot and cross products, emphasizing the use of trigonometric identities to relate sine and cosine. The conversation also touches on the significance of defining angles in terms of their signed or non-negative nature, particularly in higher-dimensional vector spaces. Overall, the thread provides insights into the mathematical relationships between vectors and their angles.
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?
 
Mathematics 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 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 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 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 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 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 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 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?
 
Back
Top