I Looking for deductions to find the angle between vectors

  • Thread starter opus
  • Start date

opus

Gold Member
683
128
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 doesnt 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?
 
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).
 

opus

Gold Member
683
128
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.
 

PeroK

Science Advisor
Homework Helper
Insights Author
Gold Member
2018 Award
8,787
3,150
So, you want to go from:

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

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 doesnt mention it for sine.
 

opus

Gold Member
683
128
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.
 

Orodruin

Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
2018 Award
15,062
5,275
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.
 

opus

Gold Member
683
128
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)}##
 
32,108
3,993
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.
 

Orodruin

Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
2018 Award
15,062
5,275
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.
 

robphy

Science Advisor
Homework Helper
Insights Author
Gold Member
5,367
652
Yes, there is an ambiguity in the notation [itex]\sin(\vec A,\vec B)[/itex] since [itex]\sin\theta[/itex] is an odd-function of [itex]\theta [/itex]. Of course, [itex]\cos\theta[/itex] is an even function.

Given two vectors [itex]\vec A [/itex] and [itex]\vec B [/itex],
one might interested in "the [non-negative] angle-between-the-vectors" [itex] |\theta_B-\theta_A| [/itex]
or the "[signed] angle from [itex]\vec A [/itex] to [itex]\vec B [/itex]" [itex] (\theta_B-\theta_A) [/itex] , 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).
 

opus

Gold Member
683
128
Very helpful everyone, thank you.
 

Ray Vickson

Science Advisor
Homework Helper
10,698
1,697
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.##
 

opus

Gold Member
683
128
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?
 

Want to reply to this thread?

"Looking for deductions to find the angle between vectors" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving

Top Threads

Top