Vector calculator
v1 | v2 |
📥 Export options
Exporting...
How to Use This Vector Calculator
- Select vector dimension - Choose between 2D (x, y) or 3D (x, y, z) vectors
- Enter vector components - Input the values for each vector component
- Choose operation - Select from addition, subtraction, dot product, cross product, or other operations
- Get instant results - View the answer with detailed step-by-step calculations
Vector Operations Available
Addition
Add two or more vectors component-wise
Subtraction
Subtract one vector from another
Dot Product
Calculate scalar product of vectors
Cross Product
Find perpendicular vector (3D only)
Magnitude
Calculate vector length
Normalize
Convert vector to unit vector (length 1)
Angle Between
Find angle between two vectors
Projection
Project one vector onto another
Detailed Examples
Example 1: 2D Vector Addition
Given vectors a = (3, 4) and b = (1, 2)
Solution:
Example 2: 3D Dot Product
Given vectors a = (2, 3, 1) and b = (1, 4, 2)
Solution:
Example 3: Cross Product
Given vectors a = (1, 2, 3) and b = (4, 5, 6)
Solution:
= (12-15, 12-6, 5-8) = (-3, 6, -3)
Example 4: Vector Magnitude and Unit Vector
Given vector v = (3, 4, 0)
Magnitude:
Unit Vector:
Properties of Vector Operations
Property | Addition/Subtraction | Dot Product | Cross Product |
---|---|---|---|
Commutative | ✓ a + b = b + a | ✓ a · b = b · a | ✗ a × b = -(b × a) |
Associative | ✓ (a + b) + c = a + (b + c) | ✗ Not applicable | ✗ Not associative |
Distributive | ✓ k(a + b) = ka + kb | ✓ a · (b + c) = a · b + a · c | ✓ a × (b + c) = a × b + a × c |
Identity Element | ✓ Zero vector (0, 0, 0) | ✗ No identity | ✗ No identity |
Special Types of Vectors
Zero Vector
A vector with all components equal to zero: 0 = (0, 0, 0)
- Magnitude is zero
- No specific direction
- Identity element for vector addition
Unit Vector
A vector with magnitude equal to 1
- Used to represent direction only
- Standard unit vectors: î = (1,0,0), ĵ = (0,1,0), k̂ = (0,0,1)
Position Vector
A vector from the origin to a point in space
- Represents the location of a point
- Components are the coordinates of the point
Orthogonal Vectors
Two vectors are orthogonal (perpendicular) if their dot product is zero
Parallel Vectors
Two vectors are parallel if one is a scalar multiple of the other
Real-World Applications
Physics and Engineering
- Force and Motion: Calculating resultant forces, velocity, and acceleration
- Electromagnetic Fields: Electric and magnetic field calculations
- Mechanics: Torque calculations using cross product
- Work and Energy: Work = Force · Displacement
Computer Graphics and Gaming
- 3D Rendering: Camera positioning and object transformations
- Lighting: Surface normal calculations for shading
- Physics Engines: Collision detection and response
- Animation: Character movement and rotations
Navigation and GPS
- Direction Finding: Calculating bearing and heading
- Distance Calculations: Great circle distances on Earth
- Route Planning: Optimal path calculations
Machine Learning and Data Science
- Feature Vectors: Representing data points in high-dimensional space
- Similarity Measures: Cosine similarity using dot product
- Neural Networks: Weight vectors and gradient calculations
- Principal Component Analysis: Finding orthogonal basis vectors
Vector Representation in Different Coordinate Systems
Cartesian Coordinates
Standard (x, y, z) representation
Polar Coordinates (2D)
Magnitude and angle representation
Spherical Coordinates (3D)
Radius, polar angle, and azimuthal angle
y = r sin(φ) sin(θ)
z = r cos(φ)
💡 Pro Tips for Using This Calculator
- Check dimensions: Ensure vectors have the same dimension for addition/subtraction
- Cross product: Only defined for 3D vectors
- Angle calculation: Result is in degrees by default
- Precision: Adjust decimal places in settings for more accurate results
- Multiple vectors: Chain operations for calculations with 2 vectors
- Export formats: Download results as PNG, HTML or MathML
Common Mistakes to Avoid
- Mixing dimensions: Cannot add a 2D vector to a 3D vector
- Order in cross product: Remember a × b ≠ b × a
- Division by zero: Check for zero magnitude when normalizing
- Angle units: Ensure you're using the correct unit (degrees vs radians)
- Component order: Maintain consistent (x, y, z) ordering
Frequently Asked Questions
Quick Formula Reference
Essential Vector Formulas
- 📐 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₃
- ✕ Cross Product: a × b = (a₂b₃-a₃b₂, a₃b₁-a₁b₃, a₁b₂-a₂b₁)
- 📊 Angle: θ = cos⁻¹(a·b / |a||b|)
- ↗️ Unit Vector: û = u/|u|
- 📈 Projection: proj_b(a) = ((a·b)/|b|²)b