Guides

XY-Wing and XYZ-Wing

The XY-wing is built from three squares that each have only two candidates. It looks like a coincidence until you follow the logic, and then it becomes one of the most dependable tools for expert puzzles. The XYZ-wing is a close cousin.

You need full notes for both; see our pencil marks guide. Both examples come from real puzzles with exactly one solution, at a point where every simpler technique (singles, locked candidates, pairs and the X-wing family) had already been used. Rows are numbered from the top, columns from the left, boxes reading like a book. Two squares "see" each other if they share a row, a column or a box.

The XY-wing pattern

You need three squares with two candidates each:

Now follow the pivot. If the pivot is X, the first wing can't be X (they see each other), so it must be Z. If the pivot is Y, the second wing can't be Y, so it must be Z. The pivot is one or the other, so one of the two wings is Z. We don't know which, but any square that sees both wings can't be Z.

A real XY-wing

715
26
49
26
38
42
68
3
68
5719
3
89
689
1
268
7
26
54
25
479
48
79
61
78
3
63
47
51
48
9
78
2
8
79
1
27
279
3465
5
46
2
46
31897
1
478
78
95
48
326
9
68
3
678
67
2541
An XY-wing: pivot row 5, column 3, wings row 5, column 6 and row 8, column 3

Highlighted: 7 the pattern · struck through: 7 removed

If the pivot is 4, the first wing is 8. If the pivot is 7, the second wing is 8. Either way one wing is 8. Row 8, column 6 shares column 6 with one wing and row 8 with the other, so it sees both wings and can't be 8. That removes 8 from row 8, column 6.

After that, a naked single appears: row 8, column 6 is 4. Here the XY-wing left a square with one candidate straight away.

You can confirm it the long way too. Suppose row 8, column 6 were 8. Both wings see it, so neither wing could be 8: row 5, column 6 would have to be 4 and row 8, column 3 would have to be 7. But both wings see the pivot, so the pivot could be neither 4 nor 7, and it has no other candidates. A square with no possible digit means the assumption was wrong.

How to find XY-wings

  1. List the two-candidate squares. XY-wings only use squares with exactly two candidates, so these are your raw material.
  2. Try each as a pivot. For a pivot with X and Y, look among the two-candidate squares it sees for one containing X (but not Y) and one containing Y (but not X).
  3. Check the third digit matches. The two wings' other candidates must be the same digit, Z. If they differ, there's no wing.
  4. Find the squares that see both wings and check whether any of them have Z as a candidate.

Where can the eliminations be? Only squares that see both wings. If the wings are in the same row and box, there can be several. If one wing is along a row from the pivot and the other along a column, there's usually just the one square at the far corner of the rectangle.

The XYZ-wing

An XYZ-wing is the same idea with a pivot that has three candidates, X, Y and Z. The wings have X and Z, and Y and Z, and both see the pivot. Now the pivot itself might be Z, so there are three possibilities, and in every one, one of the three squares is Z. That means only squares that see the pivot and both wings lose Z. That is a tighter condition, so XYZ-wings usually remove less.

84791
56
2
56
3
39
2648
35
1
59
7
35
1
359
7
36
284
69
4
36
38
29
18
57
16
256
56
89
18
743
26
19
29
71
36
5
36
4
29
8
356
3568
4
3568
36
9712
7
68
2
168
4
18
935
19
35
35
27684
An XYZ-wing: pivot row 7, column 1 with three candidates

Highlighted: 7 the pattern · struck through: 7 removed

The shared digit is 3. If the pivot is 3, that's our 3. If the pivot is 5, the first wing must be 3. If it's 6, the second wing must be 3. So one of the three is 3. Row 7, column 2 sees all three, so it can't be 3. After removing it, a hidden single appears: row 4, column 2 is 3.

Mistakes to avoid

Practise

XY-wings are worth learning early for expert puzzles. In the 1,076 puzzles our solver worked through for these guides, an XY-wing was needed in 97, compared with 30 for the X-wing, even though our solver always tried the X-wing first. If you haven't yet, learn pairs and the X-wing too. The techniques page has every method in one place.