Vector Addition Calculator
Result
x component of the resultant
- y component of the resultant
- 6.0000
- z component of the resultant
- 0.0000
- Magnitude of the resultant
- 7.2111
A vector addition calculator adds or subtracts two vectors component by component and prints the result as three components plus its length. Type each vector as a list of numbers — 3 4 and 1 2 — and pick whether you want them added or taken apart. Adding two vectors means adding the first components, then the second components, then the third, and letting those totals be the components of the answer. There is no multiplication between them and no angle to work out, which is what makes adding vectors so much simpler than multiplying them: the operation never mixes one component with another. Vector subtraction is the same operation with the second vector's signs flipped, so u − v and u + (−v) are one calculation written two ways, and both live behind a single control here because the sign is the whole of the difference. Two or three components are accepted and both vectors must have the same count. The result may perfectly well be the zero vector — adding a vector to its own negative is a correct sum, not a failure — so nothing on this page refuses an input for producing zeros.
Vectors and their sums
| Vector u | Vector v | x component of u + v | y component of u + v | z component of u + v | Magnitude of u + v |
|---|---|---|---|---|---|
| 3 4 | 1 2 | 4 | 6 | 0 | 7.2111 |
| 1 0 | 0 1 | 1 | 1 | 0 | 1.4142 |
| 1 1 1 | 1 1 1 | 2 | 2 | 2 | 3.4641 |
| 2 -3 | 4 5 | 6 | 2 | 0 | 6.3246 |
| -1 2 | 3 -5 | 2 | -3 | 0 | 3.6056 |
| 1 0 0 | 1 0 0 | 2 | 0 | 0 | 2 |
| 1 2 3 | -1 -2 -3 | 0 | 0 | 0 | 0 |
| 3 4 -5 | 1 2 2 | 4 | 6 | -3 | 7.8102 |
Eight pairs of vectors and their sums, with the length of each sum in the last column. This table is addition only: the page's subtract option cannot be shown here because the table is generated without knowing which option is chosen, so subtraction is left to the worked examples and to one sentence — subtract by flipping the signs of the second vector and adding. The first row is the pair the page loads with. The second is the pair lying along the two axes, perpendicular to each other, and its length is the smallest in the table relative to the two inputs: √2 against lengths of 1 and 1. The third row is the first of two same-direction rows, where the second vector is an exact copy of the first and the answer is twice it; here the length of the sum really is the sum of the lengths, 2√3, and this is the only kind of pair for which that is true. The fourth and fifth rows involve negative components in two different patterns, one where the signs cancel in the x component and one where the second vector's larger first component pulls the sum past zero. The sixth row is the second same-direction case, and the easiest one to check by eye: both inputs are one unit long and the sum is two. The seventh row is a vector added to its exact negative, giving the zero vector with a length of 0 — the opposite extreme, and an ordinary result rather than an error. The eighth row is three-dimensional with no zero component, so its third column is doing real work. Every figure is recomputed when the page is built; the spaces in the first two columns are separators and not part of the numbers.
Formula
u + v = (u₁ + v₁, u₂ + v₂, u₃ + v₃) u − v = u + (−v) |u + v| = √(w₁² + w₂² + w₃²)
- Vector u
- The first vector, as a list of two or three numbers separated by spaces or commas. Which of the two boxes it goes in does not change the answer for addition and only flips the sign for subtraction, so nothing is lost by treating it as simply the first
- Vector v
- The second vector, written the same way. It must have the same number of components as the first: there is no rule for adding a two-component vector to a three-component one, since the third number would have nothing to pair with
- u + v
- The sum, worked out component by component. Each component of the answer uses only the components in the same position of the two inputs — the first components together, the second components together, and so on
- u − v
- The difference, which is the sum with every component of the second vector negated first. Flipping the sign of the second vector is the entire difference between adding and subtracting, which is why one control serves both
- x, y and z components of the resultant
- The three rows of the answer, read together as one vector. The third is 0 whenever both inputs are two-component vectors: that zero is not padding but what the same direction looks like written in three coordinates
- |u + v|
- The length of the resulting vector, which is the square root of the sum of the squares of its components. It is a separate question from the three components and worth its own row: the components say where the answer points, the length says how far it reaches
- Add or subtract
- The one choice this page asks for, and the only thing that changes between the two modes. The same two boxes and the same four output rows are used either way; only the arithmetic changes
- Zero vector
- A vector whose components are all 0. A sum or a difference can be the zero vector and that is a correct answer, not a failure — adding a vector to its negative gives exactly this, and the reference table contains a row where it happens
- Four decimal places
- How wide the outputs are written. The components are exact whenever the inputs are whole numbers, since only additions and subtractions are involved; the rounding is for the length, which is a square root
Use this page when two vectors act on the same thing at once and you want their combined effect. Two forces on one object, two velocities added in a current, two displacements walked one after the other — all of them are component-by-component additions, and the answer is the single vector that would do the job of both. Subtraction answers the other half of the same question: u − v is the vector that takes you from the tip of v to the tip of u, which is why it is the operation behind every relative-position and relative-velocity calculation. The reason vectors add so easily is that the components never mix — each position in the answer depends on the same position in the inputs and nothing else — and that is worth knowing because it is not true of multiplication, where every component of the answer depends on every component of both inputs and an angle appears. Two components and three components are both fine, and the two inputs must match each other. A sum of zero is an ordinary outcome: a vector plus its negative is zero, and zero is a perfectly good vector. The one thing to keep straight is that the length printed alongside is the length of the result and not the sum of the two input lengths — unless the two vectors point the same way, those are different numbers, and the difference between them is the whole reason vectors are not added by adding their sizes.
Worked examples
3 4 + 1 2
- x component: 3 + 1 = 4
- y component: 4 + 2 = 6
- z component: 0 + 0 = 0, since both inputs are two-component vectors
- Magnitude: √(16 + 36 + 0) = √52 = 7.211103
The input the page loads with, and a case where every step is visible. The two vectors point in roughly the same direction, so the answer is long: 7.2111 against input lengths of 5 and 2.2361, whose sum would be 7.2361. The two are close here but not equal, and they are equal only when the two vectors point in exactly the same direction — two rows of the reference table are that case, and everywhere else in it the sum comes out shorter than the two lengths added.
3 4 − 1 2
- x component: 3 − 1 = 2
- y component: 4 − 2 = 2
- z component: 0 − 0 = 0
- Magnitude: √(4 + 4) = √8 = 2.828427
The same two vectors as the first example with the other option selected, and the only thing that changed is the sign applied to the second input. The answer is 2u − (u + v) in effect and comes out much shorter than either input, because the two vectors point in similar directions and taking them apart leaves little behind. Flipping between this and the first example is the quickest way to see what the control does.
1 2 3 + (−1) (−2) (−3)
- x component: 1 + (−1) = 0
- y component: 2 + (−2) = 0
- z component: 3 + (−3) = 0
- Magnitude: √(0 + 0 + 0) = 0
A vector added to its own negative, giving the zero vector. Nothing has gone wrong: the two arrows have the same length and opposite directions, so the journey they describe ends where it started. The page reports this rather than refusing it, and the reference table's seventh row is the same case. Switch the control to subtraction on this same input and the answer doubles instead — 2 4 6 with a length of 7.4833 — which is as clear as the sign's effect ever gets.
−1 2 − 3 −5
- x component: −1 − 3 = −4
- y component: 2 − (−5) = 2 + 5 = 7
- z component: 0 − 0 = 0
- Magnitude: √(16 + 49) = √65 = 8.062258
The case where the signs do not cancel and the arithmetic has to be done carefully. Subtracting negative five adds five, so the y component grows to 7, and the x component goes negative because the second vector's first component is larger. The result is longer than either input, which happens whenever the two vectors point in opposite directions — and the length is the clearest sign of that, since components −4 and 7 are not obviously a long vector until they are squared and added.
Limitations
Both vectors must have the same number of components, and each must have two or three: the panel has three component rows, and a mismatch would leave the third number of one input with nothing to pair against. A two-component vector is not padded to three — it lies in the flat plane, and the 0 printed in the third row is what that direction looks like in three coordinates. Components are read as ordinary numbers: a comma followed by a space separates components, a comma with no space after it is read as a decimal point (1,5 is one and a half), and a thousands grouping is refused rather than guessed at — write 1500, not 1,500. The reference table shows addition only, because the table is generated without knowing which option is selected; subtraction is the same rows with the second vector's signs flipped, and the worked examples below cover it. The length printed alongside the result is the length of the result and not the sum of the two input lengths. Adding the two lengths together gives the right answer only when the vectors point in exactly the same direction; adding a vector to its negative gives 0 rather than twice the length, which is as far from that as the two cases get. Four decimal places is a display width rather than a claim of precision. Nothing here knows what the components were measured in, and the answer carries whatever unit they did — the components and the length are all in that same unit, so the three components should not be read as a length on their own.
Frequently asked questions
- What does adding two vectors mean?
- Adding two vectors means adding their components position by position: the first components together, then the second, then the third, and the three totals are the components of the answer. Nothing is multiplied and no angle is needed, which is what makes vector addition so much easier than vector multiplication — the components never mix, so each entry of the answer depends on exactly one entry from each input.
- How is vector subtraction different from addition?
- By one sign. Subtracting is adding with the second vector negated first, so u − v and u + (−v) are the same calculation written two ways. That is why both live behind one control on this page: the arithmetic that changes is a single sign, and putting them side by side under the same inputs is the clearest way to see it. Subtract 1 2 from 3 4 and you get 2 2; add them and you get 4 6.
- Can the sum be the zero vector?
- Yes, and it is a correct answer rather than a failure. Adding a vector to its exact negative gives zero: the two arrows have equal lengths and opposite directions, so the displacement they describe returns to where it began. The page reports 0 for all three components and a length of 0. The reference table's seventh row is this case, and the same input under subtraction gives 2u instead.
- Do the two vectors have to have the same number of components?
- Yes. There is no rule for adding a two-component vector to a three-component one, because the third number would have nothing to pair with. Each input may have two or three components — that is the panel's limit, not the arithmetic's — but the two counts have to match, and the page says so instead of quietly treating the missing entry as a zero.
- Is the length of the sum the sum of the lengths?
- No, and this is the mistake the page most wants to prevent. The length of the sum is only the sum of the two lengths when the vectors point in exactly the same direction; when they point in opposite directions it can be the difference of the lengths, and when they are perpendicular it is smaller than either. The reason is that components can partly cancel, and which way the cancellation goes depends on the directions rather than on the sizes.
- Can I add a two-dimensional vector to a three-dimensional one?
- No, and the page refuses it rather than filling the missing third component with a zero. A two-component vector is a vector in the plane, which is the same thing as a three-component vector whose third entry is 0 — but that is a fact about how the plane sits inside space, and it is not a licence to add a number to nothing. Write out the third component explicitly if that is what you mean.
References
- Vector addition — the component-by-component sum, and the parallelogram rule that says the same thing geometrically, which is what the two input boxes and the resultant row implement — Wolfram MathWorld (United States)
- Vector subtraction — the difference of two vectors as the sum with the second one negated, which is why one control on this page serves both operations — Wolfram MathWorld (United States)
- Vector — the object being added, including the rule that two vectors may only be added when they have the same number of components and that the sum of a vector and its negative is the zero vector — Wolfram MathWorld (United States)
- 教育部关于印发义务教育课程方案和课程标准(2022 年版)的通知——The fifth item in the annex list of this notice is the Mathematics Curriculum Standards for Compulsory Education (2022 edition); plane vectors and their linear operations do not fall in the compulsory-education grade bands, and the wording of the standards and the grade-band breakdown are governed by that annex — 中华人民共和国教育部