2D Vector Explorer
Drag the arrow tips to change vectors. Watch addition, dot product, angle, and projection update in real-time.
Vectors
Drag arrow tips to change vectors.
Properties
| Vector a | — |
| Vector b | — |
| |a| | — |
| |b| | — |
| Dot product | — |
| Angle | — |
| a + b | — |
The Math Behind It
Vector Basics
- A 2D vector a = (aₓ, aᵧ) has magnitude and direction
- Magnitude: |a| = √(aₓ² + aᵧ²)
- Direction angle: θ = atan2(aᵧ, aₓ)
- Unit vector: â = a / |a|
- Components: aₓ = |a| cosθ, aᵧ = |a| sinθ
Operations
- Addition: a + b = (aₓ + bₓ, aᵧ + bᵧ)
- Geometrically: place b's tail at a's tip (parallelogram rule)
- Dot product: a · b = aₓbₓ + aᵧbᵧ = |a||b| cosθ
- Dot product = 0 means vectors are perpendicular
- Angle: θ = arccos(a · b / (|a| |b|))
- Projection of b onto a: proj = (a · b / |a|²) a
You're crushing it!