Vector Addition Calculator
Enter the x and y components (and z for 3D) of two vectors, choose add or subtract, and get the resultant vector instantly. The calculator also returns the magnitude and direction angle of the result, and the "Show your work" panel walks through every arithmetic step. Switch to polar entry mode to type a magnitude and angle instead of components.
How vector addition works
A vector is a quantity with both magnitude (size) and direction, usually written as an ordered pair (x, y) in two dimensions or a triple (x, y, z) in three dimensions. To add two vectors, you add their matching components: the x-components together, the y-components together, and, for 3D vectors, the z-components together. For example, if a = (3, 4) and b = (1, 2), then a + b = (3+1, 4+2) = (4, 6). This component-by-component rule comes directly from the parallelogram law: place both vectors tail-to-tail, and the resultant is the diagonal of the parallelogram they form.
Polar entry mode: magnitude and angle
Some problems give a vector as a magnitude and a direction angle rather than as components. The calculator accepts this polar form for 2D vectors. Given a magnitude r and angle theta (measured from the positive x-axis in degrees), the Cartesian components are x = r * cos(theta) and y = r * sin(theta). The calculator converts to components first, then adds, so the result is always shown in component form together with the magnitude and direction of the resultant.
Scalar multiplication and the general linear combination
A scalar is a plain number. Multiplying a vector a by scalar k stretches (or flips, if k is negative) the vector: k*a = (k*ax, k*ay). When you enable the "Apply scalar multipliers" toggle, the calculator computes alpha*a + beta*b (or alpha*a - beta*b for subtraction). This is called a linear combination of vectors. Linear combinations are the foundation of vector spaces and appear everywhere in physics (resultant forces, velocities), computer graphics (weighted blending), and machine learning (linear layers).
Magnitude and direction of the resultant
Once you have the resultant components (rx, ry) in 2D, the magnitude is |r| = sqrt(rx^2 + ry^2) by the Pythagorean theorem. The direction angle is theta = atan2(ry, rx), which returns a value in the full 360-degree range rather than the 180-degree range of plain arctan. In 3D, the magnitude extends to |r| = sqrt(rx^2 + ry^2 + rz^2), and the direction is described by two angles: the azimuth angle in the x-y plane and the elevation angle above it. Dividing the resultant by its own magnitude gives the unit vector, which points in the same direction but has a length of exactly 1.
Vector operation formulas
| Operation | Formula | Notes |
|---|---|---|
| Addition | a + b = (ax+bx, ay+by) | Commutative: a+b = b+a |
| Subtraction | a - b = (ax-bx, ay-by) | Not commutative |
| Scalar multiply | k*a = (k*ax, k*ay) | Scales length by |k| |
| Magnitude 2D | |a| = sqrt(ax^2 + ay^2) | Always non-negative |
| Magnitude 3D | |a| = sqrt(ax^2 + ay^2 + az^2) | 3D extension |
| Direction angle | theta = atan2(ay, ax) | Degrees from +x axis |
| Unit vector | hat_a = a / |a| | Length = 1 |
| Polar to Cartesian | x = r*cos(theta), y = r*sin(theta) | 2D only |
Standard formulas for 2D and 3D vectors with components (x, y) or (x, y, z).
Frequently asked questions
What is vector addition?
Vector addition combines two or more vectors into a single resultant vector by adding their corresponding components. If a = (ax, ay) and b = (bx, by), then a + b = (ax+bx, ay+by). Geometrically this matches the parallelogram rule or the tip-to-tail rule: place the tail of b at the tip of a, and the resultant runs from the tail of a to the tip of b.
How do I add vectors given as magnitude and angle?
Convert each vector to Cartesian components first using x = r*cos(theta) and y = r*sin(theta), where r is the magnitude and theta is the angle from the positive x-axis. Then add the x-components and add the y-components. This calculator does that conversion automatically when you select the "Magnitude and angle" entry mode.
What is the difference between vector addition and subtraction?
Subtracting vector b from vector a is the same as adding the negative of b: a - b = a + (-b). In component form, a - b = (ax-bx, ay-by). Unlike addition, subtraction is not commutative: a - b and b - a point in opposite directions and are negatives of each other.
What does the unit vector tell me?
The unit vector points in the same direction as the resultant but has a magnitude of exactly 1. It is found by dividing every component of the resultant by the resultant magnitude. Unit vectors are useful when you need just the direction of a vector regardless of its length, for example when computing projections or setting up a coordinate axis.
Can I add more than two vectors with this calculator?
This calculator handles two vectors at a time with optional scalar coefficients. To add three or more vectors, add the first two to get an intermediate result, then add that result to the third vector, and so on. Because vector addition is associative, the order you do this does not affect the final answer.
What is the parallelogram law of vector addition?
The parallelogram law says that if two vectors a and b are placed tail-to-tail, they form two sides of a parallelogram, and the diagonal from the shared tail is the resultant a + b. Equivalently, by the triangle rule, you place the tail of b at the tip of a, and the resultant runs from the starting tail to the ending tip. Both give the same answer.