Cheatsheet: What vectors actually are
The three views (one object, three angles)
Section titled “The three views (one object, three angles)”| View | A vector is… | Strength |
|---|---|---|
| Physics | An arrow with length and direction | Intuition; “how far and which way” |
| Computer science | An ordered list of numbers, e.g. [3, 4] | Computation; scales to any dimension |
| Math | Anything you can add and scale coherently | Generality; covers functions, polynomials, model states |
The arrow view and the list view are connected by a coordinate system: lay down axes, and every arrow gets a unique list (and back). Numbers for the computer, arrows for your head, the same object underneath.
The two operations that define a vector
Section titled “The two operations that define a vector”| Operation | Numeric rule | Geometric meaning |
|---|---|---|
| Addition | Add component by component | Tip-to-tail: walk the first arrow, then the second from its tip |
| Scalar multiplication | Multiply every component by one number | Stretch (>1), squish (<1), or flip (negative) |
Everything else in linear algebra (linear combinations, span, matrix transformations) is built from exactly these two moves.
Worked numbers
Section titled “Worked numbers”Addition:
[ 1 ] [ 3 ] [ 4 ][ 2 ] + [ 1 ] = [ 3 ]Scaling:
[ 3 ] [ 6 ] [ 4 ] [ 2 ] [ 2 ] [ -2 ] 2 · [ 1 ] = [ 2 ] 0.5 · [ 2 ] = [ 1 ] (-1) · [ 1 ] = [ -1 ] (stretch) (squish) (flip)Notation
Section titled “Notation”| Symbol | Meaning |
|---|---|
[3, 4] or column of 3 over 4 | A vector with components 3 and 4 |
| Column vector as matrix | An N by 1 matrix; in NumPy a nested array like [[3], [4]] |
| Component / coordinate | One entry in the list; says how far along one axis |
| Dimension | How many components (length of the list) |
| Scalar | A plain number used to scale a vector |
Coordinates describe the vector in a chosen coordinate system. Different axes give the same arrow different coordinates. The vector is the object; the coordinates are one description of it.
Pitfalls to dodge
Section titled “Pitfalls to dodge”- Arrow must start somewhere specific. No. A vector is a displacement; same length and direction means same vector, wherever drawn. Rooted at the origin by convention only.
- Vector equals its coordinates. No. Coordinates are one frame’s description; change the frame and the numbers change while the vector does not.
- Addition is concatenation. No.
[1, 2] + [3, 4] = [4, 6], not[1, 2, 3, 4]. Add matching components; same dimension in and out. - High dimensions are mystical. No. A 300-D vector is a list of 300 numbers. Undrawable, but every 2D rule applies unchanged. In ML, dimensions usually stand for features or learned properties, not physical directions.
- A vector must be an arrow or a list. No. The general definition is “anything you can add and scale coherently.” Arrows and lists are the two common examples.
Words to use precisely
Section titled “Words to use precisely”- Vector: an object you can add and scale; commonly pictured as an arrow or stored as a list of numbers.
- Component / coordinate: a single entry in the vector’s list, measured along one axis.
- Dimension: the number of components.
- Scalar: a number whose role is to stretch, squish, or flip a vector without rotating it.
- Tip-to-tail: the geometric picture of addition, placing the second arrow’s tail at the first arrow’s tip.
The one-line version
Section titled “The one-line version”A vector is an arrow you can compute with, a list of numbers you can picture, and anything you can add and scale coherently. Three faces of one object, the smallest unit everything else in this series builds on.