Interactive Lab 02

Vectors: Numbers with Meaning

Move sliders, draw arrows, compare feature vectors, test scaling, and explore why high-dimensional vectors are the basic objects of data and AI.

1. A vector is a coordinate story

The vector [3, 4] is not automatically a movement, a point, a purchase, or a document. The numbers become meaningful when we decide what the coordinates represent.

point: (3,4) movement: 3 east, 4 north shopping: 3 coffees, 4 sandwiches text: 3 counts of word A, 4 counts of word B

2. Vector as point and arrow

3. Vector addition

The purple arrow is the total movement. The second vector starts at the tip of the first vector.

4. Scalar multiplication

5. Distance between two vectors

6. Feature vectors and scaling

Each restaurant is represented by [price level, distance, rating]. Raw distance can be dominated by the coordinate with the largest numerical scale.

A

price 2, distance 1.5, rating 4.6

B

price 3, distance 2.0, rating 4.8

C

price 1, distance 8.0, rating 4.2

Currently: raw features
Modeling warning: Linear algebra computes exactly what you ask it to compute. It does not automatically know which units are meaningful.

7. High-dimensional length simulation

Generate random vectors and watch how their lengths behave as dimension grows.

8. Reflection notebook

Use this space during class. Your text stays in your browser only.

9. Chapter takeaway

A vector has algebraic rules, geometric pictures, and real-world meanings. Addition combines, scalar multiplication changes intensity, subtraction measures change, norm measures size, and distance compares objects.