Gender is society's dictation of how an individual should act, in accordance with their sex. Shakespeare challenges the assumptions made about gender in his own society. He presents gender as a changeable trait, not necessarily corresponding to the sex of the character. Furthermore, he presents gender in a way contradictory to the conventions of his time, through the use of disguise. In Elizabethan times, women were not allowed to act on stage, and society considered them to be the weaker sex, who needed to be looked after, or 'owned' by men. This degradation of women is challenged by Shakespeare, who directs the plot so that the two female protagonists, Viola and Olivia, do not have men to rely on, and are forced to look after themselves. He exploits this situation to explore the reserves of the female character, and their possession of what are normally considered to be masculine traits. In contrast, Shakespeare presents Sebastian and Sir Andrew with typically feminine traits, showing the inter-changeable nature of gender. Shakespeare shows how gender can be distorted by the outside elements of language, and appearance. These are most frequently exploited by the character of Viola, during her cross-dressing as a eunuch, and subsequent inability to tell Orsino of her love for him. He reflects the complexities of human nature and identity by showing contradictions in the genders of many characters, especially that of Feste. Shakespeare presents gender in both an obvious and comic, yet also subtle and poignant way to the audience.
Shakespeare explores the blurring of gender boundaries more easily by employing the device of twins. By having a brother and sister of exactly the same upbringing, it is much easier to suggest similarity of identity, rather than accepting gender difference. This is shown by the contrasting reactions to the news that the other twin has drowned. Sebastian is portrayed as sensitive, and Viola as practical, which is contrary to the gender stereotypes of the time.