MatEscac

Learning centre

Learn to play chess and discover the mathematics hidden in the board.

Learn to play chess

Pick a piece to see how it moves in 3D and read its rules.

3D…

Knight

Jumps in an L shape: two squares in one direction and one perpendicular. It is the only piece that jumps.

Move vectors

  • (-2, -1)
  • (-2, 1)
  • (-1, -2)
  • (-1, 2)
  • (1, -2)
  • (1, 2)
  • (2, -1)
  • (2, 1)

Tactical concepts step by step

1. Check

The king is attacked. The player must resolve it: move the king, capture the attacker or block with a piece.

2. Checkmate

Check with no possible defence. The game ends and the player giving mate wins.

3. Castling

The king moves two squares towards a rook and the rook jumps to the other side. Neither may have moved, no pieces in between, and the king may not pass through an attacked square.

4. En passant

If a pawn advances two squares and lands beside an enemy pawn, that pawn may capture it as if it had moved only one. Only on the very next move.

Chess and mathematics

The board is an 8 × 8 Cartesian plane. Every square has coordinates and every move is a vector.

From algebraic notation to coordinates

The file (a–h) is the x coordinate (0–7) and the rank (1–8) is the y coordinate (0–7). So e4 = (4, 3).

Displacement vectors

A move from A to B is the vector (xB − xA, yB − yA). The knight always makes vectors of the form (±1, ±2) or (±2, ±1).

Distances and invariants

The Chebyshev distance max(|dx|, |dy|) is the number of moves a king needs. The material sum is an invariant that only changes with captures.

87654(4,3)321abcdefgh

Try it: type a square

= (4, 3)

Compute a vector

Result
(-1, 2)
L∞ / L1 / L2
2 / 3 / 2.24
Pieces that can do it
Knight