Vector Calculator

Perform vector operations with detailed calculations and visualizations

Vector Operations

Vector Calculations

Vector v₁

+

Vector v₂

Understanding Vectors

What is a Vector?

A vector is a mathematical object that has both magnitude (length) and direction. Vectors are fundamental in physics, engineering, and computer science for representing quantities like force, velocity, and position.

Vector Notation:

v = ⟨x, y⟩ for 2D vectors

v = ⟨x, y, z⟩ for 3D vectors

Example: v = ⟨3, 4⟩ represents a vector with x=3, y=4

Vector Operations

Vector operations follow specific geometric and algebraic rules that make them useful for solving problems in physics, engineering, and computer graphics.

  • Addition/Subtraction: Component-wise operations
  • Dot Product: Scalar result representing projection
  • Cross Product: Vector perpendicular to both inputs
  • Magnitude: Length of the vector

Vector Operation Formulas

Addition: v₁ + v₂ = ⟨x₁+x₂, y₁+y₂⟩

Component-wise addition of corresponding elements

Dot Product: v₁ · v₂ = x₁x₂ + y₁y₂

Scalar result: |v₁||v₂|cos(θ)

Cross Product: v₁ × v₂ = ⟨y₁z₂-z₁y₂, z₁x₂-x₁z₂, x₁y₂-y₁x₂⟩

Result perpendicular to both input vectors

Magnitude: |v| = √(x² + y² + z²)

Distance from origin to point (x, y, z)

Real-World Applications

Physics

Force, velocity, and motion

  • • Force vectors
  • • Velocity and acceleration
  • • Momentum and impulse
  • • Electric and magnetic fields

Computer Graphics

3D modeling and animation

  • • 3D transformations
  • • Lighting calculations
  • • Collision detection
  • • Particle systems

Engineering

Structural analysis

  • • Stress and strain
  • • Force analysis
  • • Torque and rotation
  • • Fluid dynamics

Navigation

Position and movement

  • • GPS coordinates
  • • Course and bearing
  • • Velocity vectors
  • • Wind and current

Machine Learning

Data representation

  • • Feature vectors
  • • Weight vectors
  • • Gradient vectors
  • • Embedding spaces

Robotics

Motion control

  • • Joint angles
  • • Position vectors
  • • Force sensors
  • • Path planning

Special Types of Vectors

Common Special Vectors

Unit Vector

Magnitude = 1, indicates direction only

Formula: û = v/|v|

Zero Vector

All components = 0

Properties: v + 0 = v, v · 0 = 0

Position Vector

From origin to a point

Used for location representation

Normal Vector

Perpendicular to a surface

Used in lighting and physics

Vector Properties

Orthogonal Vectors

Dot product = 0, perpendicular

Used in coordinate systems

Parallel Vectors

Cross product = 0, same direction

One is scalar multiple of other

Collinear Vectors

Lie on the same line

Linearly dependent

Coplanar Vectors

Lie in the same plane

Important in 3D geometry