Skip to content

Linear Algebra Through Football

Vectors and matrices, and the maths behind player similarity, runs and passes, formations, ratings and PCA.

10 parts Beginner to Advanced

Start at part 1

A midfielder's match in five numbers. Vectors

A player's performance can be written as a list of numbers in a fixed order. That list is a vector, and it's the first step to comparing players, finding replacements and feeding football into machine learning.

Beginner Part 1

Where did he run? Describing player movement with vectors

A run from one spot on the pitch to another is a vector, how far forward and how far across. From that pair of numbers you get the length of the run, its direction, its speed and whether it was heading for goal.

Beginner Part 5

Forward or sideways? Passing as a vector

Every pass has a start and an end, so every pass is a vector. That turns "he never passes forward" from an opinion into a number, and shows why a player's average pass can hide half of what he does.

Beginner Part 6

4-3-3 without the ball, 3-2-5 with it. Formations as transformations

A formation is a set of player positions, and the change from the defensive shape to the attacking one is a transformation. Measure it and you can see how far the team moves, how much it stretches, and which player's job is different.

Intermediate Part 7

Eight stats, one story. PCA and dimensionality reduction

Football stats overlap. Principal component analysis finds the few directions that carry most of the information. On 26 seasons of Scottish Premiership data, one component built from eight stats explains 56% of the variation and tracks points per game better than any single stat.

Advanced Part 9

Who links the play? Passing networks as matrices

Write down who passes to whom and you have a matrix. Its rows and columns count passes made and received, and multiplying it by itself shows how the ball travels in two passes, who links defence to attack, and who plays the one-twos.

Intermediate Part 10