A vector is an arrow, or, which is the same thing, a list of numbers: how far you go across and how far up. The AI lessons are full of them, and they bring four new symbols with them. Pythagoras is all you need for the most important one.
‖x‖ ‖x‖: the length of the arrow
- Say it
- “norm of x” or “magnitude of x”.
- It means
- Double bars around a vector give its length. In two dimensions, it's Pythagoras: ‖(3, 4)‖ = √(3² + 4²) = 5.
If the arrow goes 3 across and 4 up, it’s 5 long: the hypotenuse of a triangle with sides 3 and 4. With more numbers, it works the same way: add up all the squares and take the square root.
Real example · in the lesson How does a computer turn a photo into numbers?
‖x‖ = √(Σᵢ xᵢ²): Pythagoras in n dimensions.
xᵀ xᵀ: the transpose
- Say it
- “x transpose”.
- It means
- A small T up top lays the vector down: if it was standing up, as a column, it ends up lying down, as a row. In a table (matrix), it swaps rows and columns.
The numbers are the same; only the layout changes. It matters because, when you multiply tables of numbers, the shapes have to fit. wᵀx is the technical way of writing the dot product of w and x: multiply each pair and add up.
Real example · in the lesson Logistic regression or neural network? Same neuron
z = wᵀx + b: a neuron’s score.
∈ ∈: belongs to
- Say it
- “is in” or “is a”. x ∈ ℝ is read “x is a real number”.
- It means
- A sort of rounded E that says the thing on the left is part of the group on the right. Crossed out, ∉, it means “is not in”.
It’s the short way of saying what kind of thing something is. 3 ∈ ℤ: 3 is a whole number. ½ ∉ ℤ: a half isn’t.
Real example · in the lesson Logistic regression or neural network? Same neuron
w ∈ ℝᵈ: the weights are a list of d real numbers.
ℝ ℤ ℝ, ℤ, ℚ, ℕ: the sets of numbers
- Say it
- ℝ: “the reals”. ℤ: “the integers”. ℚ: “the rationals”. ℕ: “the naturals”.
- It means
- Letters with a double stroke that name families of numbers: naturals (0, 1, 2…), integers (negatives too), rationals (fractions) and reals (every number on the line, including √2 and π).
You know them from school, even if not by these letters. ℝⁿ means “lists of n real numbers”: ℝ² is the points of the plane, and ℝ⁷⁸⁴ is 28 × 28-pixel photos flattened into a single list.
Real example · in the lesson How does a computer turn a photo into numbers?
x ∈ ℝⁿ, a list of n real numbers.
Try it
Move the arrow’s two steps. Watch its length change and see how it’s written standing up and lying down. Look for other arrows with a whole-number length, like (3, 4).
Challenge
Sources
- Norm, transpose, ∈ and the sets ℕ, ℤ, ℚ and ℝ: ISO 80000-2:2019, Quantities and units — Part 2: Mathematics (iso.org).
How this cheat sheet was made: written with Claude’s help from the source above and translated from the Spanish original. The examples are copied from the site’s lessons. The drawings are original.