Skip to content
Board Vision & Chess GeometryGuide

Files, Ranks, Diagonals & Rays

Understand the straight-line geometry of the chessboard: files, ranks, diagonals, rays, segments, alignment, and how slider pieces use these structures.

Coordinates tell us where a square is.

Lines tell us how squares relate across the board.

The chessboard contains three fundamental straight-line families:

  • files;
  • ranks;
  • diagonals.

Rooks, bishops, and queens use these structures directly.

But line geometry matters even when no sliding chessman occupies the board. It gives us a way to see:

  • alignment;
  • direction;
  • distance along a line;
  • intersections;
  • blockers;
  • lines of sight;
  • future attack structures.

The purpose of this area is to make those relationships visually immediate.

Straight lines on the chessboard

In ordinary chess language, a square can be related to another square through:

  • the same file;
  • the same rank;
  • the same diagonal.

These are the board's principal straight-line structures.

Files

A file is a vertical column of eight squares.

Example:

The e-file contains:

  • e1;
  • e2;
  • e3;
  • e4;
  • e5;
  • e6;
  • e7;
  • e8.

Ranks

A rank is a horizontal row of eight squares.

Example:

The fourth rank contains:

  • a4;
  • b4;
  • c4;
  • d4;
  • e4;
  • f4;
  • g4;
  • h4.

Diagonals

FIDE defines a diagonal as a straight line of same-coloured squares running from one edge of the board to an adjacent edge.

Examples:

  • a1-b2-c3-d4-e5-f6-g7-h8;
  • c1-d2-e3-f4-g5-h6;
  • a6-b7-c8.

Line alignment between two squares

Two squares are aligned in straight-line geometry when they share:

  • a file;
  • a rank;
  • or a diagonal.

Examples:

Same file

  • e2 and e7.

Same rank

  • b4 and g4.

Same diagonal

  • c2 and f5.

Not aligned:

  • c3 and f5.

Those two squares share:

  • neither file;
  • nor rank;
  • nor diagonal.
Exercise

Aligned or not?

Classify:

  1. a1 / a8
  2. c4 / h4
  3. b2 / e5
  4. a7 / d4
  5. c3 / f5
  6. h1 / e4

Answers:

  1. file;
  2. rank;
  3. diagonal;
  4. diagonal;
  5. not aligned;
  6. diagonal.

A line vs a segment

For practical board vision, it is useful to distinguish:

Full board line

The complete rank/file/diagonal running from one board boundary to another.

Example:

  • the entire e-file.

Segment between two squares

Only the portion of that line between two selected squares.

Example:

  • segment e2-e7.

That segment includes:

  • e2;
  • e3;
  • e4;
  • e5;
  • e6;
  • e7.

If we care only about the squares between e2 and e7, we mean:

  • e3;
  • e4;
  • e5;
  • e6.
Key idea

Full line = whole board structure. Segment = selected portion between endpoints.

This distinction becomes useful when checking:

  • blockers;
  • distance;
  • line of sight;
  • interposition.

Direction along a line

A line itself has no preferred direction.

But from a chosen starting square, the line can be read in opposite directions.

From d4:

File directions

  • toward d5-d6-d7-d8;
  • toward d3-d2-d1.

Rank directions

  • toward e4-f4-g4-h4;
  • toward c4-b4-a4.

Diagonal directions

  • toward e5-f6-g7-h8;
  • toward c5-b6-a7;
  • toward e3-f2-g1;
  • toward c3-b2-a1.

That creates:

  • 2 file directions;
  • 2 rank directions;
  • 4 diagonal directions.

A queen on an empty board therefore has up to 8 directional rays from one square.

Eight directionsFrom d4, the queen decomposes into eight directional rays
Available / movementSecondary movement line
Four orthogonal directions and four diagonal directions provide a useful scanning model.

Diagonals

Diagonals deserve separate treatment because their geometry differs from ranks and files.

A rank/file is always length 8.

A diagonal can be:

  • short;
  • medium;
  • long.

Its length depends on where it lies.

Diagonal lengths vary

Examples:

Length 8

  • a1-h8;
  • h1-a8.

Length 7

  • a2-g8;
  • b1-h7;
  • h2-b8;
  • g1-a7.

Shorter diagonals

  • a7-b8 → length 2;
  • a8 alone can be treated as a one-square diagonal endpoint structure in geometric enumeration.

Same-color property

Every square on one diagonal has the same color.

Example:

a1-b2-c3-d4-e5-f6-g7-h8

All are dark squares.

The other long diagonal:

h1-g2-f3-e4-d5-c6-b7-a8

consists entirely of light squares.

Key idea

Diagonal movement preserves square color.

This is why:

  • a bishop remains permanently color-bound.

How to test whether two squares share a diagonal

A practical visual test:

Move from the first square toward the second.

If every step changes:

  • file by one;
  • rank by one;

in consistent directions, the squares share a diagonal.

Examples:

c2 → d3 → e4 → f5

Yes.

c2 → d4

No.

The file changes by 1 but rank changes by 2.

Coordinate-difference test

For advanced readers, map file letters to numbers:

  • a=1;
  • b=2;
  • ...
  • h=8.

Two squares share a diagonal when:

absolute file difference = absolute rank difference

Example:

c2 → f5

  • file difference: 3;
  • rank difference: 3.

Same diagonal.

Example:

c2 → f4

  • file difference: 3;
  • rank difference: 2.

Not same diagonal.

Advanced note

This test is useful in:

  • programmatic diagram QA;
  • coordinate drills;
  • engine/game tooling;

but practical players should ultimately recognize diagonals visually.

Diagonal direction families

A bishop standing on a square can usually project into up to four diagonal directions.

Using White-bottom coordinate language:

  • file increasing + rank increasing;
  • file decreasing + rank increasing;
  • file increasing + rank decreasing;
  • file decreasing + rank decreasing.

Example from d4:

  • e5-f6-g7-h8;
  • c5-b6-a7;
  • e3-f2-g1;
  • c3-b2-a1.
Diagonal tracingA bishop scans four diagonal directions from its square
Secondary movement line

Edge truncation

A diagonal stops when:

  • the board edge is reached.

That means the same directional idea can produce:

  • many squares from the center;
  • few from an edge/corner.

Example:

Bishop geometry from d4: multiple long branches.

From a1: only one diagonal direction remains:

  • b2-c3-d4-e5-f6-g7-h8.
Key idea

The direction family remains the same; the board boundary truncates the path.

Same diagonal exercises

Exercise set

For each pair, answer:

  • same diagonal?
  • if yes, list intermediate squares.

1. a1 / h8

Yes.

Intermediate: b2-c3-d4-e5-f6-g7.

2. c1 / h6

Yes.

Intermediate: d2-e3-f4-g5.

3. c1 / h5

No.

4. h1 / a8

Yes.

Intermediate: g2-f3-e4-d5-c6-b7.

5. b6 / e3

Yes.

Intermediate: c5-d4.

6. b6 / f3

No.

The two long diagonals

The chessboard contains two eight-square corner-to-corner diagonals.

a1-h8

Squares:

  • a1;
  • b2;
  • c3;
  • d4;
  • e5;
  • f6;
  • g7;
  • h8.

This is a dark-square diagonal.

h1-a8

Squares:

  • h1;
  • g2;
  • f3;
  • e4;
  • d5;
  • c6;
  • b7;
  • a8.

This is a light-square diagonal.

Maximal diagonalsa1–h8 and h1–a8 cross the full board
Available / movementSecondary movement line
These two long diagonals are useful permanent geometric landmarks.

Why these diagonals matter visually

They are useful orientation anchors because:

  • each spans the full board corner-to-corner;
  • they pass through central squares;
  • they make same-color diagonal structure obvious;
  • many common board relationships can be located relative to them.

At this stage, do not infer strategic value simply because a diagonal is long.

Strategic use of:

  • long diagonals;
  • bishop pressure;
  • fianchetto structures

belongs later.

Key idea

Long diagonal is a geometric description, not automatically a strategic advantage.

Rays

In this guide, a ray is a directional portion of a line extending outward from a chosen square until:

  • the board edge;
  • or, when discussing direct piece reach, the first blocker.

This is a useful explanatory term.

It is not required FIDE terminology.

Terminology

Line

A full rank/file/diagonal structure.

Ray

One direction outward from a chosen origin square along an allowed line family.

Segment

A finite portion between selected squares.

Use ray when describing:

  • direction-specific slider geometry;
  • blockers;
  • line-of-sight;
  • attack scans.

Rook rays

A rook on an empty board has four directional rays:

  • up file;
  • down file;
  • left along rank;
  • right along rank.

Example: rook d4.

Rays:

  • d5-d6-d7-d8;
  • d3-d2-d1;
  • e4-f4-g4-h4;
  • c4-b4-a4.
Orthogonal raysOne rank and one file can be scanned as four rook rays
Available / movement

Bishop rays

A bishop on an empty board has up to four diagonal rays.

Example: bishop d4:

  • e5-f6-g7-h8;
  • c5-b6-a7;
  • e3-f2-g1;
  • c3-b2-a1.

Because bishops are color-bound:

  • every ray remains on the bishop's current square color.

Queen rays

A queen combines:

  • 4 rook-style rays;
  • 4 bishop-style rays.

From an unrestricted interior square:

up to 8 directional rays.

Queen geometryThe queen combines all eight rays in one footprint
Available / movementSecondary movement line

Rays and blockers

At pure board-structure level, a line may continue geometrically beyond an occupied square.

But direct sliding access from the origin stops at the first blocker.

This distinction is important.

Suppose:

  • White rook d4;
  • White pawn d6.

The d-file itself still exists:

d1-d2-d3-d4-d5-d6-d7-d8.

But from the rook's origin:

  • ray upward has direct access to d5;
  • blocker at d6 stops the rook;
  • d7/d8 remain part of the same geometric file;
  • but are not directly reachable from the rook through the blocker.
Key idea

The line continues beyond a blocker. Direct reach does not.

This concept prevents sloppy wording such as:

"The file ends at the pawn."

No.

The file continues.

The rook's unobstructed ray ends.

Friendly and enemy first blockers

From a geometry scan:

Friendly first blocker

  • cannot be entered;
  • terminates direct sliding reach.

Enemy first blocker

  • can be the first capture/contact square;
  • terminates direct reach beyond it.

The board line beyond the blocker remains geometrically present.

Line vs accessThe geometric line continues beyond the first blocker, but direct access does not
FriendlyFriendly blocker on d6
EnemyEnemy blocker on d6
Available / movementBlocked / unavailableCapture / attack
Friendly and enemy blockers end the current ray differently: a friendly square cannot be entered; an enemy square can be captured, but nothing beyond it is directly reachable.

Ray scanning as a board-vision skill

For sliders, a useful static scan is:

  1. choose origin;
  2. choose one direction;
  3. move square by square;
  4. stop at board edge or first blocker;
  5. repeat next direction.

This is easier and less error-prone than trying to perceive the entire footprint as one vague shape.

Exercise

Trace every ray

Position:

  • queen e4;
  • several friendly/enemy blockers.

Task: For each of the eight directions:

  • list squares before first blocker;
  • identify blocker square;
  • identify squares geometrically beyond blocker.

Do not ask whether a tactical capture is good.

Learning goal: Build line/ray parsing.

Ray vs route

A ray is straight and directional.

A route can involve several moves and may change direction over time.

Example:

Bishop:

  • one move travels on one diagonal ray/segment.

Knight route:

  • may require several jumps.

King route:

  • may zigzag.

Route geometry builds on these line relationships later in the sequence.

Files, ranks, diagonals, and rays summary

The board contains three straight-line families:

  • files;
  • ranks;
  • diagonals.

Alignment

Two squares can share:

  • file;
  • rank;
  • diagonal.

Diagonal

  • same-colored squares;
  • variable length;
  • two maximum eight-square diagonals:
  • a1-h8;
  • h1-a8.

Line

Full board structure.

Segment

Selected finite part of a line.

Ray

One direction from an origin square.

Blocker

Stops direct sliding reach without erasing the geometric line beyond it.

Checklist

Line-geometry mastery check

  • [ ] I recognize file/rank/diagonal alignment.
  • [ ] I distinguish a full line from a segment.
  • [ ] I can test whether two squares share a diagonal.
  • [ ] I know the two eight-square long diagonals.
  • [ ] I can trace rook rays.
  • [ ] I can trace bishop rays.
  • [ ] I can trace queen rays.
  • [ ] I understand a blocker stops direct reach, not the existence of the board line.

The next section uses these lines together:

  • where they intersect;
  • which chessmen align;
  • when line of sight is clear;
  • how lines open and close;
  • how board geometry transforms under symmetry.