What it does: computes the angle between two 3D vectors using the dot product identity. Handles validation, rounding, units, and exports.
Example Data Table
| Ax | Ay | Az | Bx | By | Bz | Angle (deg) |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 12.933154 |
| 1 | 0 | 0 | 0 | 1 | 0 | 90.000000 |
| 0 | 0 | 1 | 0 | 0 | -1 | 180.000000 |
Formula Used
The angle θ between vectors A and B is determined from the dot product identity:
A·B = |A||B| cos(θ) ⇒ θ = arccos( (A·B) / (|A||B|) )
Where |A| = √(Ax² + Ay² + Az²) and similarly for |B|. Zero vectors have undefined angles.
How to Use
- Enter components for both vectors in the input fields.
- Choose your preferred unit and rounding precision.
- Click Compute Angle to generate results and steps.
- Use the buttons to download results as CSV or PDF.
- Try the example table for validation and quick checks.
FAQs
The angle is undefined because division by the product of magnitudes fails. At least one magnitude would be zero.
Finite precision can push cos(θ) outside [−1,1]. We clamp to that range before using arccos.
Yes. Inputs like
1e-3 or -2.5E4 are accepted and validated.Most users prefer 4–8 decimals. You can choose between 0 and 12 according to your needs.
No. The angle between A and B equals the angle between B and A because the dot product is commutative.
Direction cosines are outside this tool’s scope. You can extend it to include α, β, γ if required.