Skip to content
math

3D Vector Calculator

Find the magnitude and direction angles of a 3D vector with respect to all three coordinate axes.

Magnitude |v|
1
α (with x-axis)
β (with y-axis)
90°
γ (with z-axis)
90°

Direction angles are the angles α, β, γ that a 3D vector v = ⟨x, y, z⟩ makes with the positive x-, y-, and z-axes respectively. They satisfy the identity cos²α + cos²β + cos²γ = 1.

Direction cosines are the components of the unit vector v̂ = v / |v|. Concretely: cos α = x / |v|, cos β = y / |v|, cos γ = z / |v|. Each angle lies in [0°, 180°].

For the zero vector |v| = 0 the direction cosines are undefined, so all three angles show —.

How it works

  1. 1Enter the x, y, and z components of your vector v = ⟨x, y, z⟩.
  2. 2The magnitude |v| = √(x² + y² + z²) is computed and each direction angle is found via αᵢ = acos(vᵢ / |v|).
  3. 3Results update instantly; the zero vector yields — for all angles because direction cosines are undefined there.

Use cases

  • Physics problems: find the angle a force or velocity vector makes with each coordinate axis.
  • Computer graphics: verify that a normal or direction vector points where expected in 3D space.
  • Engineering: confirm the orientation of a structural load or displacement vector.

Frequently asked questions

What are direction cosines?

Direction cosines are the x, y, and z components of the unit vector v̂ = v / |v|. They equal cos α, cos β, and cos γ respectively, and always satisfy cos²α + cos²β + cos²γ = 1.

Why are the direction angles undefined for the zero vector?

Direction angles are derived by dividing each component by the magnitude. When |v| = 0 that division is undefined, so no meaningful angle exists.

Can α, β, or γ be greater than 90°?

Yes. Each angle lies in [0°, 180°]. An angle greater than 90° means the vector has a negative component along that axis — i.e. it points away from the positive direction.

See all →