The Length of u stepper (▲ / ▼) sets the number of components of u, from 1 to 10; w always gets the same length. Learn more about choosing the length
Hover the ? icon next to the label for a reminder of what a scalar is and why the length is preserved. Learn more about getting started
▶ Play runs the whole product, 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 and wi in green, joined by a curved arrow; the filled slot shows k⋅ui. 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 k · A = C, cell by cell.
Length of u?A scalar is a single number — not a vector or matrix. Multiplying by a scalar k preserves shape: the result has the same dimensions as the input, and every entry equals k times the corresponding input entry. The same idea applies to vectors and to matrices — only the shape of the operand differs.
ulength4
k·
u1×4
u1,1
u1,2
u1,3
u1,4
=
w1×4
?
?
?
?
Step 1 / 6
Step explanations
1Scalar multiplication
k is a scalar — a single number. To compute w = k · u, multiply every entry of u by k. w has the same length as u (4).
Component-wise operation — applied independently to each component; the result at position i depends only on k and vi.
Length preservation — kv has the same number of components as v. Scalar multiplication never changes the dimension.
Scaling factor — the role k plays: it stretches (∣k∣>1), shrinks (∣k∣<1), or reverses direction (k<0) the vector uniformly.
Zero scalar — multiplying by k=0 produces the zero vector of the same length as v.
Geometric scaling — multiplying a vector by k stretches its magnitude by ∣k∣ and preserves direction if k>0 or reverses it if k<0.
Getting Started with the Visualizer
DemoStep, speed, back, reset
Step 0 of 5
Set the length of v and watch kv=w build one component at a time. (The tool labels this vector u.)
• Use the Dimensions stepper to set the length of v (1 to 10 components) • w inherits the same length automatically • Hover the ? icon for a reminder of what a scalar is and why the length is preserved • Press play or step manually through the scene player; the speed selector and step log let you control pace and review
The scalar k is shown symbolically in front of v. The visualizer focuses on the structural rule — every component of v gets multiplied by the same k — not on any specific numerical value of k.
Reading the Scene Player
DemoOne component per scene
Step 0 of 4
Each scene focuses on one component of w.
• The active component in v is highlighted primary; the destination component in w is highlighted accent • A curved arrow flows from vi into wi, showing the scalar being applied • Each filled component of w shows its symbolic content k⋅vi • The step log on the right keeps a record of completed components
By the final scene, every component of w holds its symbolic product and the operation is complete.
The Opening Scene: One Number and One Vector
The player opens with the scalar k, the vectoru laid out as a row of components, and an empty w below it. At the default length u has four components, so w will have four as well.
Only the setup is on screen: a single number on one side, four components on the other, and the statement that w=k⋅u is about to be built one slot at a time.
Opening scene, frozen
The scalar k beside u, with w empty below. Every slot of w shows the placeholder - and there is no length rule to satisfy, since k meets each component on its own.
There is no matching-length precondition here, unlike addition. A scalar multiplies a vector of any length, because it meets each component individually rather than pairing off against a second vector.
The result stays in the same space it started in: scale a vector of R4 by any real number and you get another vector of R4. That closure under scaling is one of the two operations a vector space is required to support, the other being the addition on its own page.
One Component at a Time
Each step highlights one component uj together with its destination wj, and writes k⋅uj into that slot.
The frozen picture below is a step partway through the run: earlier slots already hold their scaled value, one is being computed, and the rest are still placeholders.
Mid-sweep, frozen
One component of u and its destination slot in w highlighted together. Earlier slots already hold k times their component; later ones are still placeholders.
Every step uses the same k. That single shared factor is what makes the operation uniform — it stretches all components by an identical amount, which is precisely why the direction of the vector is preserved.
Compare that with multiplying each component by a different number. That is a perfectly good operation too, but it is not scalar multiplication; it distorts the vector rather than scaling it, and it corresponds to applying a diagonal matrix instead of a scalar.
The Completed Product
The final scene fills every slot, so w reads wj=k⋅uj across all four components, at the same length it started with.
Geometrically, w points along the same line as u and its length is scaled by ∣k∣: ∥ku∥=∣k∣∥u∥.
Completed product, frozen
All four slots filled with k times the component above, and w still four long. The same k everywhere is what keeps the direction unchanged.
The sign of k decides the direction. For k>1 the vector stretches, for 0<k<1 it shrinks, at k=0 it collapses to the zero vector, and for k<0 it flips to point the opposite way while scaling by ∣k∣. The absolute value in the length formula is doing real work: a length can never come out negative.
The algebraic rules follow from the components, exactly as for matrices: k(u+v)=ku+kv, (k+m)u=ku+mu, (km)u=k(mu), and 1⋅u=u. Together with the addition axioms these are what make Rn a vector space.
One consequence worth naming: the set of all scalar multiples of a single non-zero u is a line through the origin. That set is the span of u, and it is the simplest example of a subspace.
Choosing Vector Length
DemoShort and long vectors
Step 0 of 4
The dimension stepper controls the length of v, and w follows automatically.
• Start with length 2 or 3 to see the per-component flow clearly — these match vectors in the plane and in 3D space • Increase to 4 or 5 to see how the same rule scales to higher dimensions; total scenes equal the length n • Symbolic content in w shrinks automatically as the vector grows, so k⋅vi stays readable • Both row and column orientations follow identical rules — scalar multiplication has no length restriction
What Scalar Multiplication Is
Scalar multiplication takes a number k and a vector v and produces a vector kv of the same length, with every component multiplied by k:
(kv)i=k⋅vi
It's the simplest non-trivial vector operation. There are no length restrictions — any vector can be scaled. The result has the same length as v, and every component depends only on k and its own value in v.
Geometrically, scalar multiplication stretches or shrinks a vector along its direction (and flips it when k is negative). Together with vector addition, scalar multiplication is what makes Rn a vector space.
• Associativity with scalars: (kl)v=k(lv) • Distributivity over vector addition: k(u+v)=ku+kv • Distributivity over scalar addition: (k+l)v=kv+lv • Identity scalar: 1⋅v=v • Zero scalar: 0⋅v=0 (zero vector of the same length) • Sign flip: (−1)⋅v=−v • Compatibility with the dot product: (kv)⋅u=k(v⋅u) • Effect on magnitude: ∥kv∥=∣k∣⋅∥v∥
These properties are exactly the eight vector-space axioms for scalar multiplication.
Why It Matters
Scalar multiplication is the operation that lets vectors form a vector space, and it appears everywhere combinations of vectors appear.
• Linear combinations: any expression c1v1+c2v2+⋯+cnvn uses scalar multiplication • Normalization: dividing v by its norm produces a unit vectorv/∥v∥ • Sign changes: −v is just scalar multiplication by −1, pointing in the opposite direction • Geometric transformations: scaling by k stretches or shrinks length while preserving direction • Physics: force, velocity, and momentum vectors are routinely rescaled by dimensionless constants • Gradient descent and optimization: the step θ←θ−η∇L uses scalar multiplication of the gradient vector by the learning rate η
Worked Example
Take v as a vector in R3 and k=3:
v=1−24
Then 3v multiplies every component by 3:
3v=3−612
With k=−1 instead:
−v=−12−4
And with k=0, the result is the zero vector in R3.
Geometrically, 3v points the same direction as v but is three times as long, while −v has the same length but points the opposite way. Set the visualizer to length 3 and step through to see this animated symbolically.
Common Mistakes
A few mistakes recur.
• Multiplying only the first component — k multiplies every component, not just one • Confusing scalar multiplication with the dot product — scalar multiplication uses one number and returns a vector; the dot product uses two vectors and returns a number • Confusing scalar multiplication with the Hadamard product — kv uses a single scalar; component-wise multiplication uses an entire vector of multipliers • Thinking the length changes — kv always has the same number of components as v, regardless of k • Forgetting sign flips count as scalar multiplication — −v is (−1)⋅v • Confusing magnitude with components — multiplying by k scales the magnitude by ∣k∣, but each component is scaled by k itself, sign and all
Related Concepts
Vector addition — the component-wise additive operation; pairs with scalar multiplication to make vectors a vector space.
Dot product — the bilinear operation that takes two vectors and returns a scalar.
Hadamard product — component-wise multiplication of two vectors; the vector-by-vector analogue of scalar multiplication.
Linear combination — c1v1+⋯+cnvn, the central object built from scalar multiplication and addition.
Vector space — the abstract structure vectors form under addition and scalar multiplication.
Unit vector — a vector of norm 1, obtained by multiplying v by the scalar 1/∥v∥.
Zero vector — the result of multiplying any vector by the scalar 0.
Magnitude (norm) — ∥kv∥=∣k∣⋅∥v∥ links scalar multiplication directly to length.