
Olivia is Twelfth Night's second great comic irony — the mourning countess who cannot keep her vow, whose genuine love for a disguised woman is resolved by a convenient twin — and her directness and dignity in pursuing what she wants gives the play's romantic comedy its most honestly felt thread.
Olivia is in mourning when the play begins — she has lost both her father and her brother within a year, and has vowed to keep that grief for seven years, veiling herself from the world and refusing all suitors including the Duke. This self-imposed seclusion is the first of the play's jokes at her expense, because within one scene of meeting Cesario she has abandoned it entirely, fallen in love with a stranger, and begun sending rings after him. The comedic machinery is obvious, but Olivia's feeling, once it arrives, is treated as entirely real.
Her pursuit of Cesario across the middle acts of the play is conducted with a directness that is both funny — she is the most powerful figure in Illyria openly chasing a page-boy — and genuinely admirable. She says what she feels without pretension, which is more than most of the other characters manage. Her declaration of love in Act III, Scene 1, delivered in full knowledge of how reckless it is, has a clear-eyed honesty that makes Cesario's inability to return it actually painful rather than merely comic.
The resolution of her plot — she has married Sebastian believing him to be Cesario, and this is presented as entirely satisfactory once the twins are revealed — asks the audience to accept that Sebastian, being identical to Cesario, is close enough to what she fell for. The play handles this more gracefully than it might, because it has been careful to show that what Olivia actually fell for was Viola's qualities — wit, directness, emotional honesty — which Sebastian, as her twin, presumably shares.
Olivia is motivated by a love for Cesario that catches her entirely by surprise and overturns the controlled grief she had planned for herself — a feeling she pursues with characteristic directness once she admits it.
Olivia's mourning at the play's opening already has a faintly theatrical quality — seven years is a long time — and her instant, total capitulation to love once it arrives suggests a woman whose real nature has been suppressed rather than transformed by grief. She pursues Cesario with the same forthright decisiveness she applies to everything else, making her pursuit of a disguised woman one of the play's most genuinely sympathetic threads.