X-Wing
An X-Wing is a single-digit pattern that lets you rule a candidate out of two whole lines at once. It is the first of the "fish" — techniques named for the way a digit is trapped between a small set of rows and columns. Learn it well, because it is the gateway to the advanced solving that lies beyond scanning and pairs.
The idea
Pick a single digit and follow it around the grid. Most of the time it scatters, but now and then it lines up. An X-Wing is that lucky alignment. You need two base lines — two rows, or two columns — in which your chosen digit can go in exactly two places each. The catch is that those two places must fall on the same pair of cross-lines in both base lines.
When that happens, the four cells form a rectangle. The digit is forced to sit on opposite corners of it, and that is enough to clear the digit from the two cross-lines everywhere outside the rectangle. One pattern, up to a dozen eliminations. Nothing gets placed directly, but the puzzle loosens considerably.
How to spot it
Fish are found one digit at a time, so commit to a candidate and study only that. Look for a base line — say a column — where the digit has just two candidate cells. Note which rows they sit in. Then hunt for a second column where the same digit again has exactly two candidates, landing in those same two rows. That is the whole shape.
The preconditions are strict and worth repeating. Each base line must hold exactly two candidate cells for the digit — no more. And the two cells in one base line must share their cross-lines with the two cells in the other. Miss either condition and the argument collapses, so check both before you erase anything. It helps to scan by twos: rows or columns where a digit appears only twice are the raw material for every fish.
Walk through the example
The grid above shows a column-based X-Wing on the digit 3. Look at column 6: the only cells that can still hold a 3 are r2c6 and r5c6 — rows 2 and 5. Now look at column 9: again the 3 is confined to two cells, r2c9 and r5c9 — the very same rows. Those four cells, outlined in blue, are your rectangle.
Here is the reasoning. In column 6 the 3 must go in either r2c6 or r5c6; one of them is a 3. The same is true in column 9. Suppose the 3 in column 6 sits at r2c6. Then row 2 already has its 3, so column 9's 3 cannot be at r2c9 — it must drop to r5c9. The other case mirrors it: a 3 at r5c6 forces the column-9 three up to r2c9. Either way the two threes take opposite corners, and between them they occupy both row 2 and row 5.
That is the payoff. Whichever diagonal wins, rows 2 and 5 each get their 3 from inside the rectangle. So no other cell in those rows can be a 3. The candidates shaded red and struck through — r2c2, r2c4, r5c4 and any others along the two rows outside columns 6 and 9 — can all be erased.
Why it's watertight
The strength of an X-Wing is that you never have to know which diagonal is the real one. You only need to know there are two candidates per base line and that they share cross-lines. From those two facts the digit is pinned to opposite corners, and both cross-lines are covered no matter what.
Think of it as a locked either/or. The base lines each demand one 3; the shared cross-lines mean the two demands cannot be met on the same side without clashing. So they split — one high, one low — and in splitting they saturate both cross-lines. Any 3 sitting elsewhere on those lines would be a second 3, which the rules forbid. The elimination is not a guess or a probability. It is a certainty that holds in both possible worlds at once, which is exactly why fish are so reliable.
Common false alarms
Two near-misses trip people up. The first is a base line where the digit sits in three cells rather than two. That is not an X-Wing base — the rectangle argument needs exactly two candidates per line, so a third cell breaks the either/or. Three-cell lines belong to the Swordfish, not here, and treating them as an X-Wing will cost you a real digit.
The second is a pair of base lines that each hold the digit twice but on different cross-lines — a lopsided quadrilateral rather than a true rectangle. Without a shared pair of cross-lines there is nothing to saturate, and no elimination follows. Before you erase a single candidate, put your finger on all four cells and confirm they square up: two rows, two columns, four corners. A tidy-looking shape that fails one condition is worse than no pattern at all, because it tempts you into an elimination the logic does not support.
In practice
You will meet the X-Wing in genuinely hard puzzles, at the point where singles and pairs have dried up and the grid seems stuck. Reach for it when a digit has thinned out to two-candidate lines. It works both ways round: with rows as your base you eliminate down the two columns, and with columns as your base you eliminate along the two rows, as in the example above. The logic is identical — only the orientation flips.
Once the two-line version feels natural, its three-line big brother the Swordfish follows the same tune. There you take three base lines, each holding the digit in two or three cells, all confined to the same three cross-lines, and the digit clears off those three cross-lines outside the pattern. Master the X-Wing first. Every fish after it is the same either/or argument, stretched over one more line.
Practise this technique
These puzzles from the archive all use x-wing on the way to the answer. Play one, then reach for the Hint button when you want the solver to name the next move.
Want a full walkthrough of a whole grid? Paste one into the step-by-step solver, or browse all techniques.