Looking for deductions to find the angle between vectors

In summary: B-\theta_A| .In summary, the conversation discusses the derivation of the cosine and sine between two vectors using the dot product and trigonometry. The cosine is given by the dot product divided by the magnitudes of the vectors, and the sine can be derived using the trigonometric identity. The notation for the angle between two vectors is also discussed, with the text using the minimal angle between the vectors.
  • #1
opus
Gold Member
717
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
  • #2
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
  • #3
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.
 
  • #4
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
  • #5
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.
 
  • #6
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
  • #7
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)}##
 
  • #8
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
  • #9
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 [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).
 
  • 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?
 

1. How do I find the angle between two vectors?

To find the angle between two vectors, you can use the dot product formula: θ = cos^-1((a · b) / (|a| * |b|)). This formula calculates the cosine of the angle between the two vectors, and then uses the inverse cosine function to find the angle in radians.

2. Can I use the cross product to find the angle between vectors?

No, the cross product is used to find the magnitude and direction of a vector perpendicular to two given vectors. It does not directly give the angle between the two vectors.

3. What if the vectors are in different dimensions?

If the vectors are in different dimensions, you can still use the dot product formula to find the angle between them. Simply add zeros to the shorter vector to make it the same dimension as the longer vector.

4. Is there a specific unit for the angle between vectors?

The angle between vectors is usually measured in radians, but it can also be measured in degrees. Just make sure to convert the angle to the desired unit when using the formula.

5. Can I use this formula for more than two vectors?

No, this formula only applies to finding the angle between two vectors. If you have more than two vectors, you will need to find the angle between each pair of vectors separately.

Similar threads

Replies
9
Views
1K
Replies
7
Views
1K
Replies
4
Views
750
  • Introductory Physics Homework Help
Replies
14
Views
303
  • Linear and Abstract Algebra
Replies
14
Views
603
Replies
16
Views
2K
  • General Math
Replies
1
Views
1K
Replies
3
Views
2K
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
20
Views
781
Back
Top