Rook sacrifice opens the g-file

The rook clears the g-file by sacrificing itself on g7. Once the king is drawn forward, the queen occupies g5 and every flight square is covered.

Lesson

White to move. Main line: 1. Rxg7+ Kxg7 2. Qg5#

Rxg7+ removes the pawn that blocks the g-file and places the rook where the king must capture it. Black cannot move to f8 or h8 because those squares contain its own rooks, and the pawns on f7 and h7 close the lower diagonal flights.

After ...Kxg7, Qg5# checks up the newly opened g-file. The queen covers g6 and g8 directly, controls f6 and h6 diagonally, and the black rooks and pawns still occupy f8, h8, f7 and h7.

The sacrifice works because it changes two features at once: it removes the g7-pawn and attracts the king onto the same file. Before sacrificing near a king, name both the line being opened and the square where the king will be forced to stand.