dash–calculator

01 Vectors and Coordinates

Unit Vector and Direction Angles Table for 3D Vectors

Readout 01-0527 · Updated · Standard formula, shown below

Magnitude 7.0000
Direction angle α (to x-axis)
73.40 deg
Result, rounded to 2 decimal places
Direction angle β (to y-axis)
64.62 deg
Result, rounded to 2 decimal places
Direction angle γ (to z-axis)
31.00 deg
Result, rounded to 2 decimal places
You enter
x component, y component, z component
You get
Magnitude, Direction angle α (to x-axis) (deg), Direction angle β (to y-axis) (deg), Direction angle γ (to z-axis) (deg)
Rounding
4 dp · 2 dp

This page provides reference tables for unit vectors and direction angles of common three-dimensional vectors, along with a table of two-dimensional unit vectors at 15-degree intervals. The tables are designed for students, engineers, and graphics programmers who need quick, accurate values without recalculating each time. Whether you are checking a homework problem, normalizing a vector for a physics simulation, or orienting an object in a 3D scene, these tables give you the magnitude, unit vector components, and the three direction angles (alpha, beta, gamma) for a selection of integer vectors with exact or near-exact magnitudes.

The accompanying formulas and worked example show the step-by-step process of finding a unit vector and its direction angles.

Formula

|v| = √(x² + y² + z²); unit vector û = v / |v|; direction cosines cos α = x/|v|, cos β = y/|v|, cos γ = z/|v|, so α, β, γ are the angles between v and the x-, y- and z-axes (0° to 180°). They always satisfy cos²α + cos²β + cos²γ = 1.

Worked Example

Take v = (2, 3, 6), the calculator default (its magnitude is exactly 7).

Step Working Result
1 |v| = √(2² + 3² + 6²) = √49 7
2 unit vector v / |v| (0.2857, 0.4286, 0.8571)
3 α = arccos(2/7) 73.40°
4 β = arccos(3/7) 64.62°
5 γ = arccos(6/7) 31.00°
6 check: cos²α + cos²β + cos²γ 1

Magnitude, unit vector and direction angles for common integer vectors

Vector v |v| Unit vector û α β γ
(1, 0, 0) 1.0000 (1.0000, 0.0000, 0.0000) 0.00° 90.00° 90.00°
(0, 1, 0) 1.0000 (0.0000, 1.0000, 0.0000) 90.00° 0.00° 90.00°
(0, 0, 1) 1.0000 (0.0000, 0.0000, 1.0000) 90.00° 90.00° 0.00°
(1, 1, 0) 1.4142 (0.7071, 0.7071, 0.0000) 45.00° 45.00° 90.00°
(1, 0, 1) 1.4142 (0.7071, 0.0000, 0.7071) 45.00° 90.00° 45.00°
(0, 1, 1) 1.4142 (0.0000, 0.7071, 0.7071) 90.00° 45.00° 45.00°
(1, 1, 1) 1.7321 (0.5774, 0.5774, 0.5774) 54.74° 54.74° 54.74°
(1, 2, 2) 3.0000 (0.3333, 0.6667, 0.6667) 70.53° 48.19° 48.19°
(2, 1, 2) 3.0000 (0.6667, 0.3333, 0.6667) 48.19° 70.53° 48.19°
(2, 3, 6) 7.0000 (0.2857, 0.4286, 0.8571) 73.40° 64.62° 31.00°
(1, 4, 8) 9.0000 (0.1111, 0.4444, 0.8889) 83.62° 63.61° 27.27°
(3, 4, 12) 13.0000 (0.2308, 0.3077, 0.9231) 76.66° 72.08° 22.62°
(2, 6, 9) 11.0000 (0.1818, 0.5455, 0.8182) 79.52° 56.94° 35.10°
(1, 2, 3) 3.7417 (0.2673, 0.5345, 0.8018) 74.50° 57.69° 36.70°
(3, 4, 0) 5.0000 (0.6000, 0.8000, 0.0000) 53.13° 36.87° 90.00°
(-1, 1, 1) 1.7321 (-0.5774, 0.5774, 0.5774) 125.26° 54.74° 54.74°
(1, -2, 2) 3.0000 (0.3333, -0.6667, 0.6667) 70.53° 131.81° 48.19°
(4, 4, 7) 9.0000 (0.4444, 0.4444, 0.7778) 63.61° 63.61° 38.94°
(6, 2, 3) 7.0000 (0.8571, 0.2857, 0.4286) 31.00° 73.40° 64.62°
(2, 2, 1) 3.0000 (0.6667, 0.6667, 0.3333) 48.19° 48.19° 70.53°

How to read this table

Each row in the first table lists a vector v in the form (x, y, z), its magnitude |v|, the corresponding unit vector û (obtained by dividing each component by the magnitude), and the three direction angles α, β, and γ. For example, the vector (2, 3, 6) has magnitude 7, unit vector (0.2857, 0.4286, 0.8571), and direction angles 73.40°, 64.62°, and 31.00°. The angles are measured from the positive x-, y-, and z-axes, respectively, and always lie between 0° and 180°.

The second table lists unit vectors in the 2D plane for angles from 0° to 345° in 15° increments. Each row gives the angle θ and the corresponding unit vector (cos θ, sin θ). For instance, at 30° the unit vector is (0.8660, 0.5000). This table is useful for converting between polar and Cartesian coordinates or for rotating objects in 2D graphics.

The unit vector components are rounded to four decimal places, and the angles to two decimal places. The identity cos²α + cos²β + cos²γ = 1 holds for every 3D vector, and you can use it to check the consistency of the angle values.

2D unit vectors every 15°

Angle (cos θ, sin θ)
0° (1.0000, 0.0000)
15° (0.9659, 0.2588)
30° (0.8660, 0.5000)
45° (0.7071, 0.7071)
60° (0.5000, 0.8660)
75° (0.2588, 0.9659)
90° (0.0000, 1.0000)
105° (-0.2588, 0.9659)
120° (-0.5000, 0.8660)
135° (-0.7071, 0.7071)
150° (-0.8660, 0.5000)
165° (-0.9659, 0.2588)
180° (-1.0000, 0.0000)
195° (-0.9659, -0.2588)
210° (-0.8660, -0.5000)
225° (-0.7071, -0.7071)
240° (-0.5000, -0.8660)
255° (-0.2588, -0.9659)
270° (0.0000, -1.0000)
285° (0.2588, -0.9659)
300° (0.5000, -0.8660)
315° (0.7071, -0.7071)
330° (0.8660, -0.5000)
345° (0.9659, -0.2588)

Patterns and Properties in the Table

Several useful patterns emerge from the table of 3D vectors. For the coordinate axes, the unit vectors are simply (1,0,0), (0,1,0), and (0,0,1), and the direction angles are 0° for the matching axis and 90° for the other two.

Another pattern is that when a vector has a negative component, the corresponding direction angle becomes obtuse (greater than 90°).

Vectors with whole-number magnitudes are particularly neat. These are examples of Pythagorean triples in three dimensions, where the sum of squares of the components is a perfect square. Such vectors are handy because their unit vectors have rational components, making them easy to work with exactly.

How to Compute Unit Vectors and Direction Angles by Hand

To find the unit vector and direction angles for any vector v = (x, y, z), follow these steps. First, compute the magnitude using the formula |v| = √(x² + y² + z²). Then divide each component by the magnitude to get the unit vector: û = (x/|v|, y/|v|, z/|v|).

Next, find the direction angles by taking the inverse cosine (arccos) of each component of the unit vector. That is, α = arccos(x/|v|), β = arccos(y/|v|), γ = arccos(z/|v|). For the example, α = arccos(2/7) ≈ 73.40°, β = arccos(3/7) ≈ 64.62°, γ = arccos(6/7) ≈ 31.00°. These angles are always between 0° and 180°.

Finally, verify your work by checking that cos²α + cos²β + cos²γ = 1. This identity is a powerful check for any 3D vector.

Practical Uses in Physics and Graphics

Unit vectors are fundamental in physics because they represent direction without magnitude. For instance, in mechanics, forces are often decomposed into components along the x, y, and z axes, and the unit vector gives the direction of the force. Direction angles are used to describe the orientation of a vector in space, such as the direction of a velocity or acceleration. In electromagnetism, unit vectors are used to define fields and wave propagation directions.

In computer graphics, unit vectors are essential for normalizing surface normals, which are used in lighting calculations. A normal vector that is not unit length will cause incorrect shading, so normalization is a routine step. Direction angles are also used in camera orientation and 3D transformations. The 2D unit vector table is useful for rotating sprites or objects in 2D games, where the components (cos θ, sin θ) give the direction of movement at any angle.

The identity cos²α + cos²β + cos²γ = 1 is also used in graphics to ensure that direction angles are consistent. This is helpful in constructing rotation matrices or in interpolating orientations.

Common Mistakes to Avoid

One common mistake is forgetting to divide all components by the magnitude when forming the unit vector. Another mistake is using the arccos function without ensuring the argument is between -1 and 1. Since the components of a unit vector are always in that range, this is not an issue if you normalize first.

Another error is mixing up the order of angles. The direction angle α corresponds to the x-component, β to the y-component, and γ to the z-component.

Finally, do not confuse the 2D unit vector table with the 3D table. In 2D, the unit vector at angle θ is (cos θ, sin θ), and there is no z-component. The identity for 2D is cos²θ + sin²θ = 1, which is a special case of the 3D identity when one component is zero.

Limits and Precision of the Tables

The tables provide values rounded to four decimal places for unit vector components and two decimal places for angles. This is sufficient for most practical purposes, but for high-precision work, you should compute values directly using the formulas. The direction angles are given in degrees, but many calculators and programming languages use radians, so be sure to convert if necessary.

The tables include only a limited set of vectors. For vectors not listed, you can use the formulas to compute the unit vector and angles. The 2D table covers every 15°, but for other angles, you can use a calculator or the trigonometric functions. Also, note that the zero vector (0,0,0) has no direction, so its unit vector and direction angles are undefined. The tables do not include the zero vector for this reason.

When using the tables, remember that the unit vector components are rounded, so the identity cos²α + cos²β + cos²γ = 1 may not hold exactly due to rounding. Always use the exact fractions when verifying the identity.

Frequently Asked Questions

What is a unit vector?

A unit vector is a vector with magnitude exactly 1. It is obtained by dividing each component of the original vector by its magnitude. Unit vectors are used to represent direction only, without any magnitude.

How do I find the direction angles of a vector?

The direction angles α, β, and γ are the angles between the vector and the positive x-, y-, and z-axes. They are found by taking the arccosine of each component of the unit vector.

Why do the squares of the direction cosines sum to 1?

For any 3D vector, the direction cosines are the components of the unit vector, i.e., cos α = x/|v|, cos β = y/|v|, cos γ = z/|v|. Since the unit vector has length 1, the sum of the squares of its components equals 1. This identity is a fundamental property of direction cosines and is used to verify calculations.

What is the unit vector for the zero vector?

The zero vector (0,0,0) has magnitude 0, so it cannot be normalized. Division by zero is undefined, and the zero vector has no direction. Therefore, the unit vector and direction angles for the zero vector do not exist. In practice, you must handle the zero vector separately, such as by checking for a zero magnitude before normalizing.

How do I use the 2D unit vector table?

The 2D table gives the unit vector (cos θ, sin θ) for angles from 0° to 345° in 15° increments. For example, at 45° the unit vector is (0.7071, 0.7071). To find the unit vector for an angle not in the table, use a calculator to compute cos θ and sin θ. This is useful for 2D graphics, physics, and converting polar coordinates to Cartesian.

Calculators that go with this table

Method and sources

Square roots and arccos in double precision; components rounded to 4 decimals, angles to 0.01°.

Source formulas: the standard textbook definitions written out in the Formula section above. Every value in the tables was generated from those formulas in code and spot-checked against the worked example and the calculator on this page; nothing was copied from another table.

Related

Formula used
in x | x component | - | 2 | - | -
in y | y component | - | 3 | - | -
in z | z component | - | 6 | - | -
out mag | Magnitude | - | sqrt(x * x + y * y + z * z) | 4
out al | Direction angle α (to x-axis) | deg | acosd(x / mag) | 2
out be | Direction angle β (to y-axis) | deg | acosd(y / mag) | 2
out ga | Direction angle γ (to z-axis) | deg | acosd(z / mag) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More on this panel

The whole Vectors and Coordinates panel →