You are viewing the article How to Find the Angle Between Two Vectors at Lassho.edu.vn you can quickly access the necessary information in the table of contents of the article below.
This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.
The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.
There are 9 references cited in this article that you can view at the bottom of the page.
This article has been viewed 231,294 times.
If you are a mathematician or a graphics programmer, you will probably have to find the angle between two given vectors. In this article, the wikiHow will show you how to do just that.
Steps
Find the angle between two vectors
- Example: Two-dimensional vector u→{displaystyle {overrightarrow {u}}} = (2,2) and two-dimensional vector v→{displaystyle {overrightarrow {v}}} = (0,3). They can also be written as u→{displaystyle {overrightarrow {u}}} = 2 i + 2 j and v→{displaystyle {overrightarrow {v}}} = 0 i + 3 j = 3 j .
- Although two-dimensional vectors are used in this article’s example, the following instructions can be applied to vectors of any number of dimensions.
- cosθ = ( u→{displaystyle {overrightarrow {u}}} • v→{displaystyle {overrightarrow {v}}} ) / ( || u→{displaystyle {overrightarrow {u}}} || || v→{displaystyle {overrightarrow {v}}} || )
- || u→{displaystyle {overrightarrow {u}}} || means “the length of the vector u→{displaystyle {overrightarrow {u}}} “.
- u→{displaystyle {overrightarrow {u}}} • v→{displaystyle {overrightarrow {v}}} is the dot product of two vectors – this will be explained below.
- || u || 2 = u 12 + u 22 . If the vector has more than two components, we just keep adding +u 32 + u 42 + …
- Therefore, for a two-dimensional vector, || u || = √(u 12 + u 22 ) .
- In this example, || u→{displaystyle {overrightarrow {u}}} || = √(2 2 + 2 2 ) = √(8) = 2√2 . || v→{displaystyle {overrightarrow {v}}} || = √(0 2 + 3 2 ) = √(9) = 3 .
- With a graphics program, refer to Tips before reading on.
- In math u→{displaystyle {overrightarrow {u}}} • v→{displaystyle {overrightarrow {v}}} = u 1 v 1 + u 2 v 2 , where, u = (u 1 , u 2 ). If the vector has more than two components, you just add + u 3 v 3 + u 4 v 4 …
- In this example, u→{displaystyle {overrightarrow {u}}} • v→{displaystyle {overrightarrow {v}}} = u 1 v 1 + u 2 v 2 = (2)(0) + (2)(3) = 0 + 6 = 6 . This is the dot product of the vector u→{displaystyle {overrightarrow {u}}} and vector v→{displaystyle {overrightarrow {v}}} .
- In our example, cosθ = 6 / ( 2√2 * 3 ) = 1 / √2 = √2 / 2.
- In the example, cosθ = √2 / 2. Type “arccos(√2 / 2)” into the calculator to find the angle. Or, you can find the angle θ on the unit circle, where cosθ = √2 / 2. It is true for θ = π / 4 or 45º .
- Combining everything, the final formula is: angle θ = arccosine(( u→{displaystyle {overrightarrow {u}}} • v→{displaystyle {overrightarrow {v}}} ) / ( || u→{displaystyle {overrightarrow {u}}} || || v→{displaystyle {overrightarrow {v}}} || ))
Determine the angle formula
- The examples below use two-dimensional vectors because they are easiest to understand and simple. Vectors of three dimensions or more have properties defined by an almost similar general formula.
- || (a – b) || 2 = || a || 2 + || b || 2 – 2 || a || || b || cos (θ)
- ( a→{displaystyle {overrightarrow {a}}} – b→{displaystyle {overrightarrow {b}}} ) • ( a→{displaystyle {overrightarrow {a}}} – b→{displaystyle {overrightarrow {b}}} ) = a→{displaystyle {overrightarrow {a}}} • a→{displaystyle {overrightarrow {a}}} + b→{displaystyle {overrightarrow {b}}} • b→{displaystyle {overrightarrow {b}}} – 2 || a || || b || cos (θ)
- a→{displaystyle {overrightarrow {a}}} • a→{displaystyle {overrightarrow {a}}} – a→{displaystyle {overrightarrow {a}}} • b→{displaystyle {overrightarrow {b}}} – b→{displaystyle {overrightarrow {b}}} • a→{displaystyle {overrightarrow {a}}} + b→{displaystyle {overrightarrow {b}}} • b→{displaystyle {overrightarrow {b}}} = a→{displaystyle {overrightarrow {a}}} • a→{displaystyle {overrightarrow {a}}} + b→{displaystyle {overrightarrow {b}}} • b→{displaystyle {overrightarrow {b}}} – 2 || a || || b || cos (θ)
- – a→{displaystyle {overrightarrow {a}}} • b→{displaystyle {overrightarrow {b}}} – b→{displaystyle {overrightarrow {b}}} • a→{displaystyle {overrightarrow {a}}} = -2 || a || || b || cos (θ)
- -2( a→{displaystyle {overrightarrow {a}}} • b→{displaystyle {overrightarrow {b}}} ) = -2 || a || || b || cos (θ)
- a→{displaystyle {overrightarrow {a}}} • b→{displaystyle {overrightarrow {b}}} = || a || || b || cos (θ)
Advice
- To swap values and solve problems quickly, use this formula for any pair of two-dimensional vectors: cosθ = (u 1 • v 1 + u 2 • v 2 ) / (√(u 12 •) u 22 ) • √(v 12 • v 22 )).
- If you’re working with computer graphics software, you’ll most likely only have to care about the dimensions of the vectors and not their length. Use these steps to shorten the equation and speed up your program: [9] X Research Source[10] X Research Source
- Normalize each vector so that they have a length of 1. To do so, divide each component of the vector by its length.
- Take the dot product of the normalized vector instead of the original vector.
- Since the vector has a length of 1, we can remove the length element from the equation. Finally, the angle equation we get is arccos( u→{displaystyle {overrightarrow {u}}} • v→{displaystyle {overrightarrow {v}}} ).
- Based on the cosine formula, we can quickly determine whether an angle is an acute or obtuse angle. Start with cosθ = ( u→{displaystyle {overrightarrow {u}}} • v→{displaystyle {overrightarrow {v}}} ) / ( || u→{displaystyle {overrightarrow {u}}} || || v→{displaystyle {overrightarrow {v}}} || ):
- The left and right sides of the equation must have the same sign (positive or negative).
- Since the length is always positive, cosθ must have the same sign as the dot product.
- Therefore, if the dot product is positive, cosθ is also positive. We’re in the first quadrant of the unit circle, with θ < π / 2 or 90º. The required angle is an acute angle.
- If the dot product is negative, cosθ is negative. We’re in the second quadrant of the unit circle, with π / 2 < θ ≤ π or 90º < θ ≤ 180º. It’s an obtuse angle.
This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.
The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.
There are 9 references cited in this article that you can view at the bottom of the page.
This article has been viewed 231,294 times.
If you are a mathematician or a graphics programmer, you will probably have to find the angle between two given vectors. In this article, the wikiHow will show you how to do just that.
Thank you for reading this post How to Find the Angle Between Two Vectors at Lassho.edu.vn You can comment, see more related articles below and hope to help you with interesting information.
Related Search: