Quickly get the angle and magnitude of a vector

Finding the direction of a vector in a 2-dimensional plane is easy! You’ll just need a little trigonometry. The x and y components of a vector form a right triangle. You can use the tangent function to find the angle between the x-axis and the vector. This wikiHow guide will show you how to find the direction of a vector and walk through four examples. Additionally, we’ll review how to find the magnitude of a vector.

Things You Should Know

  • For this method, the vector’s tail will be located at the origin of an xy coordinate plane, and the tip will be at an (X, Y) coordinate.
  • Use tan(𝛉) = Y/X to find the direction angle 𝛉 of the vector. Apply arctan to both sides to solve for 𝛉.
  • If your vector is in the second, third, or fourth quadrant, you’ll need to apply an adjustment. Add 180 degrees to your answer for quadrants II and III. Add 360 for quadrant IV.
  • Use||a|| = sqrt(X^2 + Y^2) to calculate the magnitude of vector a.
Section 1 of 9:

Direction Formula

  1. Use 𝛉 = arctan(Y/X). This formula calculates 𝛉 (the greek symbol, theta), which is the angle measuring the degrees between the positive x-axis and the vector.
    • Where Y is the Y component of the vector and X is the X component of the vector.
    • “arctan” is the inverse tangent function.
    • This assumes the vector’s tail is located at the origin (0, 0).
    • If the vector is in the second or third quadrant, add 180 degrees to your result.
    • If the vector is in the fourth quadrant, add 360 degrees to your result.
    • Make sure your calculator is set to degrees mode, usually called “deg.”
  2. Advertisement
Section 3 of 9:

Vector Notation

  1. 1
    There are a few coordinate plane terms you’ll need to know. A Cartesian 2-dimensional coordinate plane specifies points in a plane by assigning distances from the origin.
    • A 2-dimensional plane is a flat surface consisting of two directions, x and y. It extends infinitely in the x and y direction.
    • The x-axis is a horizontal line that measures distance in space in the x direction. Positive values point right from the origin (positive x-axis), negative point left (negative x-axis).
    • The y-axis is a vertical line that measures distance in space in the x direction. It is perpendicular to the x-axis. Positive values point up from the origin (positive y-axis), negative point down (negative y-axis).
    • The origin is where the x and y axes intersect. It has coordinates of (0, 0).
    • Coordinates are where a point is located. They are written as (x, y) where x is the distance you need to move in the horizontal direction and y is the distance you need to move in the vertical direction to get to the point from the origin.
  2. 2
    You’ll also need to know the four quadrants. The quadrants are four spaces in the coordinate plane defined by the x and y axes.
    • The space above the x-axis and to the right of the y-axis is the first quadrant. Everything in this quadrant is a positive value. It’s the upper right space of the plane.
    • The quadrants are then ordered counterclockwise starting at the first quadrant.
    • So, the second quadrant is above the x-axis and to the left of the y-axis.
    • The third quadrant is below the x-axis and to the left of the y-axis.
    • The fourth quadrant is below the x-axis and to the right of the y-axis.
  3. 3
    Vectors are defined by two parameters, magnitude and direction. The magnitude is represented by the length of the vector. Direction is which way the vector is pointed in a given coordinate plane.[2]
    • Vectors are often illustrated as an arrow on a coordinate plane. The tail of the vector is at the origin of the plane.
    • For example, a 2-dimensional vector may have a length of 3 and point 45 degrees counterclockwise from the positive X axis.
    • Note: this wikiHow guide will discuss vectors in a 2-dimensional space, but these principles apply to 3-dimensional spaces as well.
  4. 4
    There are two common ways to represent vector components. You can use coordinates or unit vector notation.
    • Coordinate notation tells you where the tip of the vector arrow is located. It’s often written as two vertically-stacked numbers within square brackets. The x coordinate is on top while the y is on the bottom.
    • If you don’t know them, you can resolve a vector into components.
  5. 5
    Unit vector notation represents the vector as an equation. This is also sometimes called engineering notation. The equation is
    • u = Xî + Yĵ
    • where u is the vector (this can be any letter, and usually has an arrow pointing right over the letter), X is the x coordinate, and Y is the y coordinate.
    • For example, u = 3î + 4ĵ would be a vector with the tip pointed at the coordinate (3, 4).
  6. Advertisement
Section 4 of 9:

Use Trigonometry to Find the Angle

  1. 1
    Locate the angle 𝛉 you’re trying to find. The direction of a vector can be defined as the angle between the positive x-axis and the vector.[3]
    • Find the angle by starting at the positive x-axis (0 degrees), and then moving counterclockwise until you get to the vector.
    • The vector can point in any direction in the plane, 0 to 360 degrees.
    • This angle will be referred to as 𝛉 (the greek symbol theta).
  2. 2
    Identify the triangle created by the vector. The vector is defined by its X and Y components. You can use these two numbers to make a right triangle.
    • One side of the triangle will be in line with the x-axis. This side’s length X is the X component of the vector. We’ll refer to this as the adjacent side.
    • The second side is perpendicular to the x-axis. This side’s length Y is the Y component of the vector. We’ll refer to this as the opposite side.
    • The third side of the triangle is the hypotenuse and also the vector itself.
  3. 3
    Use the definition of the trigonometric function, tangent. Tangent (tan) is defined as[4]
    • tan(𝛉) = opposite/adjacent
    • where
    • “opposite” is the length of the side farthest from the angle 𝛉
    • and “adjacent” is the length of the side closest to the angle 𝛉 (that isn’t the hypotenuse)
  4. 4
    Insert the vector components into the tangent equation. The tangent equation will use the triangle created by the x and y components of the vector. The equation will be formatted as
    • tan(𝛉) = Y/X
  5. 5
    Solve for 𝛉. To find 𝛉, you’ll need to apply the inverse tangent (written as tan^-1 or arctan) to both sides of the equation. We’ll use arctan in this guide, but it’s common to see tan^-1 on calculators. This will result in
    • 𝛉 = arctan(Y/X)
    • To use your calculator for solving this, first divide Y by X, then press the arctan button. You may need to press the shift or 2nd key on your calculator to access the arctan function.
    • Note: Make sure your calculator is in degrees mode (usually labeled “Deg”). If you’re in radians mode (“Rad”), the answer will be in radians instead of degrees.
  6. 6
    Apply an angle adjustment to get the correct measurement. Calculators only output angles in the first and fourth quadrants (negative 90 degrees to positive 90 degrees). This is because the calculator doesn’t evaluate where the negatives are when solving for 𝛉. To get the correct 𝛉 for each quadrant, you’ll need to identify which quadrant your vector is in, and then apply an adjustment:
    • The first quadrant doesn’t need an adjustment.
    • For vectors in the second quadrant, the arctan function will result in a negative angle pointing down and to the right (in the fourth quadrant). This angle points directly opposite to the vector, so you’ll need to add 180 degrees to the angle to get 𝛉.
    • For vectors in the third quadrant, the arctan function will result in a positive angle pointing up and to the right (in the first quadrant). This angle points directly opposite to the vector, so you’ll need to add 180 degrees to the angle to get 𝛉.[5]
    • For vectors in the fourth quadrant, the arctan function will result in a negative angle pointing down and to the right (in the fourth quadrant). This angle points in the correct direction, but the angle is negative (measured clockwise from the positive x-axis) instead of positive (measured counterclockwise from the positive x-axis). You’ll need to add 360 degrees to the angle to get 𝛉.
  7. Advertisement
Section 5 of 9:

Special Cases

  1. There are a few cases where you don’t need to use trigonometry to find the angle of the vector. These are cases in which the angle of the vector is apparent by looking at it on the graph.
    • If one of the vector’s x or y components is 0, then the vector is pointing directly in line with an axis.
    • For example, if you have the vector u = 0î + 5ĵ, the vector is pointing straight up along the positive y-axis. This means it has an angle of 90 degrees since the y-axis is perpendicular to the x-axis.
    • If the vector’s x and y components are the same number, the vector is pointing at an increment of 45 degrees.
    • For example, if you have the vector u = -3î + 3ĵ, the vector is pointing up and to the left, 45 degrees counterclockwise from the positive y-axis. Since the axes are perpendicular, we can add 90 degrees (positive x-axis to positive y-axis) plus 45 degrees to get 135 degrees.

About This Article

Kyle Smith
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Kyle Smith. Kyle Smith is a wikiHow Technology Writer, learning and sharing information about the latest technology. He has presented his research at multiple engineering conferences and is the writer and editor of hundreds of online electronics repair guides. Kyle received a BS in Industrial Engineering from Cal Poly, San Luis Obispo. This article has been viewed 5,388 times.
3 votes - 100%
Co-authors: 3
Updated: February 20, 2023
Views: 5,388
Categories: Geometry
Advertisement