Vector Calculator
Calculate vector magnitude, addition, subtraction, dot product, angle between vectors, projection, unit vector, scalar multiplication, and cross product with step-by-step explanations and visual vector diagrams.
Background
Vectors have both size and direction. This calculator helps students move between components, formulas, geometry, and visual meaning so vector operations feel less like memorized rules and more like arrows you can understand.
How to use this calculator
- Choose the vector operation: magnitude, addition, subtraction, dot product, angle, projection, unit vector, scalar multiplication, or cross product.
- Select whether you are working in 2D or 3D.
- Enter the vector components. For example, vector a = ⟨3, 4⟩.
- Use quick picks to load common classroom examples.
- Click Calculate to see the answer, formula, visual, interpretation, and steps.
How this calculator works
- Magnitude uses the Pythagorean idea to find vector length.
- Addition and subtraction happen component by component.
- Dot product measures how much two vectors point in the same direction.
- Projection shows the shadow of one vector along another vector.
- Component breakdowns show which parts of a vector contribute most to its size and direction.
- Physics meaning connects vector math to force, displacement, work, torque, and components.
- Cross product works for 3D vectors and creates a vector perpendicular to both inputs.
Formula & Equations Used
Magnitude: |v| = √(x² + y² + z²)
Addition: a + b = ⟨a₁+b₁, a₂+b₂, a₃+b₃⟩
Subtraction: a − b = ⟨a₁−b₁, a₂−b₂, a₃−b₃⟩
Dot product: a · b = a₁b₁ + a₂b₂ + a₃b₃
Angle: cos θ = (a · b) / (|a||b|)
Projection: proj_b(a) = [(a · b)/(b · b)]b
Unit vector: û = v / |v|
Cross product: a × b = ⟨a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁⟩
Example Problems & Step-by-Step Solutions
Example 1 — Magnitude of ⟨3, 4⟩
- Use |v| = √(x² + y²).
- Substitute: √(3² + 4²).
- √(9 + 16) = √25 = 5.
Example 2 — Dot product of ⟨1, 2⟩ and ⟨3, 4⟩
- Multiply matching components.
- 1×3 + 2×4 = 3 + 8 = 11.
Example 3 — Projection of a onto b
- Calculate a · b.
- Calculate b · b.
- Multiply vector b by (a · b)/(b · b).
Frequently Asked Questions
Q: What is a vector?
A vector is a quantity with both magnitude and direction. In component form, it is often written as ⟨x, y⟩ or ⟨x, y, z⟩.
Q: What is vector magnitude?
Magnitude is the length of the vector. In 2D, it is calculated with √(x² + y²).
Q: What does the dot product tell you?
The dot product helps measure directional alignment. Positive means similar direction, negative means opposite direction, and zero means perpendicular.
Q: What is vector projection?
Projection is the part, or shadow, of one vector that lies along another vector.
Q: When do I use the cross product?
Use the cross product for 3D vectors when you need a vector perpendicular to both input vectors.