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
▶ 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
Each scene highlights one component: ui in blue, vi in grey and wi in green, with two curved arrows flowing into wi. Learn more about reading a scene
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.
Vector addition — combining two vectors of the same length into a third vector by adding paired components: wi=ui+vi.
Vector subtraction — combining two vectors of the same length by subtracting paired components: wi=ui−vi.
Component-wise operation — an operation applied independently to each component; the result at position i depends only on the inputs at position i.
Same-length requirement — both operand vectors must have the same number of components. A vector in R2 cannot be added to a vector in R3.
Result length — the output vector w inherits the length of the operands. If u and v live in Rn, then w lives in Rn.
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 u and v 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 w, or use the speed selector to slow down or speed up the animation
The hover ? icon next to the dimensions label explains why u and v 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 w and shows three pieces of information at once.
• Highlighted components — the active component of u is colored as primary, the matching component of v as secondary, and the destination component of w as accent • Curved arrows — two arrows flow from ui and vi into wi, making the data flow explicit • Formula caption — the title shows the component-level equation, for example w3=u3+v3 • 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 w 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 and v drawn as rows of components and w waiting empty beneath them. At the default length both inputs have four components, so w will have four as well.
Nothing has been added yet. What the scene fixes is the precondition: u and v have the same number of components, so every uj has a vj sitting opposite it.
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 and one in R3 have nothing to pair the fourth component with.
Put another way, addition is an operation within a single vector space. R4 is closed under it — add two of its members and you get another member of R4, never something of a different length.
One Component at a Time
Each step highlights uj, the matching vj, and the destination slot wj, then writes uj+vj into it.
The frozen picture below is a step partway through the run: earlier components of w already hold their sums, one pair is being combined, and the rest are still placeholders.
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. u1 can only be added to v1, 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 reads wj=uj+vj across all four positions and has the same length it started with.
Geometrically this is the tip-to-tail rule: place v at the end of u and w runs from the start of u to the tip of v. The component arithmetic on screen is that picture written out coordinate by coordinate.
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 is an additive inverse. Those four facts are part of what makes Rn a vector space at all.
The tip-to-tail reading also explains commutativity without any algebra: laying v after u or u after 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−vj.
The still below is the subtraction run at the same point in the sweep, for direct comparison with the addition step above.
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 means u+(−v), so the toggle negates one input and reuses addition.
Geometrically the difference is the vector from the tip of vto the tip of u when both start at the origin. That direction is why order matters: u−v and v−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 w.
• Selecting u + v displays wi=ui+vi in every filled component • Selecting u − v displays wi=ui−vi 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 u, v, and w are linked, changing the length updates all of them at once.
• Start with a small length like 2 or 3 to see the per-component flow clearly — these correspond to vectors in the plane and in 3D space • Increase to 4 or 5 to see how the same rule scales to higher-dimensional vectors — the number of scenes grows linearly with the length • Symbolic component contents in w shrink automatically when the vector is longer, so ui+vi stays readable even at length 5 • 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 w 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 u and v are both vectors in Rn, then u+v is also in Rn, and its i-th component is
wi=ui+vi
This makes vector addition a component-wise operation: each component of the result depends only on the matching components in u and v, not on anything else in either vector.
Geometrically, vector addition corresponds to placing the tail of v at the head of u — the sum u+v runs from the tail of u to the head of v (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.
Vector addition satisfies the same algebraic properties as ordinary addition:
• Commutativity: u+v=v+u • Associativity: (u+v)+w=u+(v+w) • Identity: u+0=u, where 0 is the zero vector of the same length • Inverse: u+(−u)=0
These four properties are part of what makes Rn 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∈R2 and v∈R3, then v3 exists while u3 does not. There is no component in u to pair with v3, 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 cannot be added to a vector in R3 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−u in general; in fact u−v=−(v−u) • Treating the zero vector as a scalar — adding the scalar 0 to a vector is meaningless; you must add the zero vector of matching length
Worked Example
Take u and v as vectors in R3:
u=123,v=789
Then w=u+v is computed component by component:
w=1+72+83+9=81012
For d=u−v:
d=1−72−83−9=−6−6−6
Geometrically, u+v is the diagonal of the parallelogram spanned by u and v, while u−v points from the head of v to the head of u. The visualizer above mirrors this process symbolically — set the length to 3 and step through to see each pairing in turn.
Related Concepts
Vector operations — the broader family that includes addition, subtraction, scalar multiplication, dot product, and cross product.
Scalar multiplication of vectors — multiplying every component of a vector by a number; like addition, it is component-wise and preserves length.
Dot product — a bilinear operation that takes two vectors of the same length and returns a scalar, not a vector.
Cross product — a special operation defined only for vectors in R3 that returns a vector perpendicular to both inputs.
Linear combination — sums of the form au+bv that generalize vector addition by combining it with scalar multiplication.
Zero vector — the additive identity, with every component equal to zero.
Vector space — the abstract structure built on vector addition and scalar multiplication; Rn is the prototypical example.