Vectors are arrows
Arrows you can add, stretch and measure, and the one arrow that is secretly a qubit.
Lesson 2 of 5 about 10 min
Directions, as numbers
Picture a city laid out like a grid. A friend gives you directions: “walk 3 blocks right, then 2 blocks up.” That instruction is a vector: a move with a size and a direction.
We draw a vector as an arrow from the middle of a grid, and write it as two numbers in brackets: (3, 2). The first number says how far right. The second says how far up.
Negative means the other way
A negative number just turns that part of the move around. (−2, 1) means 2 to the left and 1 up. (1, −3) means 1 right and 3 down.
Your turn
One move, then another
What if you follow one arrow, and then another from where you ended up? You land somewhere new. That total move is called the sum of the two vectors.
To add vectors, add the matching numbers: the right-left parts together, and the up-down parts together.
(2, 1) + (1, 2) = (3, 3)
Stretching arrows
Multiply a vector by an ordinary number and you stretch it: both numbers get multiplied. Times 2 makes it twice as long, pointing the same way. A negative number flips it around.
2 × (1, 2) = (2, 4)
Bigger than 1: the arrow stretches, same direction.
Your turn
How long is an arrow?
The arrow (3, 4) goes 3 right and 4 up. But how long is the arrow itself? Draw the right part and the up part, and you get a right-angled triangle. The arrow is its longest side.
A rule known for thousands of years gives that length. It appears in India's Baudhāyana Śulba Sūtra, and most people know it as Pythagoras' theorem: square both numbers, add them, then take the square root.
length = √(3² + 4²) = √25 = 5
Your turn
Arrows of length 1
Arrows whose length is exactly 1 are special enough to have a name: unit vectors. Their tips all sit on a circle with a radius of 1.
For these arrows, Pythagoras says √(x² + y²) = 1, which means x² + y² = 1. Watch the two squares as you move the arrow around.
x² + y² = 0.75 + 0.25 = 1
Your turn
An arrow that holds two chances
Look at those two squares again. Two numbers that are never negative and always add up to exactly 1. Where have you seen that before?
In the last lesson! Chances work exactly like that. So an arrow of length 1 can carry two chances: x² for one result and y² for the other.
Real qubits use a richer kind of number than this, which you'll meet two lessons from now. But the picture stays the same: an arrow of length 1, with chances hiding in its squares.
What you now know
- A vector is a move with a size and a direction, written as two numbers: (right, up).
- Add vectors by adding the matching numbers. It's one move followed by another.
- Multiply by a number to stretch, shrink or flip an arrow.
- Length = √(x² + y²), from Pythagoras.
- An arrow of length 1 has x² + y² = 1, just like two chances. That's a qubit in disguise: |0⟩ points right, |1⟩ points up.
Next: matrices, the machines that turn and flip arrows. Every quantum gate is one of them.