Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Vector Addition&Subtraction

How to use
  1. The Operation control switches between u + v and u − v; the scenes are rebuilt with the new operator and the player returns to its first scene. Learn more about addition and subtraction
  2. The ▲ / ▼ stepper sets the length shared by uu and vv, from 11 to 1010; ww always has the same length. Learn more about choosing the length
  3. Hover the ? icon next to the length label for why uu and vv must have the same length. Learn more about getting started
  4. ▶ Play runs the whole sum, Next → and ← Back move one scene, Reset returns to the opening scene, and the speed menu sets the pace from Slow to Very Fast. Learn more about the controls
  5. Each scene highlights one component: uiu_i in blue, viv_i in grey and wiw_i in green, with two curved arrows flowing into wiw_i. Learn more about reading a scene
  6. The Step explanations log lists every scene so far with its formula, the current one highlighted. Learn more about the step log


Symbolic visualization of A ± B = C, cell by cell.

Operation
Vector length (shared by u and v)?u and v must have the same length. Each entry of u is paired with the entry at the same position in v; the result w has that same length.
u, vlength4
u1×4
u1,1
u1,2
u1,3
u1,4
+
v1×4
v1,1
v1,2
v1,3
v1,4
=
w1×4
?
?
?
?
Step 1 / 6

Step explanations

1Vector addition
u and v both have length 4. To compute w = u + v, pair up each entry of u with its counterpart in v and add them.
Equal lengths give every component of u a partner in v - that is the whole precondition. Learn more about the opening scene · what vector addition is














Key Terms

Vector addition — combining two vectors of the same length into a third vector by adding paired components: wi=ui+viw_i = u_i + v_i.

Vector subtraction — combining two vectors of the same length by subtracting paired components: wi=ui−viw_i = u_i - v_i.

Component-wise operation — an operation applied independently to each component; the result at position ii depends only on the inputs at position ii.

Same-length requirement — both operand vectors must have the same number of components. A vector in R2\mathbb{R}^2 cannot be added to a vector in R3\mathbb{R}^3.

Result length — the output vector ww inherits the length of the operands. If uu and vv live in Rn\mathbb{R}^n, then ww lives in Rn\mathbb{R}^n.

Conformability — the condition under which an operation is defined. For vector addition and subtraction, conformability means matching length.

Getting Started with the Visualizer

DemoLength, play, speed
Step 0 of 5
Choose an operation and a length, then watch the result vector build up one component at a time.

• Use the Operation segmented control to switch between u + v and u − v
• Set the shared length of uu and vv with the Dimensions stepper — the number of components ranges from 1 to 5
• Click play on the scene player to step through each component of ww, or use the speed selector to slow down or speed up the animation

The hover ? icon next to the dimensions label explains why uu and vv must have the same length. Because the operation is component-wise, no other configuration is needed — the visualizer fully determines the symbolic flow from the operation and length alone.

Reading the Scene Player

DemoOne component per scene
Step 0 of 5
Each scene focuses on a single component of ww and shows three pieces of information at once.

• Highlighted components — the active component of uu is colored as primary, the matching component of vv as secondary, and the destination component of ww as accent
• Curved arrows — two arrows flow from uiu_i and viv_i into wiw_i, making the data flow explicit
• Formula caption — the title shows the component-level equation, for example w3=u3+v3w_3 = u_3 + v_3
• Step log — a running record of completed steps appears below the vectors, so you can scroll back through what has been filled in

By the final scene, every component of ww holds its symbolic sum or difference and the vectors visualize the complete operation.

The Opening Scene: Two Vectors of the Same Length

The player opens with u\mathbf{u} and v\mathbf{v} drawn as rows of components and w\mathbf{w} waiting empty beneath them. At the default length both inputs have four components, so w\mathbf{w} will have four as well.

Nothing has been added yet. What the scene fixes is the precondition: u\mathbf{u} and v\mathbf{v} have the same number of components, so every uju_j has a vjv_j sitting opposite it.
u1×4u1,1u1,2u1,3u1,4+v1×4v1,1v1,2v1,3v1,4=w1×4????
Opening scene, frozen

u and v as four-component rows with w empty below. Every slot of w shows the placeholder; the matching lengths are the only thing established so far.

The same-length rule is the vector form of the same-shape rule for matrices, and it exists for the same reason: addition is defined component by component, so it needs a partner for each component. A vector in R4\mathbb{R}^4 and one in R3\mathbb{R}^3 have nothing to pair the fourth component with.

Put another way, addition is an operation within a single vector space. R4\mathbb{R}^4 is closed under it — add two of its members and you get another member of R4\mathbb{R}^4, never something of a different length.

One Component at a Time

Each step highlights uju_j, the matching vjv_j, and the destination slot wjw_j, then writes uj+vju_j + v_j into it.

The frozen picture below is a step partway through the run: earlier components of w\mathbf{w} already hold their sums, one pair is being combined, and the rest are still placeholders.
u1×4u1,1u1,2u1,3u1,4+v1×4v1,1v1,2v1,3v1,4=w1×4u1+v1u2+v2u3+v3?
Mid-sweep, frozen

One component of u, the component opposite it in v, and the destination slot in w are highlighted together. Earlier slots already read u + v; later ones are still placeholders.

No component ever meets a component in a different position. u1u_1 can only be added to v1v_1, which is why the sweep can be read as four completely independent one-number additions rather than a single four-dimensional operation.

That independence is what makes vector addition componentwise in the technical sense, and it is the property that fails for other vector products. The inner product also pairs components positionally but then collapses them to a single number; the cross product mixes positions outright.

The Completed Sum

The final scene fills every slot, so w\mathbf{w} reads wj=uj+vjw_j = u_j + v_j across all four positions and has the same length it started with.

Geometrically this is the tip-to-tail rule: place v\mathbf{v} at the end of u\mathbf{u} and w\mathbf{w} runs from the start of u\mathbf{u} to the tip of v\mathbf{v}. The component arithmetic on screen is that picture written out coordinate by coordinate.
u1×4u1,1u1,2u1,3u1,4+v1×4v1,1v1,2v1,3v1,4=w1×4u1+v1u2+v2u3+v3u4+v4
Completed sum, frozen

All four slots filled, each holding the sum of the two components directly above it. w has the same length it started with.

The algebraic properties follow from the components. Addition is commutative and associative because ordinary addition is; the zero vector is an identity; −u-\mathbf{u} is an additive inverse. Those four facts are part of what makes Rn\mathbb{R}^n a vector space at all.

The tip-to-tail reading also explains commutativity without any algebra: laying v\mathbf{v} after u\mathbf{u} or u\mathbf{u} after v\mathbf{v} traces the two sides of the same parallelogram and lands on the same corner.

Switching to Subtraction

The operation toggle turns every ++ into a −-, and nothing else changes: same lengths, same positional pairing, same one-slot-at-a-time sweep, with each destination now reading uj−vju_j - v_j.

The still below is the subtraction run at the same point in the sweep, for direct comparison with the addition step above.
u1×4u1,1u1,2u1,3u1,4−v1×4v1,1v1,2v1,3v1,4=w1×4u1−v1u2−v2u3−v3?
Subtraction, same point in the sweep

Identical choreography with the operator flipped: each destination slot now reads u - v. Lengths and pairing are unchanged.

As with matrices, subtraction is not a new operation: u−v\mathbf{u} - \mathbf{v} means u+(−v)\mathbf{u} + (-\mathbf{v}), so the toggle negates one input and reuses addition.

Geometrically the difference is the vector from the tip of v\mathbf{v} to the tip of u\mathbf{u} when both start at the origin. That direction is why order matters: u−v\mathbf{u} - \mathbf{v} and v−u\mathbf{v} - \mathbf{u} are the same arrow pointing opposite ways, and subtraction is therefore not commutative.

Switching Between Addition and Subtraction

DemoPlus or minus
Step 0 of 5
The operation toggle changes both the symbol in the equation and the contents of each component of ww.

• Selecting u + v displays wi=ui+viw_i = u_i + v_i in every filled component
• Selecting u − v displays wi=ui−viw_i = u_i - v_i in every filled component
• The intro and outro scene captions update to use the words "addition" or "subtraction" accordingly
• The per-component scene titles also update their operator

Toggling the operation rebuilds the full sequence of scenes, so you can compare how vector addition and vector subtraction differ purely in operator while sharing the exact same component-wise structure.

Choosing Vector Length

The dimension stepper controls the length shared by all three vectors. Because uu, vv, and ww are linked, changing the length updates all of them at once.

• Start with a small length like 22 or 33 to see the per-component flow clearly — these correspond to vectors in the plane and in 3D space
• Increase to 44 or 55 to see how the same rule scales to higher-dimensional vectors — the number of scenes grows linearly with the length
• Symbolic component contents in ww shrink automatically when the vector is longer, so ui+viu_i + v_i stays readable even at length 55
• Both row and column orientations follow the same rule, since vector addition is defined component-wise regardless of layout

There is no separate control for ww because its length is forced by the operation.

What Vector Addition Is

Vector addition pairs up corresponding components of two vectors and sums them. If uu and vv are both vectors in Rn\mathbb{R}^n, then u+vu + v is also in Rn\mathbb{R}^n, and its ii-th component is

wi=ui+viw_i = u_i + v_i


This makes vector addition a component-wise operation: each component of the result depends only on the matching components in uu and vv, not on anything else in either vector.

Geometrically, vector addition corresponds to placing the tail of vv at the head of uu — the sum u+vu + v runs from the tail of uu to the head of vv (the "tip-to-tail" or parallelogram rule). Vector subtraction works identically with subtraction replacing addition.

For a comprehensive treatment of vectors and their operations, see vector operations theory.

Key Formulas

The full definition of vector addition for vectors u,v∈Rnu, v \in \mathbb{R}^n:

u+v=w,wi=ui+vi for all 1≤i≤nu + v = w, \quad w_i = u_i + v_i \text{ for all } 1 \leq i \leq n


Vector subtraction:

u−v=w,wi=ui−viu - v = w, \quad w_i = u_i - v_i


Vector addition satisfies the same algebraic properties as ordinary addition:

• Commutativity: u+v=v+uu + v = v + u
• Associativity: (u+v)+w=u+(v+w)(u + v) + w = u + (v + w)
• Identity: u+0=uu + 0 = u, where 00 is the zero vector of the same length
• Inverse: u+(−u)=0u + (-u) = 0

These four properties are part of what makes Rn\mathbb{R}^n a vector space. Subtraction is neither commutative nor associative, just like with scalars.

Why the Same-Length Rule Matters

Vector addition is only defined when both operands have the same number of components. This rule is not arbitrary — it follows directly from the component-wise definition.

If u∈R2u \in \mathbb{R}^2 and v∈R3v \in \mathbb{R}^3, then v3v_3 exists while u3u_3 does not. There is no component in uu to pair with v3v_3, so the sum at that position is undefined. The same problem arises for any mismatch in length.

This reflects a deeper geometric truth: vectors of different lengths live in different spaces and cannot be combined directly. A 2D vector and a 3D vector do not share a common ambient space, so their sum has no geometric meaning either.

For comparison with operations between vectors and matrices, see matrix-vector multiplication.

Common Mistakes

Even though vector addition is among the simplest vector operations, a few mistakes appear regularly.

• Trying to add vectors of different lengths — a vector in R2\mathbb{R}^2 cannot be added to a vector in R3\mathbb{R}^3 even if you "pad with zeros" informally
• Confusing vector addition with the dot product — vector addition returns a vector; the dot product returns a scalar
• Mixing row and column orientations carelessly — although the component-wise rule is the same, in matrix-vector contexts a row vector and a column vector are not interchangeable
• Forgetting that subtraction is not commutative — u−v≠v−uu - v \neq v - u in general; in fact u−v=−(v−u)u - v = -(v - u)
• Treating the zero vector as a scalar — adding the scalar 00 to a vector is meaningless; you must add the zero vector of matching length

Worked Example

Take uu and vv as vectors in R3\mathbb{R}^3:

u=(123),v=(789)u = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}, \quad v = \begin{pmatrix} 7 \\ 8 \\ 9 \end{pmatrix}


Then w=u+vw = u + v is computed component by component:

w=(1+72+83+9)=(81012)w = \begin{pmatrix} 1+7 \\ 2+8 \\ 3+9 \end{pmatrix} = \begin{pmatrix} 8 \\ 10 \\ 12 \end{pmatrix}


For d=u−vd = u - v:

d=(1−72−83−9)=(−6−6−6)d = \begin{pmatrix} 1-7 \\ 2-8 \\ 3-9 \end{pmatrix} = \begin{pmatrix} -6 \\ -6 \\ -6 \end{pmatrix}


Geometrically, u+vu + v is the diagonal of the parallelogram spanned by uu and vv, while u−vu - v points from the head of vv to the head of uu. The visualizer above mirrors this process symbolically — set the length to 33 and step through to see each pairing in turn.