1.1.2Linear Algebra Essentials

Vector addition, scalar multiplication, and geometric interpretation

1,629 words7 min readdifficulty · medium

1. What is a vector? (WHAT)

WHY a column? Because matrix–vector multiplication (later chapters) is defined so a matrix acts on a column from the left. Consistency now saves pain later.


2. Vector Addition (HOW + WHY)

Derivation from first principles

A vector represents a displacement. If u\mathbf{u} moves me from origin OO to point AA, and v\mathbf{v} is another displacement, then to add them I continue from AA by v\mathbf{v}, landing at BB.

  • The xx-displacement of the whole trip = (x-move of u\mathbf{u}) + (x-move of v\mathbf{v}) = u1+v1u_1 + v_1.
  • Same logic each axis.

Therefore addition must be componentwise — it's not a definition pulled from a hat, it's forced by "displacements accumulate along each axis independently."

Figure — Vector addition, scalar multiplication, and geometric interpretation

3. Scalar Multiplication (HOW + WHY)

Derivation

Scaling means "do the same displacement cc times." Doing v\mathbf{v} twice = v+v\mathbf{v}+\mathbf{v}, whose components are 2v1,2v_1,\dots. Extending from integers to reals by continuity gives cv=(cv1,,cvn)c\mathbf{v}=(cv_1,\dots,cv_n).


4. Combining them: the workhorse of ML


5. Worked Examples


6. Common Mistakes (Steel-manned)


7. Feynman & Mnemonic

Recall Explain to a 12-year-old (click to reveal)

Imagine walking. A vector is an instruction: "go 3 steps east, 4 steps north." Adding two instructions means do the first walk, then the second — you end up somewhere, and that final spot is the sum. Scalar multiplication is like a speed dial: multiply by 2 = take a walk twice as long in the same direction; multiply by 1-1 = walk backwards the same distance. That's it — everything fancy in AI is just millions of these walks added up.


8. Active Recall

How do you add two vectors?
Componentwise: (u+v)i=ui+vi(\mathbf u+\mathbf v)_i = u_i+v_i; geometrically tip-to-tail.
Why is vector addition componentwise (first principles)?
Displacements along each axis accumulate independently, so each coordinate adds separately.
What is cvc\mathbf v?
Multiply every component by cc: (cv1,,cvn)(cv_1,\dots,cv_n); stretches/flips the arrow.
Formula for the length of cvc\mathbf v?
cv=cv\|c\mathbf v\| = |c|\,\|\mathbf v\|.
Why c|c| and not cc in cv\|c\mathbf v\|?
Length is non-negative; a negative scalar flips direction but scales length by c|c|.
State the triangle inequality for vectors.
u+vu+v\|\mathbf u+\mathbf v\| \le \|\mathbf u\| + \|\mathbf v\|, equality iff same direction.
What is a linear combination?
c1v1++ckvkc_1\mathbf v_1+\cdots+c_k\mathbf v_k — scaled sum of vectors; the core operation of a neuron.
What must be true to add two vectors?
They must have the same dimension.
Geometric meaning of 12(u+v)\tfrac12(\mathbf u+\mathbf v)?
Midpoint of the segment joining the tips of u\mathbf u and v\mathbf v.
Is vector addition commutative?
Yes: u+v=v+u\mathbf u+\mathbf v=\mathbf v+\mathbf u (parallelogram = both tip-to-tail orders).

9. Connections

Concept Map

has

written as

geometric meaning

displacement forces

computed

geometric picture

property

repeated displacement

computed

effect

same result

combined form

combined form

Vector in Rn

Magnitude and Direction

Column tuple

Arrow from origin

Vector Addition

Componentwise sum

Tip-to-tail and Parallelogram

Commutative

Scalar Multiplication

Multiply each component

Length scales by absolute c

Neural nets weighted sums

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, ek vector basically ek arrow hai jo origin se kisi point tak jaata hai — usme direction bhi hai aur length (magnitude) bhi. AI-ML me har data point, har embedding, har feature-row ek vector hi hota hai, isliye ye foundation hai.

Do main operations yaad rakho. Pehla addition: dono vectors ko component-wise jodo — x ke saath x, y ke saath y. Geometrically ise "tip-to-tail" socho: pehle vector chalo, uske tip se doosra vector chalo, jahan pahunche wahi answer. Kyun component-wise? Kyunki har axis ka movement alag-alag add hota hai, ye definition kisi ne random nahi banayi.

Doosra scalar multiplication: ek number cc se poore vector ko multiply karo, matlab har component ko cc se guna. cc agar 2 hai toh arrow double lamba, 0.50.5 toh aadha, aur negative cc toh direction ulti ho jaati hai. Length ka formula: cv=cv\|c\mathbf v\| = |c|\,\|\mathbf v\| — dhyan do, yaha c|c| hai kyunki length kabhi negative nahi hoti, sirf direction flip hoti hai.

Ek important galti se bacho: u+v\|\mathbf u + \mathbf v\| hamesha u+v\|\mathbf u\| + \|\mathbf v\| ke barabar nahi hota — arrows ek doosre ko cancel bhi kar sakte hain (triangle inequality). Jab tumhe ye do cheezein — scale karo aur add karo — samajh aa jaayengi, tab neural network ka "weighted sum" bilkul trivial lagega, kyunki wo bas yehi operations baar-baar hain.

Test yourself — Linear Algebra Essentials

Connections