One row of a table
A morning has two measurements: a temperature of 6 degrees and 3 millimetres of rain. These two numbers are a single row of a data table.
Two numbers, one point
Put the first number on the horizontal axis and the second on the vertical axis, and the row becomes a single point on the plane: (6, 3).
The first component
We move 6 units along the horizontal axis. This is the first component of the vector, the temperature.
The second component
From there we move 3 units up. This is the second component, the rain.
An arrow from the origin to the point
The arrow drawn from the origin to (6, 3) is the vector v. It has both a direction and a length.
The length of the arrow
The length comes from Pythagoras: √(6² + 3²) = 6.71. This length helps when we measure how similar two mornings are.
A vector in code
In code v is just a list with two elements. AI works on a photo, a sentence or a morning by turning it into lists of numbers like this.