Unit 1 · Vectors
Lesson 03 · Available to read
Vectors as lists, in any dimension
The same vector written as a list of coordinates, [3, 2]: two representations of one object.
The arrow from the previous lesson moves 3 units along the x-axis and 2 units along the y-axis. Recording just these displacements gives the vector in coordinate form: [3, 2]. Each number is called a component or entry.
Components are ordered: the first is the x-component and the second the y-component, so [2, 3] is a different vector from [3, 2].
The arrow and the list are two representations of the same object. The arrow supports geometric intuition; the list supports computation. Computers work only with the list, and so will we once vectors have too many components to draw. Vectors are frequently written vertically, as column vectors.
The same idea extends beyond the plane. Adding a third component takes the vector out of the plane: [3, 2, 2] points 3 units along x, 2 along y and 2 along z. This is how 3D graphics position objects in space.
Nothing restricts us to three components. A song might be described by five measured features: energy, tempo, danceability, mood and loudness. The vector [0.8, 0.6, 0.9, 0.7, 0.5] then lives in five-dimensional space, written ℝ⁵. In general, a vector with n components belongs to ℝⁿ, and n is its dimension.
We cannot visualise five dimensions, and fortunately we need not: the algebraic rules are identical to those in two dimensions, applied to more components. A bar chart of the entries is a practical way to display such a vector. Language models routinely use vectors with thousands of components.
The takeaway
A vector in ℝⁿ is an ordered list of n components; the arrow and the list are two representations of the same object.
Practice
0 of 8 attempted
- 1Calculate
Write as a list the arrow that goes 4 steps right and 1 step down.
Saved in this browser
- 2Calculate
Describe the arrow [0, 5] and the arrow [−3, 0].
Saved in this browser
- 3Multiple choice
Is [2, 5] the same vector as [5, 2]?
- 4Explain in your own words
Why is the list view more useful than the arrow view once vectors get bigger?
Saved in this browser
- 5Calculate
How many dimensions does the vector [1, 0, 2, 5, 3, 3] have?
Saved in this browser
- 6Multiple choice
A screen pixel's colour is given by its red, green and blue values. How many dimensions is that colour vector?
- 7Apply
Describe a movie as a 4D vector: choose four numeric features and give an example vector.
Saved in this browser
- 8Explain in your own words
We can't picture 5 dimensions. Why isn't that a problem for doing math with 5D vectors?
Saved in this browser