Pawn Sacrifice Justification A few weeks ago, Magnus Carlsen (White) played against Anish Giri (Black), and this position was reached on the board on move 17 after black had played exf4:


Here is the full game:

[White "Magnus Carlsen"]
[Black "Anish Giri"]
[FEN ""]

1. c4 e5 2. Nc3 Nf6 3. Nf3 Nc6 4. g3 d5 5. cxd5 Nxd5 6. Bg2 Bc5 7. O-O O-O 8. d3 h6 9. Nxd5 Qxd5 10. a3 a5 11. Bd2 Qe612. Rc1 Qe7 13. Bc3 Nd4 14. e3 Nxf3+ 15. Qxf3 Bd6 16. Qh5 c617. f4 exf4 18. gxf4 Qxe3+ 19. Kh1 Rd8 20. Rce1 Qc5 21. f5 Bf822. Be4 Rd5 23. Rf3 b5 24. Rg1 Ra7 25. Bf6 g6 26. Qh3 Rd6 27. Qh4 Rxf6 28. Qxf6 Be7 29. Qxc6 Qxc6 30. Bxc6 Kg7 31. fxg6 fxg6 32. d4 a4 33. d5 b4 34. Be8 Bg5 35. h4 Bxh4 36. Rxg6+ Kh7 37. Rc6 Bg4 38. Rf4 Rg7 1-0 


Now, with white to play, it would be natural would be to play exf4. However, gxf4 was played, hanging a pawn and letting black capture it with a check.

Can someone explain what is the logic behind such apparently wrong move?
As was stated in the answer to this post made by D M, one idea of capturing in this manner is to open up the g-file for white's rooks to attack black's king. In the game this proved to be a very potent idea, and in general it's a good idea to open up lines for one's rooks against the enemy king if one intends to attack it.

But there is another point to letting the e-pawn hang and that is to gain some tempi for the attack. When black's queen spends one tempo on capturing on e3 with check, white responds by playing Kh1 (a move that white wants to make in order to clear the g-file for the rooks), so while black used a tempo to make a move that does nothing to bolster their defenses, white made a move that is crucial for the coming attack (gaining 1 tempo, relatively speaking). Next white improves the position of the rook on c1 by going to e1. Once again, this is done with a gain of tempo, since black's queen is exposed on e3 and needs to spend one tempo moving away. This way white manages to get two "free" tempi to make his position more ready for going on the attack while black had to strut around with their queen, arguably doing nothing to bolster their defenses.

So the pawn sacrifice had a two-fold purpose here, I would say. First, by capturing with the g-pawn white opens up an important line of attack against black's king. Secondly, by investing the e-pawn white gains some free tempi to use in order to make their position more ready to go on the offensive against black's king.

In general, material count is only one of many factors in evaluating a position, and while it may be the most obvious it is not always the most important one. In this example, Carlsen judged that his superior piece coordination and black's kingside weaknesses were more important positional factors than the material count, and seeing how the game went it is difficult to argue that his judgement was off.