# Angle Between Two Vectors 2D Formula

## Formula

### Summary

The angle between two vectors in two dimensions is calculated with the ATAN2 function. This formula returns the amount of rotation from the first vector to the second vector . If the amount of rotation is greater than a half-rotation, then the equivalent negative angle is returned.

Expression Description
The angle between the two vectors
The ATAN2 function.
The first vector defined by the component and the component .
The second vector defined by the component and the component .

## Usage

The angle between two vectors in two dimensions is calculated with the ATAN2 function. For example, to calculate the angle between the two vectors and as shown in figure below, the formula below can be used.

1. Set up the formula.

2. Substitute the components of the vectors.

3. Evaluate the multiplication

4. Evaluate the subtraction.

5. Call the function.

The angle is equal to radians or using the circle constant notation, the angle is equal to radians.

### Example 1

1. Set up the formula.

2. Substitute the components of the vectors.

3. Simplify the argument expressions.

4. Call the function.

The angle is equal to radians or using the circle constant notation, the angle is equal to radians.

### Example 2

1. Set up the formula.

2. Substitute the components of the vectors.

3. Simplify the argument expressions.

4. Call the function.

The angle is equal to radians or converting to the circle constant notation by multiplying by , the angle is equal to radians.

### Example 3

1. Set up the formula.

2. Substitute the components of the vectors.

3. Simplify the argument expressions.

4. Call the function.

The angle is equal to radians or converting to the circle constant notation by multiplying by , the angle is equal to radians.

## Explanation

This formula is the general form of getting the angle between two vectors without using the complex number system. The common alternative formula that uses the ACOS function, shown below, does not return the full range of angles.