The ▲ / ▼ stepper sets the length shared by u and v, from 1 to 10; w always has the same length, and the run has 3n+2 scenes. Learn more about choosing the length
Hover the ? icon next to the length label for why a linear combination is scalar multiplication plus vector addition. Learn more about getting started
▶ Play runs all three phases, 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
The run walks three phases: u is scaled by α in place, then v by β, then each wi is filled with αui+βvi. Learn more about the three phases
The active component is blue in phase 1 and grey in phase 2; in phase 3 two curved arrows flow from ui and vi into the green wi. Learn more about reading a scene
The Step explanations log lists every scene so far with its phase and formula, the current one highlighted. Learn more about the step log
Symbolic visualization of α·A + β·B = C, in three phases: scale, scale, add.
Vector length (shared by u and v)?A linear combination is α·A + β·B, where α and β are scalars. The two operands must share the same shape so that the addition is defined; the result has that same shape. Linear combinations are built from two operations already covered: scalar multiplication (scale each operand) and addition (add the scaled operands). The same idea applies to vectors and to matrices — only the shape of the operands differs.
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 / 14
Step explanations
1Linear combination α·u + β·v
u and v both have length 4. The linear combination α·u + β·v is built in three phases: scale u by α, scale v by β, then add the two scaled vectors. The result w has the same length.
Linear combination — an expression αu+βv that scales each vector by a scalar and adds the results. More generally, c1v1+c2v2+⋯+cnvn.
Scalar coefficient — the numbers α,β (or ci) that multiply each vector in the combination.
Same-length requirement — all vectors in a linear combination must have the same number of components so the additions are defined.
Result length — the linear combination has the same length as the operands.
Span — the set of all linear combinations of a fixed collection of vectors; geometrically, a line, plane, or higher-dimensional subspace through the origin.
Linear independence — a property of a collection: no vector in it can be written as a linear combination of the others.
Vector space — the set of all vectors of a given length forms a vector space under vector addition and scalar multiplication; linear combinations are its native operation.
Getting Started with the Visualizer
DemoLength, play, speed
Step 0 of 5
Set the shared length of u and v, then watch αu+βv=w build in three phases.
• Use the Dimensions stepper to set the length of u and v (1 to 5 components). w inherits the length automatically • Hover the ? icon for a reminder that linear combinations are built from scalar multiplication plus vector addition • Press play or step manually through the scene player • The animation walks three phases in order: scale u by α, scale v by β, then add the scaled vectors into w • The scalars α and β are shown symbolically — the visualizer focuses on structure, not specific numeric values
The Three Phases
DemoScale u, scale v, add
Step 0 of 5
The visualizer breaks the operation into three clearly separated phases.
• Phase 1 — scale u by α: every component of u is multiplied by α in place, one component per scene; v stays untouched • Phase 2 — scale v by β: every component of v is multiplied by β in place, one component per scene; u is already fully scaled • Phase 3 — add into w: each component of w is filled with αui+βvi, with two curved arrows flowing from u and v into w
This phase order makes the decomposition of a linear combination into scalar multiplication and vector addition explicit. Both operations are visible on the screen at the same time when phase 3 begins.
The Opening Scene: Two Vectors and Two Scalars
The player starts with the vectors u and v, the scalars α and β, and an empty w waiting to hold αu+βv.
At the default length all three have four components. The caption states the plan before anything runs: the combination is built in three phases rather than in one pass.
Opening scene, frozen
u, v and an empty w, all four components long, with the two scalars named. Nothing computed yet - the caption announces the three phases first.
Two preconditions apply, one from each operation involved. The scalars are unrestricted, because scaling imposes no length rule. But u and v must have the same number of components, because the final phase adds them.
This single expression is the central construction of linear algebra. Spans, linear independence, bases and dimension are all defined in terms of which vectors can or cannot be written as a linear combination of others — so the four scenes that follow are worth watching closely.
Phase 1: Scaling u by α
The first sweep multiplies every component of u by α, one slot at a time — scalar multiplication on its own, exactly as its own tool performs it.
Four steps at the default length. v is untouched and w is still empty: this phase produces the intermediate αu, not part of the answer yet.
Phase 1, mid-sweep
Components of u picking up their α factor one at a time. v is untouched and w is still empty: an intermediate, not an answer.
Geometrically this phase stretches or flips u without turning it. Whatever α is, αu stays on the line through the origin that u defines.
That is why the sweep alone can never produce a genuinely new direction. Reaching anywhere off that line requires the second vector, which is precisely what the next two phases bring in.
Phase 2: Scaling v by β
The second sweep repeats the operation on v with the other scalar, producing βv. Another four steps, with u now left alone — already fully scaled from phase 1.
w remains empty. Both inputs have been scaled; nothing has been combined.
Phase 2, mid-sweep
The same sweep on v with β. u is left alone now, and w is still waiting. Between them these two scaled vectors determine everything the pair can reach.
The two scalars are independent, and sweeping them over all real numbers is what generates the span of u and v — every vector reachable from the pair.
How large that span is depends entirely on the two vectors. If v happens to be a multiple of u, both lie on one line and every combination stays on it, however the scalars are chosen. If they point in genuinely different directions, the combinations fill a whole plane. That distinction is linear independence, and it is a statement about the vectors, not about the scalars.
Phase 3: Adding the Two Scaled Vectors
The third sweep fills w, adding the two intermediates component by component: wj=αuj+βvj.
This phase is ordinary vector addition, and it is where the same-length requirement is actually consumed. Four more steps, and the combination is complete.
Phase 3, mid-sweep
w finally filling, each slot reading αu + βv. This is plain vector addition, and the step where the same-length rule is actually used.
Read across the phases and the definition assembles itself: scale, scale, add. Adding more terms changes nothing structurally — αu+βv+γx is one more scaling phase and one more addition.
Geometrically the final phase is the parallelogram rule applied to the two scaled arrows rather than the originals. That is the picture behind the whole construction: pick how far to travel along each direction, then follow one after the other. Choosing coordinates for a vector in a given basis is exactly the reverse question — which α and β land you on a particular w.
Reading the Scene Player
Each scene combines highlights, arrows, and a caption.
• In phase 1, the active component of u is highlighted primary; the rest of the canvas stays neutral • In phase 2, the active component of v is highlighted secondary • In phase 3, the active components of u and v are highlighted primary and secondary, and the destination component of w is accent; arrows flow from both sources into w • Filled components show their symbolic content — αui, βvi, or αui+βvi — at a font size that scales with the vector length • The step log on the right keeps a record of every completed component across all phases
Choosing Vector Length
DemoScenes grow with the length
Step 0 of 4
The dimension stepper controls the length shared by all three vectors.
• Shorter vectors (length 2 or 3) make the per-component flow easy to follow in each phase and correspond to vectors in the plane and in 3D space • Longer vectors (length 4 or 5) demonstrate that the same rule scales to higher dimensions; total scenes equal 3n plus the intro and outro • Component content shrinks automatically as the vector grows so αui+βvi stays readable at the largest length • Both row and column orientations follow identical rules — linear combinations require only matching length between operands
More generally, a linear combination of n vectors is
w=c1v1+c2v2+⋯+cnvn
All vectors must share the same length, and the result inherits that length. The operation is built from two simpler ones: scale each vector by its coefficient, then add the scaled vectors component by component.
Geometrically, scaling stretches or reverses a vector along its direction, and addition follows the parallelogram rule — a linear combination is just both operations together. For comprehensive theory, see vector operations.
Key Properties
Linear combinations inherit their properties from scalar multiplication and vector addition.
• Closure: a linear combination of vectors in Rn is again in Rn • Commutativity: αu+βv=βv+αu • Associativity: combining linear combinations gives another linear combination • Zero coefficient: if α=0, the vector u drops out entirely • Scaling a linear combination: k(αu+βv)=(kα)u+(kβ)v • Distributivity: α(u+v)=αu+αv
The structural fact behind all of this is that Rn is a vector space, and linear combinations are exactly the operation that vector spaces are designed to support.
Why It Matters
Linear combinations are the foundation on which most of linear algebra is built.
• Span and basis: the span of a set of vectors is the set of all their linear combinations; a basis is a linearly independent set whose span is the whole space • Linear independence: testing whether c1v1+⋯+cnvn=0 forces all ci=0 • Solving linear systems: a system Ax=b asks whether b is a linear combination of the columns of A • Subspaces: a subspace is a set closed under linear combinations — lines and planes through the origin are the simplest examples • Coordinates: writing a vector as a linear combination of basis vectors gives its coordinates in that basis • Physics, optimization, machine learning: superposition of forces, gradient updates, and linear regression all reduce to linear combinations
Worked Example
Take u, v as vectors in R3 and α=2, β=−1:
u=130,v=521
Scale u by 2:
2u=260
Scale v by −1:
−v=−5−2−1
Add:
2u−v=−34−1
Set the visualizer to length 3 and step through to see the three phases animated symbolically.
Common Mistakes
A few mistakes recur.
• Mixing lengths — every vector in the combination must have the same length; no padding with zeros • Distributing scalars unevenly — α(u+v)=αu+v; the scalar applies to every vector it multiplies • Confusing linear combination with dot product — a linear combination returns a vector; the dot product returns a scalar • Treating a single scalar multiple as a linear combination of one vector — technically valid but trivial; the interesting case has at least two vectors • Forgetting that the zero vector is a trivial linear combination — choosing all coefficients zero produces the zero vector regardless of the operands, which is exactly the test for linear independence
Related Concepts
Vector addition — the additive piece of any linear combination.