Calculating the angle between two vectors

  • Context: Undergrad 
  • Thread starter Thread starter computerex
  • Start date Start date
  • Tags Tags
    Angle Vectors
Click For Summary

Discussion Overview

The discussion revolves around the calculation of the angle between two vectors, specifically addressing how to determine this angle in a range of 0 to 360 degrees. The scope includes mathematical reasoning and conceptual clarification regarding vector angles in different dimensions.

Discussion Character

  • Technical explanation, Conceptual clarification, Debate/contested

Main Points Raised

  • One participant describes using the inverse cosine of the dot product of normalized vectors to find the angle but notes that this method does not indicate direction, resulting in a limited range of angles.
  • Another participant clarifies that the inverse cosine function typically returns values in the range of [0, pi], not [-pi/2, pi/2], and suggests a method to determine the angle in [0, 2pi) by defining an orientation for the plane containing the vectors.
  • Some participants emphasize that the angle between two vectors is defined as the smaller angle formed by their intersection, which is always between 0 and pi.
  • There is a reiteration that while the standard definition of the angle is between 0 and pi, it is possible to define an angle in the range of (0, 2pi) by choosing an orientation.

Areas of Agreement / Disagreement

Participants generally agree on the definition of the angle between two vectors as the smaller angle between them, but there is disagreement on how to extend this definition to include direction and to express the angle in a full 360-degree range.

Contextual Notes

Limitations include the dependence on the choice of orientation for the plane containing the vectors and the unresolved implications of defining angles in different ranges.

computerex
Messages
68
Reaction score
0
When calculating the angle between two vectors, I take the inverse cosine of the dot product of the two vectors normalized. This gives me the angle, however this does not specify whether the direction is backwards or forwards. In other words, it'll give me a range of -PI/2 to PI/2, then it loops back. Is there a way to figure out the angle in range of 0 to 360 degrees with this?
 
Physics news on Phys.org
Usually (for how it is normally defined, for example, in calculators) the cos^(-1) gives back values belonging to [0, pi], not [-pi/2 , pi/2] because in this interval the cos is not invertible.

Lets consider R^3.
If you want an angle between two normalized vectors u and v, belonging to [0, 2pi[, you have to define an orientation z for the plane where the two vectors are (the vector z lies in one side or the other of the plane, you choose).

(1) calculate alpha = cos^(-1) (u.v)
(2) calculate w = u x v
(3) if w.z > 0 or w.z = 0 then the answer is alpha
(4) if w.z < 0 then the answer is 2pi - alpha
 
The "angle between two vectors" is, by definition, the smaller of the two angles formed by the intersection of lines in the direction of the two vectors. The angle between two vectors is always between 0 and \pi.
 
HallsofIvy said:
The "angle between two vectors" is, by definition, the smaller of the two angles formed by the intersection of lines in the direction of the two vectors. The angle between two vectors is always between 0 and \pi.

Nevertheless, if you need it, you can define the angle in (0, 2pi), and to do so you have to decide an orientation.
 

Similar threads

  • · Replies 26 ·
Replies
26
Views
4K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 9 ·
Replies
9
Views
8K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 16 ·
Replies
16
Views
3K