Calculator
Result
Magnitude |v|: —
Direction angle θ: —
Azimuth φ: —
Elevation θ: —
Unit vector: —
Direction cosines (α,β,γ): —
Components (x,y,z): —
History
| # | Dim | Mode | Components | Magnitude | Angles | Unit Vector | Timestamp |
|---|
Formula Used
2D components → magnitude & angle
- $|\\mathbf v| = \\sqrt{x^2 + y^2}$
- $\\theta = \\operatorname{atan2}(y,x)$
- Unit vector $\\hat{\\mathbf v} = \\dfrac{\\mathbf v}{|\\mathbf v|} = \\left(\\dfrac{x}{|\\mathbf v|},\\dfrac{y}{|\\mathbf v|}\\right)$
2D magnitude + angle → components
- $x = |\\mathbf v|\\cos\\theta,\\quad y = |\\mathbf v|\\sin\\theta$
3D components → spherical angles
- $|\\mathbf v| = \\sqrt{x^2 + y^2 + z^2}$
- Azimuth $\\varphi = \\operatorname{atan2}(y,x)$
- Elevation $\\theta = \\operatorname{atan2}\\big(z,\\sqrt{x^2+y^2}\\big)$
- Direction cosines: $\\alpha=\\arccos\\frac{x}{|\\mathbf v|},\\;\\beta=\\arccos\\frac{y}{|\\mathbf v|},\\;\\gamma=\\arccos\\frac{z}{|\\mathbf v|}$
- Unit vector $\\hat{\\mathbf v}=\\big(x,y,z\\big)/|\\mathbf v|$
3D magnitude + angles → components
- Using elevation from the $xy$-plane and azimuth from +x toward +y:
- $x = |\\mathbf v|\\cos\\theta\\cos\\varphi,\\; y = |\\mathbf v|\\cos\\theta\\sin\\varphi,\\; z = |\\mathbf v|\\sin\\theta$
How to Use
- Select
2Dor3D, and choose the input mode. - Enter values. For 3D, azimuth is in the
xy-plane. - Pick degrees or radians and desired decimal precision.
- Click Calculate. Review magnitude, angles, unit vector, and components.
- Use Download CSV or Download PDF to export history.
Example Data
| Dim | Mode | Inputs | Expected magnitude | Expected angles |
|---|---|---|---|---|
| 2D | Components | x=3, y=4 | 5 | θ≈53.1301° |
| 2D | Mag+θ | |v|=10, θ=30° | 10 | x≈8.6603, y≈5.0000 |
| 3D | Components | x=2, y=3, z=6 | 7 | φ≈56.3099°, θ≈61.9275° |
| 3D | Mag+φ+θ | |v|=12, φ=45°, θ=20° | 12 | x≈10.579, y≈10.579, z≈4.104 |
FAQs
Azimuth is the angle in the xy-plane from +x toward +y. Elevation is the angle above the xy-plane; zero means lying in the plane.
Direction angles are normalized to [0, 360°) for degrees and [0, 2π) for radians when displayed.
Yes. Change the unit selector and recalculate; the calculator converts angles consistently throughout.
They are the angles with the coordinate axes: α with x, β with y, γ with z, using $\\arccos$ of each component over the magnitude.
This occurs when magnitude is zero or inputs are empty. Ensure numeric values and nonzero magnitude for valid direction outputs.