Before Olivia falls in love with Viola as "Cesario," the play sets her up as a kind of foil to Viola. Let us explain. When we hear about Olivia, we learn that she's mourning the death of her brother. So, when Viola appears on the coast of Illyria and worries that her brother has drowned in a recent ship wreck, we can't help but compare the two figures. Whereas Olivia decides to swear off men and don a black veil for seven whole years, Viola deals with her grief in a more proactive way. It may not make sense to us when Viola decides to dress like a boy and get a job at Duke Orsino's court, but at least she does something. Viola's determination to forge ahead despite her sadness seems to highlight Olivia's initial silliness and self-indulgence. Olivia's whole "foil to Viola" gig doesn't last long, though, because Olivia falls head over heels in love with "Cesario," who literally and metaphorically gets Olivia to ditch the veil and reenter the land of the living.