Skip to content
TechniquesAdvanced

X-Wing

Learn what an X-Wing is in Sudoku, how its base and cover sets work, and where the resulting candidate eliminations are valid.

An X-Wing is the size-2 basic Fish in Sudoku.

It follows one candidate digit across two rows and two columns.

For a row-based X-Wing, choose two rows in which every possible position for one digit is contained in the same two columns. The two rows each need one copy of the digit, and the two columns must receive those two placements.

Therefore the digit can be removed from the same columns everywhere outside the two source rows.

Rows and columns can swap roles.

The memorable rectangle is useful for recognition, but the proof is not:

four corners look like an X.

The proof is:

2 base sets require 2 placements, and all source candidates are covered by 2 cover sets.

That base/cover idea is the foundation of Swordfish, Jellyfish, and larger Fish.

Quick rule

For a row-based X-Wing:

  1. Choose one candidate digit X.
  2. Find two rows where every candidate X is contained in the same two columns.
  3. The rows are the base sets.
  4. The columns are the cover sets.
  5. Remove X from those cover columns outside the two base rows.

For a column-based X-Wing, swap rows and columns.

Sudoku visualRead an X-Wing as base sets and cover setsRows 2 and 7 are the base sets. Columns 4 and 8 are the cover sets. Candidate 5 can be removed from those cover columns outside the two base rows.
  • Base rows
  • Cover columns
  • Source candidates
  • Eliminations

Base sets, cover sets, and the Fish digit

Fish terminology becomes much easier if you separate three ideas.

Fish digit

X-Wing studies one candidate digit at a time.

If you are looking at candidate 5, every source and elimination in the Fish concerns 5.

Base sets

These are the two units that each require one placement of the Fish digit.

In a row-based X-Wing, the base sets are rows.

In a column-based X-Wing, the base sets are columns.

Cover sets

These are the two opposite units that contain every source position from the bases.

For a row-based X-Wing, the covers are columns.

For a column-based X-Wing, the covers are rows.

Once those terms are clear, X-Wing stops being a picture to memorize and becomes a compact counting proof.

A simple row-based X-Wing

Suppose candidate 5 appears in row 2 only at:

  • r2c4
  • r2c8

and in row 7 only at:

  • r7c4
  • r7c8

Row 2 must place one 5.

Row 7 must place one 5.

All four source positions lie in columns 4 and 8.

So the two required 5s must occupy:

  • one position in column 4;
  • one position in column 8.

Candidate 5 can therefore be removed from every other cell in columns 4 and 8.

We do not need to know which diagonal is true.

The final placements could be:

  • r2c4 = 5 and r7c8 = 5;
  • or r2c8 = 5 and r7c4 = 5.

Both possibilities consume the same two cover columns.

The outside eliminations are therefore certain.

Why X-Wing works

The proof is a two-by-two capacity argument.

The two base rows each require one copy of the Fish digit.

That creates two required placements.

Every source position for those placements lies inside only two cover columns.

A column can contain the digit only once.

So the two placements must use the two cover columns.

No third copy of that candidate can survive elsewhere in either cover column.

This is why the elimination targets are not arbitrary.

They must be:

  • the same Fish digit;
  • in the cover sets;
  • outside the base sets.

Step-by-step board example

Column-based X-Wing

Transpose the entire pattern.

Suppose columns 3 and 9 can place candidate 7 only in rows 2 and 6.

Then:

  • columns 3 and 9 are the base sets;
  • rows 2 and 6 are the cover sets.

The two base columns require two 7s.

Those two placements must occupy rows 2 and 6.

So candidate 7 can be removed from those rows outside columns 3 and 9.

A good solver should become comfortable reading both orientations.

Do not let X-Wing become a row-only visual pattern.

Does an X-Wing always look like a perfect rectangle?

For a standard basic X-Wing, the four source positions often form the familiar corners of a rectangle.

But the rectangle is a consequence of the two-base/two-cover structure, not the proof itself.

The important checks are:

  • one Fish digit;
  • two base rows or columns;
  • every source candidate in the bases covered by exactly two opposite units;
  • both cover sets genuinely involved.

Boxes do not define a basic X-Wing.

Rows and columns do.

Sudoku visualA valid X-Wing versus a rectangle-shaped false positiveFour corners are not enough. Each base row must restrict the candidate to the same two cover columns.
Valid2 × 2
Not an X-Wing+1
  • Source candidates
  • Extra candidate breaks the Fish

X-Wing vs a random candidate rectangle

Four equal candidate marks can appear at rectangle corners without proving an X-Wing.

Suppose candidate 5 appears at:

  • r2c4
  • r2c8
  • r7c4
  • r7c8

but row 2 also contains candidate 5 at r2c1.

Then row 2 is not restricted to cover columns 4 and 8.

The basic row-based X-Wing proof fails.

The visual rectangle alone is not enough.

Always verify the complete source candidate state in the base sets.

What if a base row has an extra candidate?

Then you do not have that basic X-Wing.

Do not simply ignore the extra source candidate.

Some advanced Fish patterns can use additional candidates as fins, but that is different logic and belongs to the later Finned Fish family.

For basic X-Wing, the proposed cover sets must contain every source candidate for the Fish digit in the selected base rows.

This distinction prevents one of the most common false eliminations.

X-Wing vs Locked Candidates

Both techniques are digit-first and use candidate confinement.

Locked Candidates

The restriction occurs at an intersection between:

  • a box;
  • and a row or column.

X-Wing

The restriction connects:

  • two rows and two columns;
  • or two columns and two rows.

Locked Candidates is a local box-line relationship.

X-Wing is a grid-spanning row-column Fish.

This makes X-Wing a natural next step after digit-first intersection scanning becomes comfortable.

X-Wing vs Swordfish

The basic Fish rule scales by size.

X-Wing

2 base sets → 2 cover sets.

Swordfish

3 base sets → 3 cover sets.

Jellyfish

4 base sets → 4 cover sets.

X-Wing is usually easiest to recognize because size 2 often produces two identical candidate-position pairs.

Swordfish and larger Fish are frequently much less geometrically tidy.

That is why learning base/cover language at X-Wing is more valuable than memorizing the letter X.

How to find X-Wings efficiently

Search one digit at a time.

1. Choose a sparse candidate digit

Candidate filters are useful because Fish depend on one digit's position map across the grid.

2. Scan rows with exactly two source positions

Write or remember their column pairs.

For example:

r2 → c4/c8
r5 → c1/c6
r7 → c4/c8

3. Look for a repeated cover pair

Rows 2 and 7 both use c4/c8.

That is the structural cue.

4. Verify the full base rows

Confirm there is no additional candidate X elsewhere in either selected base row.

5. Inspect the cover columns

Look for candidate X outside the two base rows.

Those are the potential eliminations.

6. Repeat with columns

If the row scan produces nothing, switch orientation.

The same workflow becomes:

c3 → r2/r6
c9 → r2/r6

Productive vs nonproductive X-Wings

An X-Wing can be structurally valid even if it removes nothing.

Suppose the two cover columns contain no additional candidate X outside the base rows.

The two-by-two relationship still exists.

It simply produces no new information at that moment.

For human solving, prioritize productive X-Wings:

valid Fish + at least one outside cover candidate to eliminate.

What an X-Wing often unlocks

Fish are usually elimination techniques rather than direct placements.

A common sequence is:

X-Wing
↓
remove candidate 5
↓
Hidden Single appears
↓
place 5
↓
peer candidates update
↓
Locked Candidates or another Single appears

After every X-Wing elimination, stop the advanced search and re-scan the affected:

  • cover rows or columns;
  • intersecting boxes;
  • newly changed candidate sets.

One advanced elimination often unlocks simple logic.

Common mistakes

Searching several digits at once

A basic Fish follows one candidate digit.

Treating any rectangle as an X-Wing

The base sets must be fully restricted to the proposed covers.

Ignoring an extra candidate in a base row or column

That breaks the basic X-Wing proof.

Eliminating from the wrong direction

For a row-based X-Wing:

  • rows = bases;
  • columns = covers;
  • eliminations occur in the cover columns outside the base rows.

For a column-based X-Wing, transpose that rule.

Removing the source candidates

The Fish source candidates stay.

Only outside cover candidates are eliminated.

Expecting the pattern to choose one diagonal

The deduction works precisely because both possible source arrangements imply the same outside eliminations.

Searching Fish before simpler logic

Check Singles, Locked Candidates, and subsets first. They are easier to verify and may change the candidate map.

Recognition drill

Filter one digit and translate sparse rows into position pairs:

r2 → c4/c8
r5 → c1/c6
r7 → c4/c8

Then ask:

  1. Which two rows use the same two columns?
  2. Are those the complete candidate positions in both rows?
  3. Does either cover column contain the same candidate elsewhere?

If all three checks pass, you have a productive row-based X-Wing.

FAQ

Is X-Wing a Wing technique?

No. Despite the name, X-Wing is a Fish.

Does an X-Wing always use exactly four source candidates?

A standard nondegenerate X-Wing is normally recognized as two base units with two candidate positions each, giving four source positions. If a base has only one legal position, solve the simpler Hidden Single first.

Must the four source cells be in four different boxes?

No. Basic Fish logic is defined by rows and columns. Box placement can affect how easy the pattern is to see or create overlapping simpler deductions, but “four different boxes” is not the defining condition.

Can an X-Wing run from columns instead of rows?

Yes. Rows and columns are completely symmetric.

What if one source row has a third candidate outside the two cover columns?

Then the basic X-Wing is invalid. Do not eliminate anything using the basic rule.

Does X-Wing require guessing which diagonal is correct?

No. Both possible final arrangements produce the same cover-set eliminations.

What to learn next

Move to Swordfish to see the same basic Fish proof scaled from two base/cover sets to three.