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:
- A pivot with candidates X and Y.
- One wing that sees the pivot, with candidates X and Z.
- Another wing that sees the pivot, with candidates Y and Z.
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
| 7 | 1 | 5 | 26 | 4 | 9 | 26 | 3 | 8 |
| 4 | 2 | 68 | 3 | 68 | 5 | 7 | 1 | 9 |
| 3 | 89 | 689 | 1 | 268 | 7 | 26 | 5 | 4 |
| 2 | 5 | 479 | 48 | 79 | 6 | 1 | 78 | 3 |
| 6 | 3 | 47 | 5 | 1 | 48 | 9 | 78 | 2 |
| 8 | 79 | 1 | 27 | 279 | 3 | 4 | 6 | 5 |
| 5 | 46 | 2 | 46 | 3 | 1 | 8 | 9 | 7 |
| 1 | 478 | 78 | 9 | 5 | 48 | 3 | 2 | 6 |
| 9 | 68 | 3 | 678 | 67 | 2 | 5 | 4 | 1 |
Highlighted: 7 the pattern · struck through: 7 removed
- The pivot, row 5, column 3, has {4, 7}. So X = 4, Y = 7.
- One wing, row 5, column 6, shares row 5 with the pivot and has {4, 8}.
- The other wing, row 8, column 3, shares column 3 with the pivot and has {7, 8}.
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
- List the two-candidate squares. XY-wings only use squares with exactly two candidates, so these are your raw material.
- 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).
- Check the third digit matches. The two wings' other candidates must be the same digit, Z. If they differ, there's no wing.
- 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.
| 8 | 4 | 7 | 9 | 1 | 56 | 2 | 56 | 3 |
39 | 2 | 6 | 4 | 8 | 35 | 1 | 59 | 7 |
35 | 1 | 359 | 7 | 36 | 2 | 8 | 4 | 69 |
| 4 | 36 | 38 | 2 | 9 | 18 | 5 | 7 | 16 |
256 | 56 | 89 | 18 | 7 | 4 | 3 | 26 | 19 |
29 | 7 | 1 | 36 | 5 | 36 | 4 | 29 | 8 |
356 | 3568 | 4 | 3568 | 36 | 9 | 7 | 1 | 2 |
| 7 | 68 | 2 | 168 | 4 | 18 | 9 | 3 | 5 |
| 1 | 9 | 35 | 35 | 2 | 7 | 6 | 8 | 4 |
Highlighted: 7 the pattern · struck through: 7 removed
- The pivot, row 7, column 1, has {3, 5, 6}.
- One wing, row 9, column 3, shares box 7 with the pivot and has {3, 5}.
- The other wing, row 7, column 5, shares row 7 with the pivot and has {3, 6}.
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
- Wings that don't see the pivot. Each wing must share a row, column or box with the pivot. Two squares that just happen to have the right digits don't count.
- A wing with three candidates. In an XY-wing all three squares must have exactly two candidates. If a wing has a third, the chain breaks.
- Removing Z from a square that sees only one wing. The elimination works only where both wings (and, for an XYZ-wing, the pivot too) are seen.
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.