Path
Linear algebra · Lesson 1
Vectors
A vector is magnitude with direction: an arrow in space, or an ordered list of numbers. That dual view is why linear algebra powers both geometry and data.
Core ~14 minDeep study ~32 minWhat is a vector?How do you add vectors?
How this idea was born
Wind has speed and direction. A force pushes a certain amount along a heading. Displacement says how far and which way you walked. For centuries, physics needed a citizen that could carry both magnitude and direction without collapsing into a single bare number.
Josiah Willard Gibbs (1839-1903), with Heaviside and others, helped push vector language into a form physicists could compute with, amid competing formalisms. MacTutor sketches the career. Steal the ethic: choose representations that make the next calculation inevitable, not ornamental. As an arrow a vector knows direction and length; as a list it knows components along axes. That dual view is why the same language powers geometry, physics, and data tables.
This chapter is the foundation for a modern rereader before matrices as maps, alignment via dot products, and bases as scaffolding. If you only memorize column notation, you miss the geometry. If you only draw arrows, you cannot scale to a million features.
First principles
A vector can be:
- A geometric arrow (direction + length)
- A coordinate list
Addition tip-to-tail matches componentwise sums. Scaling stretches (or flips if ). The zero vector is the arrow of no displacement and the list of all zeros.
Linear combinations fill a line or a plane (or more) depending on how independent and are. That is a preview of span; the bases chapter will make independence precise.
Worked intuition
Tip-to-tail addition is a physical story: walk one displacement, then another. The shortcut home is the sum. Componentwise addition is the same story told in coordinates. When data scientists say "vector," they often mean the coordinate list - but the arrow intuition still teaches what scaling and adding do.
If points east and points north, points northeast with a length the Pythagorean theorem can compute. Geometry lesson, still paying rent.
One row of a spreadsheet is a vector. Features become axes. Distance and angle become geometry on data. Multiplying by reverses direction. Multiplying by doubles length without turning (in the usual Euclidean picture).
Algebrica's vectors page develops magnitude, direction, and the dual arrow/list view with careful diagrams. Read it when you want more than the cartoon arrow.
Common confusions
Speed without direction. A weather report that says "wind 40" without a heading is half a vector. Sailors, pilots, and robots need the missing half. Data science makes the same demand: a feature without an axis meaning is a number adrift.
Adding vectors from different spaces. You can add two length-3 lists only when corresponding components mean the same axes. Age plus income is meaningful as a feature vector only after you decide those are coordinates of one record, not after you pretend the units magically match for every operation.
Position versus free vector. In geometry pedagogy, arrows can slide (free vectors) or be anchored at the origin as position vectors. The algebra is related; the story differs. Be explicit which picture you are using.
"High-dimensional" as mystical. Dimension means independent axes in the list view. It is bookkeeping with geometry attached, not a portal to another metaphysics.
Treating one-hot IDs as geometrically meaningful distances. Index is not "near" index in meaning just because the integers are neighbors. Embedding spaces try to fix that; raw IDs do not.
Forgetting origin dependence in some applied settings. Physics free vectors slide; some data vectors are anchored interpretations. State your picture.
History & stories
Josiah Willard Gibbs helped give vector analysis a practical language physicists could compute with, amid competing formalisms (including quaternion traditions associated with figures such as Hamilton and later debates involving Heaviside and others). MacTutor's Gibbs biography is the reliable short reference. He cared that tools serve thinking about the physical world.
The ethic is representation discipline: when several notations compete, prefer the one that makes the next calculation inevitable.
Real world
Wind has speed and direction. A force pushes a certain amount along a heading. Displacements add as vectors: walk east then north; net displacement is the diagonal. Robotics, navigation, and animation stacks live on these additions all day.
A data record with age, income, and score is a vector in feature space. Once axes are fixed, "nearby" becomes a geometric question.
Open when you want the machine-learning connection. Skip freely.
Field notes, extra examples, and glossary live here when you want more than the core path.
Carry this forward
- Vectors are arrows and lists under one set of addition and scaling laws.
- Linear combinations preview span; independence waits for the bases chapter.
- Next: matrices as machines that send vectors to vectors.
Read more
Go deeper when curiosity hits - videos, essays, and primary trails.
- referenceMacTutor - Josiah Willard Gibbs
- video3Blue1Brown - Vectors, what even are they?
- articleBetter Explained - Vector calculus (gentle start)
- articleAlgebrica - VectorsVector geometry and operations with editable-style diagrams.
- bookSteven Strogatz - The Joy of XStep Into the Light: vectors as choreography.
Check your understanding
A short learning loop - try a few, learn from misses, mark complete when you have engaged. No timer, no scoreboard.
Try at least 3 core prompts, or choose I'll return later.