In mathematics, a vector is any object that has a definable length, known as magnitude, and direction. Since vectors are not the same as standard lines or shapes, you’ll need to use some special formulas to find angles between them.

Part 1
Part 1 of 2:

Finding the Angle Between Two Vectors

  1. 1
    Write down the cosine formula. To find the angle θ between two vectors, start with the formula for finding that angle's cosine. You can learn about this formula below, or just write it down:[1]
    • cosθ = () / (|||| ||||)
    • |||| means "the length of vector ."
    • is the dot product (scalar product) of the two vectors, explained below.
  2. 2
    Identify the vectors. Write down all the information you have concerning the two vectors. We'll assume you only have the vector's definition in terms of its dimensional coordinates (also called components). If you already know a vector's length (its magnitude), you'll be able to skip some of the steps below.
    • Example: The two-dimensional vector = (2,2). Vector = (0,3). These can also be written as = 2i + 2j and = 0i + 3j = 3j.
    • While our example uses two-dimensional vectors, the instructions below cover vectors with any number of components.
    Advertisement
  3. 3
    Calculate the length of each vector. Picture a right triangle drawn from the vector's x-component, its y-component, and the vector itself. The vector forms the hypotenuse of the triangle, so to find its length we use the Pythagorean theorem. As it turns out, this formula is easily extended to vectors with any number of components.
    • ||u||2 = u12 + u22. If a vector has more than two components, simply continue adding +u32 + u42 + ...
    • Therefore, for a two-dimensional vector, ||u|| = √(u12 + u22).
    • In our example, |||| = √(22 + 22) = √(8) = 2√2. |||| = √(02 + 32) = √(9) = 3.
  4. 4
    Calculate the dot product of the two vectors. You have probably already learned this method of multiplying vectors, also called the scalar product.[2]
    To calculate the dot product in terms of the vectors' components, multiply the components in each direction together, then add all the results.
    For computer graphics programs, see Tips before you continue.

    Finding Dot Product Example
    In mathematical terms, = u1v1 + u2v2, where u = (u1, u2). If your vector has more than two components, simply continue to add + u3v3 + u4v4...
    In our example, = u1v1 + u2v2 = (2)(0) + (2)(3) = 0 + 6 = 6. This is the dot product of vector and .

  5. 5
    Plug your results into the formula. Remember,
    cosθ = () / (|||| || ||).
    Now you know both the dot product and the lengths of each vector. Enter these into this formula to calculate the cosine of the angle.

    Finding Cosine with Dot Product and Vector Lengths
    In our example, cosθ = 6 / (2√2

    3) = 1 / √2 = √2 / 2.

  6. 6
    Find the angle based on the cosine. You can use the arccos or cos-1 function on your calculator to
    find the angle θ from a known cos θ value.
    For some results, you may be able to work out the angle based on the unit circle.

    Finding an Angle with Cosine
    In our example, cosθ = √2 / 2. Enter "arccos(√2 / 2)" in your calculator to get the angle. Alternatively, find the angle θ on the unit circle where cosθ = √2 / 2. This is true for θ = π/4 or 45º.
    Putting it all together, the final formula is:
    angle θ = arccosine(() / (|||| ||||))

  7. Advertisement
Part 2
Part 2 of 2:

Defining the Angle Formula

  1. 1
    Understand the purpose of this formula. This formula was not derived from existing rules. Instead, it was created as a definition of two vectors' dot product and the angle between them. However, this decision was not arbitrary. With a look back to basic geometry, we can see why this formula results in intuitive and useful definitions.
    • The examples below use two-dimensional vectors because these are the most intuitive to use. Vectors with three or more components have properties defined with the very similar, general case formula.
  2. 2
    Review the Law of Cosines. Take an ordinary triangle, with angle θ between sides a and b, and opposite side c. The Law of Cosines states that c2 = a2 + b2 -2abcos(θ). This is derived fairly easily from basic geometry.
  3. 3
    Connect two vectors to form a triangle. Sketch a pair of 2D vectors on paper, vectors and , with angle θ between them. Draw a third vector between them to make a triangle. In other words, draw vector such that + = . This vector = - .[3]
  4. 4
    Write the Law of Cosines for this triangle. Insert the length of our "vector triangle" sides into the Law of Cosines:
    • ||(a - b)||2 = ||a||2 + ||b||2 - 2||a|| ||b||cos(θ)
  5. 5
    Write this using dot products. Remember, a dot product is the magnification of one vector projected onto another. A vector's dot product with itself doesn't require any projection, since there is no difference in direction.[4] This means that = ||a||2. Use this fact to rewrite the equation:
    • ( - ) • ( - ) = + - 2||a|| ||b||cos(θ)
  6. 6
    Rewrite it into the familiar formula. Expand the left side of the formula, then simplify to reach the formula used to find angles.
    • - - + = + - 2||a|| ||b||cos(θ)
    • - - = -2||a|| ||b||cos(θ)
    • -2() = -2||a|| ||b||cos(θ)
    • = ||a|| ||b||cos(θ)
  7. Advertisement

Community Q&A

  • Question
    If |A + B| = |A| + |B|, then what is the angle between A and B?
    Community Answer
    Community Answer
    Think of the geometric representation of a vector sum. When two vectors are summed they create a new vector by placing the start point of one vector at the end point of the other (write the two vectors on paper). Now, imagine if vectors A and B both where horizontal and added. They would create a vector with the length of their two lengths added! Hence the solution is zero degrees.
  • Question
    How do I find the angle between two vectors if they have the same magnitude?
    Community Answer
    Community Answer
    It depends on their direction. You can't call them vectors without defining their direction.
  • Question
    Can you help me solve this problem? "Position vector of the point P and Q relative to the origin O are 2i and 3i+4j respectively. Find the angles between vector OP and OQ."
    Community Answer
    Community Answer
    An easier way to find the angle between two vectors is the dot product formula(A.B=|A|x|B|xcos(X)) let vector A be 2i and vector be 3i+4j. As per your question, X is the angle between vectors so: A.B = |A|x|B|x cos(X) = 2i.(3i+4j) = 3x2 =6 |A|x|B|=|2i|x|3i+4j| = 2 x 5 = 10 X = cos-1(A.B/|A|x|B|) X = cos-1(6/10) = 53.13 deg The angle can be 53.13 or 360-53.13 = 306.87.
Advertisement

About This Article

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 40 people, some anonymous, worked to edit and improve it over time. This article has been viewed 2,697,544 times.
55 votes - 72%
Co-authors: 40
Updated: December 3, 2022
Views: 2,697,544
Categories: Coordinate Geometry
Article SummaryX

1. Calculate the length of each vector.
2. Calculate the dot product of the 2 vectors.
3. Calculate the angle between the 2 vectors with the cosine formula.
4. Use your calculator's arccos or cos^-1 to find the angle. For specific formulas and example problems, keep reading below!

Did this summary help you?
Advertisement