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 of Linear Algebra Through Football
Contents
The football question
The team sheet says 4-3-3. Watch the match and, when your team has the ball, it looks more like 3-2-5: a back three, two in midfield, five across the front. Lose the ball and it snaps back. How do you measure a change of shape?
Formations aren't fixed. They shift with possession, pressure, the score and the manager's instructions. Linear algebra gives a precise way to describe the shift.
The concept
A formation is a set of player positions. On the same 105 m × 68 m grid as the movement and passing parts of this series, each player is a point (x, y), with x running up the pitch and y across it. Stack the ten outfield players' points and the whole shape is a 10 × 2 matrix: one row per player, one column for x and one for y.
A change of shape moves every point:
$$(x,\ y) \;\longmapsto\; (x',\ y')$$
In plain football
- (x, y) is where a player stands in one shape, say without the ball.
- (x′, y′) is where he stands in the other, with the ball.
- The arrow is the transformation: the rule that takes the first shape to the second.
Two shapes of one team
Here's a made-up team, attacking left to right. The hollow circles are its 4-3-3 without the ball; the filled ones are its 3-2-5 with it. The gold arrow is the left-back.
Three simple measurements describe each shape:
| Without ball | With ball | |
|---|---|---|
| Centre of the team | (40.2, 34.0) | (60.4, 34.0) |
| Length, back to front | 35 m | 44 m |
| Width, side to side | 52 m | 60 m |
In plain football
- The centre is the average of the ten players' positions. With the ball, the team pushes 20.2 m up the pitch.
- Length is from the deepest player to the most advanced: the team stretches from 35 m to 44 m.
- Width is from touchline side to touchline side: the team spreads from 52 m to 60 m, to pull the opposition apart.
Who moves furthest?
Each player's movement is a vector, new position minus old, exactly as in the movement part. The three biggest moves, and the smallest:
| Player | Move (m) | Distance |
|---|---|---|
| Left central mid | (30, 2) | 30.1 m |
| Right central mid | (30, −2) | 30.1 m |
| Left-back | (22, 20) | 29.7 m |
| Right-back | (10, −6) | 11.7 m |
The two central midfielders push furthest, 30 m up into the front five. The right-back moves least of all: he tucks in to become the right side of the back three. But the most interesting move is the left-back's. It's almost as long as the midfielders', and it goes in a completely different direction: 20 m infield.
The team-wide transformation
Most of that movement is the whole team doing the same thing: push up and spread out. We can write that as one transformation for everyone:
- Measure from the team's centre. Take each player's position relative to the centre of the shape.
- Stretch. Multiply the lengthwise part by 44 ÷ 35 ≈ 1.26 and the widthwise part by 60 ÷ 52 ≈ 1.15, the same stretch as the team's length and width.
- Move the centre. Put the result around the new centre, (60.4, 34.0).
As matrix multiplication, the stretch in step 2 is:
$$\begin{aligned} &\begin{pmatrix} x' - 60.4 \\ y' - 34.0 \end{pmatrix} \\ &\quad = \begin{pmatrix} 1.26 & 0 \\ 0 & 1.15 \end{pmatrix} \begin{pmatrix} x - 40.2 \\ y - 34.0 \end{pmatrix} \end{aligned}$$
In plain football
- The right-hand column is where a player stood in the old shape, measured from the old centre of the team.
- The 2 × 2 matrix is the stretch: 1.26 times as long, 1.15 times as wide. The zeros mean going longer doesn't change width, and going wider doesn't change length.
- The left-hand column is where the rule says he should end up, measured from the new centre.
Apply that rule to every player and compare with where each one actually goes:
| Player | Rule says | Actually |
|---|---|---|
| Left winger | (79.0, 6.3) | (78, 4) |
| Striker | (85.3, 34.0) | (82, 34) |
| Left-back | (47.6, 4.0) | (52, 28) |
For the front three, the rule is within about 3 m. Push up and spread out is exactly their job. The rule is within about 13 m for everyone except one player. For the left-back it's 24 m out. The rule sends him up the touchline, because that's what a stretched 4-3-3 does with a left-back. Instead he goes inside to join the holding midfielder.
That's the useful part. The transformation describes the team's collective movement, and what's left over shows who has an individual job. An inverted full-back is a tactical instruction, and the numbers pick it out without being told.
Show the mathsTransformations, translations and the leftovers. Optional.
A linear transformation of the plane is multiplication by a 2 × 2 matrix. Some that describe team shape:
$$\text{stretch: } \begin{pmatrix} a & 0 \\ 0 & b \end{pmatrix}$$
$$\text{rotate by } \theta\text{: } \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}$$
A stretch with \(a > 1\) lengthens the team; \(b < 1\) makes it narrower and more compact. A rotation turns the whole shape, as when a back line pivots across to cover the ball on one side.
Moving the centre is a translation: adding a vector \(\mathbf{t}\), not multiplying by a matrix. Linear transformation plus translation is called an affine transformation:
$$\mathbf{x}' = M(\mathbf{x} - \mathbf{c}) + \mathbf{c}'$$
where \(\mathbf{c}\) and \(\mathbf{c}'\) are the centres of the two shapes. Here \(M\) is diagonal with \(a = 44/35\) and \(b = 60/52\).
The residual for each player is the gap between where he goes and where the rule sends him, \(\lVert \mathbf{x}'_{\text{actual}} - \mathbf{x}'_{\text{rule}} \rVert\). With these ten players the average residual is 9.4 m, against an average move of 22.1 m: the rule accounts for most of the movement, not all of it.
Flipping the pitch at half-time, so a team always attacks left to right, is also an affine transformation: \((x, y) \mapsto (105 - x,\ 68 - y)\), a half-turn about the centre spot.
We chose \(a\) and \(b\) from the length and width. A more careful method fits the matrix that makes the residuals as small as possible overall (least squares, or Procrustes analysis for shapes).
Why it matters
Once shapes are matrices of positions, questions about them get numerical answers:
- With and without the ball: how much longer, wider and higher is the team in possession, on average?
- Who changes role: which players move furthest, and whose movement the team-wide rule can't explain?
- Compactness: how narrow does the team get without the ball, and does it stay that way late in games?
- Opponents: does the next opponent's full-back invert too? Compare his residual with our left-back's.
With tracking data you can do this for every second of a match: average the positions in each phase of play, then compare the shapes.
Limitations
- Made-up shapes. Real average positions come from tracking or event data, and a whole match's average hides the moments that matter.
- One matrix is a summary. Real shapes also bend, with one side pushed up and the other held back. A single stretch can't show that; residuals, or a separate rule for each unit, can.
- Max minus min is fragile. One player pushed very high changes the length. The spread of positions (their standard deviation) is steadier for real data.
- Players swap positions. If the left winger and left-back switch, the maths needs to know who is who in each shape.
- The opposition shapes you. A team pinned back by a strong opponent isn't choosing its compact shape. Compare like with like.
Try it yourself
Without the ball, a back four stands at (30, 8), (25, 26), (25, 42) and (30, 60). Without changing anything else, squeeze the team 20% narrower: multiply each player's distance from the middle of the pitch (y = 34) by 0.8. Where does each defender end up, and how wide is the back four now?
Further reading
- Linear transformations and matrices, 3Blue1Brown. A matrix as a rule that moves every point of the plane.
- Affine transformation, Wikipedia. Linear transformations plus translations, with the matrix forms.
- Procrustes analysis, Wikipedia. How to line up two shapes as closely as possible, and measure what's left over.