Add, subtract vectors, or compute their dot product, cross product, magnitude, and the angle between them.
📖 Vector Algebra (2D & 3D)Vector A
Vector B
Fill in the fields on the left with your information, then press Calculate to see your result instantly. No sign-up required, and no data is sent anywhere — everything is calculated right in your browser.
The vector calculator performs the most important algebraic operations on vectors in a two-dimensional plane or three-dimensional space. Addition and subtraction are done by adding or subtracting corresponding components (x with x, y with y, and z with z) for each vector. The dot product is calculated by multiplying corresponding components and summing the results, giving a single number (scalar) used mainly to calculate the angle between two vectors. The cross product, available only in three dimensions, gives a new vector perpendicular to the two original vectors, and is widely used in physics to calculate torque or magnetic field. The magnitude measures a vector's "length" as the square root of the sum of the squares of its components. The angle between two vectors is calculated from the relationship between the dot product and the two magnitudes, using the inverse cosine function. A dot product of exactly zero is a particularly useful special case, since it always signals that the two vectors are perpendicular to each other, regardless of their individual lengths.
A vector differs from an ordinary number in one essential way: it carries both a magnitude (size) and a direction, rather than magnitude alone. Velocity is a vector (60 km/h heading north is a different physical situation than 60 km/h heading south), while speed alone is just a number, called a scalar. This distinction between vectors and scalars runs through almost every operation this calculator performs.
Vector addition and subtraction work component by component — adding the x-components together and the y-components together (and z-components, in three dimensions) — which corresponds physically to combining two displacements or forces acting on the same object, producing a single resultant vector that represents their combined effect.
The dot product takes two vectors and returns a single scalar number, calculated by multiplying corresponding components and summing the results. Its main practical use is finding the angle between two vectors, since the dot product relates directly to the cosine of that angle through a well-known formula. A dot product of exactly zero has a particularly clean geometric meaning: the two vectors are perpendicular to each other, since the cosine of a 90-degree angle is zero — a fast way to check perpendicularity without separately calculating the angle itself.
The cross product, defined only in three dimensions, takes two vectors and returns a brand new vector rather than a scalar — one that points perpendicular to both original vectors, following a direction determined by the right-hand rule. This makes the cross product essential in physics wherever a rotational or perpendicular effect needs to be calculated: torque (the rotational effect of a force applied at a distance from a pivot point) and the magnetic force on a moving charged particle are both calculated using cross products.
Magnitude — a vector's length, independent of its direction — is calculated the same way as the distance formula, taking the square root of the sum of the squared components, which is exactly the Pythagorean theorem extended to as many dimensions as the vector has. Physics, computer graphics, robotics, and navigation all depend heavily on vector operations, since forces, velocities, accelerations, and 3D object orientations are all naturally represented as vectors rather than plain numbers.
The dot product returns a single number describing how aligned two vectors are, while the cross product (only defined in 3D) returns a new vector perpendicular to both.
The cross product's geometric definition — producing a perpendicular vector — only has a standard meaning in three-dimensional space, not in a flat 2D plane.
It shows how similarly the two vectors point: 0° means they point the same direction, 90° means they're perpendicular, and 180° means they point opposite ways.