Barbara Leigh-Hunt as Lady Catherine de Bourgh
On and off for years I've tried to define irony for myself. Coming closest was the idea of discrepancy. One thing aimed for, another thing attained. But you must add to that the idea of similarity or mirroring to turn it from bad luck into irony.
An example from Pride and Prejudice: Toward the end of the novel, the aristocrat (and hero Darcy's aunt) Lady Catherine de Bourgh arrives at Elizabeth's humble abode to wield her power and glory over the Bennet family. Lady Catherine is filthy rich, owner of a grand estate, old, and imperious. She has caught wind that her nephew Darcy is interested in the relatively low-born Elizabeth and has arrived to demand that Elizabeth deny it and renounce any hope of Darcy in the future.
At this Lady Catherine fails. Elizabeth admits that she has no engagement with Darcy but refuses to promise never to enter into an engagement with him. Lady Catherine leaves the Bennets in high dudgeon.
If the novel had ended there, there would be no irony, just a failed try. There is discrepancy because Lady Catherine wanted one outcome and got another. But there is no mirroring. She doesn't achieve the opposite of what she wanted; she merely failed to reach what she did want.
But the next day or so, Darcy shows up on Elizabeth's doorstep and proposes. The kicker: Darcy had given up hope of Elizabeth's affections until he hears that his aunt confronted her and she refused to renounce him. One whiff of this opening and Darcy high-tailed it to Longbourn to pop the question.
THIS is irony. Lady Catherine's visit did not simply fail to effect her goal; it actually caused the opposite outcome that she had sought to avoid. Discrepancy plus mirroring.