Vector Calculator: Dot, Cross, Magnitude
This vector calculator does all the common 2D and 3D vector operations in one go. Type vector A and vector B as comma-separated components, such as 3, 4, 0, and it shows A + B, A - B, the dot product, the cross product, each magnitude, the unit vectors, the angle between the vectors in degrees and radians, the scalar and vector projection of A onto B, and a scalar multiple k × A. Two-component vectors are treated as 2D, with the cross product given as the z value. It is handy for physics, engineering, game development and linear algebra homework.
Vector Calculator
2D and 3D vector math: sum, difference, dot and cross product, magnitude, angle and projection.
How to use the Vector Calculator
- Enter vector A as components separated by commas.
- Enter vector B the same way.
- Optionally set a scalar k.
- Read every result in the table.
Vector formulas
A · B = ฮฃ aแตขbแตข, |A| = √(ฮฃ aแตข²), cos ฮธ = A · B ÷ (|A||B|), and A × B = (a₂b₃ - a₃b₂, a₃b₁ - a₁b₃, a₁b₂ - a₂b₁).
Features
- 2D and 3D vectors
- Sum and difference
- Dot and cross product
- Magnitude and unit vector
- Angle between vectors
- Scalar and vector projection
Frequently asked questions
How do you find the magnitude of a vector?
Take the square root of the sum of the squared components. |(3, 4)| = √(9 + 16) = 5.
What is the dot product?
A · B = a₁b₁ + a₂b₂ + a₃b₃. It equals |A||B| cos ฮธ, so a zero dot product means the vectors are perpendicular.
How do you calculate the cross product?
A × B = (a₂b₃ - a₃b₂, a₃b₁ - a₁b₃, a₁b₂ - a₂b₁). The result is perpendicular to both vectors.
How do I find the angle between two vectors?
ฮธ = arccos(A · B ÷ (|A||B|)). For (1, 0) and (0, 1), ฮธ = 90°.
What is a vector projection?
The projection of A onto B is (A · B ÷ |B|²) × B, the part of A that points along B.