Vector Calculator
Perform vector operations: addition, subtraction, dot product, cross product, and magnitude. Find unit vectors and angles between vectors in 2D and 3D.
∑ Linear Algebra📐 |v| = √(x² + y² + z²)🔢 Math
Operation
Vector A: x
y
z (for 3D)
Vector B: x
B: y
B: z (for 3D)
Please enter valid values.
Formula & Reference
| Variable | Symbol | Formula | Units |
|---|---|---|---|
| Vector Calculator | — | |v| = √(x² + y² + z²) | vector |
Step-by-Step Examples
Example 1
Dot Product
A=(1,2,3), B=(4,5,6).
- A·B = 1×4+2×5+3×6 = 4+10+18 = 32
- Angle = arccos(32/(√14×√77)) ≈ 12.9°
✓ A·B = 32
Example 2
Cross Product
A=(1,0,0), B=(0,1,0).
- A×B = (0×0−0×1, 0×0−1×0, 1×1−0×0)
- = (0,0,1) = k unit vector
- Perpendicular to both
✓ A×B = (0,0,1)
Example 3
Magnitude
v=(3,4).
- |v| = √(9+16) = √25 = 5
- Unit vector: (0.6, 0.8)
✓ |v| = 5
Real-World Applications
Physics
Force, velocity, acceleration all represented as vectors.
Computer Graphics
3D rendering relies on vector operations for lighting, normals, rotations.
Machine Learning
Word embeddings, feature vectors, cosine similarity all use vector operations.
Navigation
Displacement, direction, velocity vectors for aircraft and ships.
Common Mistakes to Avoid
⚠️
Cross product only in 3D
Cross product is only defined for 3D vectors. In 2D, use the 2D analog (scalar): ax×by − ay×bx.
⚠️
Dot product result is scalar
A·B gives a number, not a vector. Cross product A×B gives a vector.
⚠️
Unit vector has magnitude 1
u = v/|v|. If |v|=0 (zero vector), unit vector is undefined.
Frequently Asked Questions
What is a vector? ▾
A quantity with both magnitude and direction. In 2D: (x,y). In 3D: (x,y,z). Represented as arrows in space.
What is the dot product used for? ▾
Measuring how parallel two vectors are. A·B = |A||B|cos(θ). If A·B=0, vectors are perpendicular. Used for projections, work in physics.
What is the cross product used for? ▾
A×B gives a vector perpendicular to both A and B. Its magnitude equals the area of the parallelogram formed by A and B. Used in 3D geometry and physics (torque, normal vectors).
What is a unit vector? ▾
A vector with magnitude 1. Found by dividing a vector by its magnitude: û = v/|v|. Used to represent pure direction.
What is vector projection? ▾
The component of A in the direction of B: proj_B(A) = (A·B/|B|²)B. Used in physics (component of force) and least squares regression.
Related Math Calculators
Formula Explorer connections
Interpretation: This relationship represents vectors, linear systems or transformations using matrix structure and vector operations. Assumption: Matrix dimensions must be compatible. Inversion, decomposition and unique solutions require rank, conditioning or nonzero-determinant conditions.