← All articles
mathvectorslinear algebraphysicsSeptember 15, 20265 min read

What Is a Vector? Arrows, Coordinates and the Mathematics of Direction

By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.

Walk three kilometres and you have described a distance; walk three kilometres north and you have described a displacement, and the difference between the two is the whole idea of a vector. Some quantities are just amounts, temperature, mass, price, and some come with a direction attached, velocity, force, the wind, the push of a magnet, and the mathematics that handles the second kind, invented in the 1840s and refined through the 1880s, is now the language in which physics is written, in which a video game moves a character, and in which a search engine decides that two documents are alike.

Arrow and list

A vector can be pictured as an arrow, whose length is the size of the quantity and whose direction is its direction, and two arrows are the same vector if they have the same length and direction wherever they are drawn. It can also be written as a list of numbers, its components along fixed axes: a displacement of three kilometres north and four east is the vector (4, 3), and its length, by Pythagoras, is five. The two views are the same thing, and each is convenient for something; the arrow shows what is happening, the list lets it be calculated. A vector in three dimensions has three components, and the mathematics does not care about the number, so that a vector with a thousand components, which cannot be drawn, is handled by the same rules as one with two.

Adding and scaling

Vectors add head to tail. A walk of (4, 3) followed by a walk of (1, 2) ends at (5, 5), the components added one by one, and the arrow from start to finish is the sum; the same picture gives the result of two forces acting on one body, or a boat's velocity in a current. Multiplying a vector by a number scales its length without turning it, and by a negative number reverses it, so that subtraction is adding the reverse. Those two operations, addition and scaling, are all that a vector space needs, and anything that obeys them, arrows, lists, polynomials, sound waves, the states of a quantum system, is treated by the same algebra. The operations:

  • Addition: components added, arrows laid head to tail; commutative and associative like ordinary addition
  • Scalar multiplication: every component multiplied by the number, stretching or shrinking the arrow
  • The dot product: the sum of the products of matching components, giving a number that measures how much two vectors point the same way; zero when they are at right angles
  • The cross product, in three dimensions only: a new vector at right angles to both, with length equal to the area of the parallelogram they span, used for torque, magnetic force and the orientation of surfaces
  • Length, or norm: the square root of the dot product of a vector with itself

Why physics uses them

Newton's second law, force equals mass times acceleration, is a vector equation: the acceleration is in the direction of the force, and a body pushed north and east at once accelerates diagonally, which the components handle automatically. Velocity, momentum, the electric and magnetic fields, the flow of a fluid at every point, all are vectors, and the laws that relate them are written in a notation that Josiah Willard Gibbs and Oliver Heaviside distilled in the 1880s from William Rowan Hamilton's quaternions of 1843, which Hamilton had carved on a Dublin bridge in the moment of discovery and which turned out to be more machinery than physics needed. Maxwell's four equations of electromagnetism, which fill a page in components, fit on a line in vectors, and the compactness is not cosmetic; it shows that the laws are the same whichever way the axes point, which is a physical fact about space.

Why computers use them

A point on a screen is a vector, a colour is a vector of three components, red, green and blue, and a character in a game is a few thousand points that are moved, rotated and lit by vector arithmetic thousands of times a second, which is what a graphics card is built to do in bulk. A word, in a modern language model, is a vector of several hundred components, learned so that words used in similar ways point in similar directions, and the dot product between two of them measures their similarity; the arithmetic in which king minus man plus woman comes out near queen is vector addition. A search engine represents a document as a vector of the words it contains and finds the documents nearest to a query by the angle between them, and a recommendation system does the same with viewers and films. The machine learning of the 2020s is, at its base, very large vectors being multiplied by very large tables of numbers.

Beyond arrows

The abstraction, made in the twentieth century, is that a vector is anything that can be added and scaled, and the space it lives in is defined by those rules rather than by a picture. Functions form a vector space, since two functions can be added and one can be scaled, and that is the setting of Fourier's decomposition of a signal into sines and of quantum mechanics, where a particle's state is a vector and the measurable quantities are what the dot product yields. The arrow that a schoolchild draws for a force and the state of an electron are the same object in the same algebra, which is why the subject built to describe a walk of three kilometres north describes most of what physics and computing now do.

The takeaway

A vector is a quantity with magnitude and direction, drawn as an arrow and written as a list of components, added head to tail and scaled by numbers, with a dot product that measures alignment and, in three dimensions, a cross product that gives a perpendicular. Physics is written in vectors because forces, velocities and fields have direction and the laws do not depend on the axes, computers use them for every point, colour, word and document, and the abstraction extends to any objects that can be added and scaled.

Practise this

Questions from Higher Mathematics

Reading about something is not the same as being able to recall it. These are real questions from the Higher Mathematics unit in our Math track, answers and explanations included. The unit has 120 in total across 21 steps.

  • Fill the blankLevel 4

    1. The ____ of the 2x2 matrix [[a,b],[c,d]] equals ad - bc.

    • determinantcorrect
    • trace
    • inverse
    • transpose

    That number is the determinant; it tells you whether the matrix is invertible.

  • Choose all that applyLevel 5

    2. Which of these are logical connectives? (Select all that apply.)

    • Conjunction (AND)correct
    • Disjunction (OR)correct
    • Negation (NOT)correct
    • Factorial

    Conjunction (AND), disjunction (OR), and negation (NOT) are connectives; factorial is an arithmetic operation.

  • Fill the blankLevel 4

    3. The set of all ____ (like -2, 0, and 5) is written Z.

    • integerscorrect
    • primes
    • fractions
    • decimals

    Z stands for the integers, the whole numbers together with their negatives and zero.