Sudoku Solving Techniques

X-Wing

The pattern of the X-Wing technique can appear in rows or in columns.

X-Wing in Rows

In a Sudoku puzzle, if a digit is a candidate in only two cells in each of two certain rows and the positions of these two cells are exactly in the same two columns, then this digit will occupy one of the cells in those two columns in such two rows. Therefore, this digit cannot be a candidate for other cells in those two columns. The following is an example to demonstrate this pattern.

Example
C1
C2
C3
C4
C5
C6
C7
C8
C9
R1
R2
R3
R4
R5
R6
R7
R8
R9

3

6

9

7

3

6

9

5
8
1

3

9

4
2

2

4

8
5

2

4

3
9
7
1
6

2

3

4

1

2

3

4

9

6

2

4

7
5
8

3

9

2

1

3

3

4

8

9

1

5

9

5

8

9

3

4

7

9

6

3

4

7

9

8
6
7
3

2

9

4
5

2

9

1
9
5

1

3

4

1

2

7
6

2

3

4

2

4

8

4

6

7

9

2

9

4

6

7

9

1

2

5

4

5

3

7

8

3

5

3

5

7

8

1
5
8
9
7
3
6
4
2

2

4

7

3

2

4

8
6

2

4

5

1

7

9

1

5

Figure 1a: X-Wing in Rows

In the two rows R4 and R8 of the puzzle above, the cells that contain the candidate digit 4 are highlighted in green. There are exactly two such cells in each of the two rows R4 and R8. Also, those two green cells in each of these two rows fall in the same two columns C3 and C9. All four green cells in the two rows form an X-Wing pattern in rows.

C1
C2
C3
C4
C5
C6
C7
C8
C9
R1
R2
R3
R4
R5
R6
R7
R8
R9

3

6

9

7

3

6

9

5
8
1

3

9

4
2

2

4

8
5

2

4

3
9
7
1
6

2

3

4

1

2

3

4

9

6

2

4

7
5
8

3

9

2

1

3

3

4

8

9

1

5

9

5

8

9

3

4

7

9

6

3

4

7

9

8
6
7
3

2

9

4
5

2

9

1
9
5

1

3

4

1

2

7
6

2

3

4

2

4

8

4

6

7

9

2

9

4

6

7

9

1

2

5

4

5

3

7

8

3

5

3

5

7

8

1
5
8
9
7
3
6
4
2

2

4

7

3

2

4

8
6

2

4

5

1

7

9

1

5

Figure 1b: The Orange Cells Cannot be 4

There are two possibilities for the digit 4 in these two rows. The digit 4 will occupy either

  1. the two cells (R4,C3) in row R4 and (R8,C9) in row R8, or
  2. the two cells (R8,C3) in row R8 and (R4,C9) in row R4.

In either case, one of the two green cells in each of the two columns C3 and C9 must be 4. Therefore, other cells in columns C3 and C9 cannot be 4. If the digit 4 appears in other cells as candidates in columns C3 and C9 (those candidate digit 4's in the orange cells), they can be removed, as shown in Figure 1b.

X-Wing in Columns

The roles of rows and columns are exchangeable for this technique. The following is an example for X-Wing in columns.

Example
C1
C2
C3
C4
C5
C6
C7
C8
C9
R1
R2
R3
R4
R5
R6
R7
R8
R9

1

2

8

1

2

8

4

7

8

9

6

7

1

5

8

1

5

6

8

3
6
3
7

4

8

1
5

2

4

8

2

8

9

1

9

5

8

9

4

6

3
2

1

4

6

4

6

8

7

1

5

7

8

1

5

7

8

1

5

7

6
3

1

2

2

4

8

9

2

4

8

2

9

9
4

1

6

7

5

8

1

2

2

8

5

6

3
3
2

6

8

4

5

9

4

8

4

8

9

5

6

7
1
3

1

4

6

7

1

6

7

1

2

9

1

2

6

8

2

4

5

9

2

4

5

6

2

5

6

9

5
9
8
3

2

6

4
1
7

2

6

2

1

4

6

4

6

7

1

6

9

5
8

4

6

9

3
Figure 2a: X-Wing in Columns

In the two columns C5 and C8 of the puzzle above, the cells that contain the candidate digit 8 are highlighted in green. There are exactly two such cells in each of the two columns C5 and C8. Also, those two green cells in each of these two columns fall in the same two rows R3 and R5. All four green cells in the two columns form an X-Wing pattern in columns.

C1
C2
C3
C4
C5
C6
C7
C8
C9
R1
R2
R3
R4
R5
R6
R7
R8
R9

1

2

8

1

2

8

4

7

8

9

6

7

1

5

8

1

5

6

8

3
6
3
7

4

8

1
5

2

4

8

2

8

9

1

9

5

8

9

4

6

3
2

1

4

6

4

6

8

7

1

5

7

8

1

5

7

8

1

5

7

6
3

1

2

2

4

8

9

2

4

8

2

9

9
4

1

6

7

5

8

1

2

2

8

5

6

3
3
2

6

8

4

5

9

4

8

4

8

9

5

6

7
1
3

1

4

6

7

1

6

7

1

2

9

1

2

6

8

2

4

5

9

2

4

5

6

2

5

6

9

5
9
8
3

2

6

4
1
7

2

6

2

1

4

6

4

6

7

1

6

9

5
8

4

6

9

3
Figure 2b: The Orange Cells Cannot be 8

There are two possibilities for the digit 8 in these two columns C5 and C8. The digit 8 will occupy either

  1. the two cells (R3,C5) in row R3 and (R5,C8) in row R5, or
  2. the two cells (R5,C5) in row R5 and (R3,C8) in row R3.

In either case, one of the two green cells in each of the two rows R3 and R5 must be 8. Therefore, other cells in rows R3 and R5 cannot be 8. If the digit 8 appears in other cells as candidates in rows R3 and R5 (those candidate digit 8's in the orange cells), they can be removed, as shown in Figure 2b.

List of Sudoku Solving Techniques

Previous: XYZ-Wing

Next: Swordfish

©2025 sudoku9x9.com - All Right Reserved.