Lesson 1 of 15

Vectors, norms and geometry

A vector is both an ordered list of numbers and a move through space. Read those views as one object, then measure length, distance and direction without losing track of the coordinates.

Every observation a model receives eventually becomes a vector. This lesson starts with the thing itself: ordered coordinates, drawn as movement on a plane.

Six ideas connect the algebra to the picture, with short challenges for reading arrows, combining and scaling them, measuring norms and distances, and separating direction from length.

Every board connects the same vector in two forms: ordered components and geometry on a plane. The answers are computed from the coordinates. There is no timer -- read the movement before doing the arithmetic.

1 of 6

A vector is a list and an arrow

The same ordered numbers can describe one observation or one displacement.

A vector is an ordered list of numbers. In a dataset, those numbers might be the features of one example. In a plane, (3, 2) means move three units right and two up, so it draws an arrow from the origin to (3, 2).

Order matters: (3, 2) and (2, 3) are different vectors. The number of coordinates is the vector's dimension. A vector with d coordinates is represented in NumPy by shape (d,).

A row such as [height, weight, age] is a three-dimensional vector even though nobody draws it. Geometry is still the useful language: nearby rows describe similar observations.

Challenge

Read the Arrow

1 of 3

Move between the picture and its ordered components.

Read horizontal movement first and vertical movement second. The arrow is the same vector wherever it is drawn.