Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

Vectors

A vector is the basic object of linear algebra, and it wears two faces at once. To a physicist it is an arrow: a quantity with both size and direction, like a velocity or a force. To a computer it is a list of numbers, the arrow's coordinates. Linear algebra lives in the fact that these are the same thing.

Two operations

Everything a vector can do comes from just two operations. You can add two vectors, and you can scale a vector by a number (a "scalar").

Adding is tip-to-tail: slide the second arrow so its tail sits on the first arrow's tip, and the sum runs from the very start to the very end. In coordinates it is even simpler, add the numbers slot by slot:

(2,1)+(1,3)=(3,4).

Scaling stretches or shrinks an arrow, and flips it if the number is negative. In coordinates you multiply each slot:

3(2,1)=(6,3).
Two vectors drawn as arrows from the origin in the plane, and their sum formed by placing them tip to tail (the parallelogram rule), illustrating vector addition.
Two vectors drawn as arrows from the origin in the plane, and their sum formed by placing them tip to tail (the parallelogram rule), illustrating vector addition.

Linear combinations and span

Combine the two operations (scale some vectors and add the results) and you get a linear combination, such as 2u+3v. This simple idea is the engine of the whole subject.

The set of all linear combinations of some vectors is their span: every point you can reach by scaling and adding them. Two arrows pointing different ways in the plane span the entire plane: with the right amounts of each, you can reach anywhere. Two arrows pointing along the same line span only that line.

Why it matters

Vectors let us treat a whole list of numbers as a single object with a geometry. A data point with a hundred features is a vector in a hundred-dimensional space; we cannot picture it, but we can still add, scale, and reason about it exactly as with arrows in the plane. That leap (from arrows you can draw to lists you cannot) is what gives linear algebra its reach.