Cosmic irony when attached to this play is a term that refers to the way that the gods or the higher powers seem at best indifferent and at worst profoundly antagonistic to what goes on in the world of humans. This is shown so many ways through the almost absurdist presentation of Lear wandering around aimlessly on the heath in the middle of a storm to the most poignant example of all, which comes in Act V scene 3 when the messenger fails to reach Edmund's Captain before he carries out his orders and hangs Cordelia. That Cordelia is hanged even after the eventual victory of the forces sympathetic to Lear is a prime example of cosmic irony, as the bleak and tragic death of Cordelia, the one truly faultless character in the entire play, paints a very bleak picture of life in this chaotic universe where justice seems to be a matter of random chance rather than a fitting reward for good behaviour. This cosmic irony is picked up upon by Kent in Act IV scene 1 when he comments on the way that he has been treated for his loyalty to Lear:
As flies to wanton boys are we to the gods;
They kill us for their sport.
The comparison of the gods to boys who kill flies for sport is apt, as he has just had his eyes taken out. Yet this quote is so important precisely because it could be seen as a motto for this play, in which Shakespeare presents the audience with a world where good is not rewarded with justice and evil is only defeated as a matter of seeming chance at the end. Humans are indeed presented as the playthings of the gods, and any notion of justice is at best fragile.