Gender is a biggie in Twelfth Night, and the play brilliantly demonstrates how gender, a socially constructed identity, can be "performed" and impersonated with the use of voice, costume, and mannerisms. The theme is largely explored in relation to Shakespeare's profession as an actor and writer for a transvestite stage (in Elizabethan times, all-male acting companies performed the roles of women). The relationship between gender and performance is particularly complex in Twelfth Night because the part of Viola is played by a boy actor, who is cross-dressed as a female character, who disguises herself as a young man. Of course, the text also meditates on the relationship between gender and desire as it explores the erotics of androgyny.
Twelfth Night's representation of cross-dressing suggests that gender is a fluid social category rather than a fixed identity.
When Sir Andrew Aguecheek challenges "Cesario" to a duel, the comedic situation that ensues suggests that bravery has nothing to do with being anatomically male, which challenges traditional ideas about men and masculinity.