Ângulo entre Vetores
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
Formula
cos θ = u·v/(|u||v|)
About this calculator
The angle between vectors calculator determines the angle formed by two vectors in two-dimensional or three-dimensional space. The calculation uses the cosine formula: cos θ = (u·v) / (|u|·|v|), where u·v is the dot product and |u|, |v| are the magnitudes. The result is given in degrees or radians. This tool is useful for students and professionals in analytic geometry, physics, or computer graphics.
To use the calculator, enter the coordinates of the two vectors. For planar vectors, provide x and y components; for spatial vectors, add the z component. The tool automatically computes the dot product and magnitudes, then applies the cosine formula. The final angle is obtained via the arccosine function (acos). Ensure the vectors are non-zero, as division by zero is undefined.
Use cases include checking if two vectors are orthogonal (90° angle), parallel (0° or 180°), or determining the projection of one vector onto another. In physics, it calculates work done by a force, which depends on the angle between force and displacement. In computer graphics, it helps compute lighting and reflections. The calculator can also validate results from linear algebra exercises.
Cautions: ensure vectors are not zero. For higher dimensions, the formula extends, but this calculator supports only 2D and 3D. The arccosine result is between 0° and 180°. If cosine is greater than 1 or less than -1, rounding errors may occur; adjust values to the [-1, 1] interval.
Frequently asked questions
What does an angle of 0° between two vectors mean?
It indicates the vectors are parallel and point in the same direction, meaning one is a positive scalar multiple of the other.
How do I know if two vectors are orthogonal?
If the angle between them is 90°, the dot product is zero. The calculator will return 90° (or π/2 radians).
Can I use this calculator for vectors with more than 3 dimensions?
No, the current calculator supports only 2D and 3D vectors. For higher dimensions, the formula is the same, but you would need a tool that accepts more components.
What should I do if the result shows an error or NaN?
Check that the vectors are not zero. If they are, division by zero causes an error. Also, ensure the input values are valid numbers.
Is the calculated angle in degrees or radians?
By default, the result is shown in degrees, but you can select radians if the interface allows it.