Opposition (chess)

In chess, opposition (or direct opposition) is the position in which two kings face each other on a or , with only one square between them. Since kings cannot move immediately adjacent to each other (see Rules of chess), neither king can advance, creating a mutual blockade. In this situation, the player not having to move is said to "have the opposition" . It is a special type of zugzwang and most often occurs in endgames with only kings and pawns . The side with the move may have to move their king away, potentially allowing the opposing king access to important squares. Taking the opposition is a means to an end (normally forcing the opponent's king to move to a weaker position) and is not always the best thing to do.
There are extensions of direct opposition, such as diagonal opposition and distant opposition, which can be conducive to reaching direct opposition. All three types may be referred to simply as "opposition" if the type is unambiguous in context. 
Direct opposition.
"Direct opposition" is a position in which the kings are on the same rank or file and they are separated by one square. When the term "opposition" is used, it normally refers to direct opposition.
In this diagram, the player whose turn it is "not" to move has the opposition. If it is Black's turn to move, White has the opposition and wins . (See King and pawn versus king endgame.) If it were White's turn to move, Black would have the opposition and the position would be a draw.
In order to ensure correct play in situations like in the diagram, it may be helpful to remember that each time the pawn steps forward, it must be without giving check. If the pawn checks the opponent's king, the opposition will be lost and the game drawn.
Example.
In the game Svetozar Gligorić–Bobby Fischer, 1959, Black can draw by keeping the white king from getting to any of the key squares (marked by dots). This is accomplished by not allowing White to get the opposition, and seizing the opposition if the white king advances. 
This is the only move to draw. (In the actual game the players agreed to a draw at this point.) Other moves allow White to get the opposition and then get to a key square. If the white king gets to a key square, White wins. For example 1...Kb7? 2.Kb5, then the black king moves and the white king gets to a key square and then wins by forcing promotion of the pawn.
and Black draws. In this sequence, any other moves by Black lose , .
Diagonal opposition.
Opposition along a is called "diagonal opposition". Sometimes diagonal opposition is used to achieve direct opposition. An example is the position in the first diagram, with Black to move. White has the direct opposition in this position, but it does him no good because his king cannot attack the black pawn after the black king moves away. White needs to achieve direct opposition closer to the pawn.
and White has the diagonal opposition (second diagram).
White now has direct opposition on a useful square, and White wins:
7.Kxf6 also wins for White .
Distant opposition.
"Distant opposition" is a position in which the kings are on the same rank or file but are separated by more than one square. If there are an odd number of squares between the kings, the player not having the move has the (distant) opposition. As with diagonal opposition, it is often converted to direct opposition, as in the diagram :
White takes the distant opposition.
Taking the direct opposition; and now Black must step aside.
If 3...Kf6 then White plays the corresponding 4.Kf4!
4.Kf5 would lead to both pawns queening.
4...Ke6 5.Kc5 and White is way ahead in the queening race.
and White has a choice of which pawn he wins, using the created passed pawn as an outside passed pawn unless he can promote it directly.
Black can be tricky and try:
The point is if 2.Ke3 then 2...Ke7 and now Black has the distant opposition and draws. Similarly, if 2.Kf3 then 2...Kf7. White must remember that the aim of the opposition is to penetrate, so to step sideways and forward with ...
Otherwise White will be able to penetrate with Kc5, and will win the race to queen.
White again has the distant opposition, transposing into the main line.
Teaching tool.
This position is very similar to the previous position. White is to checkmate, moving the rook only once in the process. The main line is:
Taking the distant opposition.
Since the black king has been forced to step aside to the h-file, White can now penetrate on the f-file.
If 4...Kh5 then 5.Rh1. 
If 6...Kh8 then 7.Kf7 Kh7 8.Rh1#.
Again, Black can be tricky and try:
Again, White penetrates. If 2.Kg3 then 2...Kg7 3.Kh3 Kh7 gives Black the distant opposition.
If 2...Kh7 then 3.Kf4!
Purpose.
Yuri Averbakh pointed out that the opposition is a means to an end; the end is "penetration to a " . This can be a square in front of a pawn, so the king can lead it to the queening square, or into a critical zone to win an enemy blocked pawn.
In the diagram, White should play 
Taking the opposition by 1.Ke4 merely draws.
This second position shows a simpler example. If White takes the opposition with 1.Ke6 he makes no progress. The winning move is