Vector Calculator
Add, subtract, and find the magnitude, dot product, and angle between 2D or 3D vectors.
Did this tool work for you?
How to use this calculator
Vector magnitude is the length. Dot product measures projection. The angle formula uses the relationship between dot product and magnitudes.
- 1
Enter x, y, z components for Vector A and Vector B.
- 2
For 2D vectors, leave the z components as 0.
- 3
Results include magnitude, sum, difference, dot product, angle, and cross product.
Frequently asked questions
What is the dot product used for?
The dot product measures how much two vectors point in the same direction. A · B = |A||B|cos(θ). If the dot product is 0, vectors are perpendicular. If positive, they point roughly the same direction. Used in lighting calculations (angle of incidence), work done by a force, and machine learning (cosine similarity).
What is the cross product?
The cross product A × B produces a new vector perpendicular to both A and B. Its magnitude = |A||B|sin(θ) — the area of the parallelogram formed by A and B. Used to find surface normals in 3D graphics, torque in physics, and angular momentum.
What is a unit vector?
A unit vector has magnitude 1 and represents direction only. Divide any vector by its magnitude: û = v / |v|. Unit vectors are used in normalisation, direction specification in physics, and as basis vectors (i, j, k for x, y, z axes).
When are two vectors parallel?
Vectors are parallel when the angle between them is 0° or 180°. Equivalently, when their cross product is the zero vector, or when one is a scalar multiple of the other. Parallel vectors share the same or opposite direction.
Vectors in mathematics and physics
Scalars vs vectors
Scalars have magnitude only: temperature, mass, energy. Vectors have both magnitude and direction: force, velocity, displacement. Speed is scalar (50 km/h); velocity is vector (50 km/h north). This distinction is fundamental in physics — force applied at different angles produces very different outcomes.
Vector addition and the parallelogram law
To add two vectors geometrically, place them head-to-tail; the resultant runs from the first tail to the last head. Equivalently, they form the diagonal of a parallelogram. This is how forces combine in statics, velocities add in navigation, and electric fields superpose.
Vectors in machine learning
In ML, data points are represented as vectors in high-dimensional space. Cosine similarity = (A · B) / (|A| × |B|) measures how similar two documents or embeddings are regardless of length. Word2Vec represents words as 300-dimensional vectors; dot products between them capture semantic relationships.
Learn more from an authoritative source:
WikipediaMatrix Calculator (2×2)
Calculate the determinant, inverse, transpose, and eigenvalues of a 2×2 matrix.
Ohm's Law Calculator
Calculate voltage, current, resistance, or power using Ohm's Law. Enter any two values to find the other two instantly.
Projectile Motion Calculator
Calculate range, maximum height, time of flight, and velocity components for a projectile launched at any angle and speed. Assumes no air resistance.
Kinetic Energy Calculator
Calculate kinetic energy (KE) from mass and velocity, or find mass or velocity from a known kinetic energy value.
Work & Power Calculator
Calculate work done, power output, force, distance, or time using physics formulas. W = F × d and P = W / t.
Pendulum Calculator
Calculate the period, frequency, and length of a simple pendulum. Find how pendulum length and gravity affect oscillation speed.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →