How does Shakespeare use mistaken identities in Twelfth Night?
One way in which Shakespeare makes use of mistaken identities is to show that people are not always what they appear to be. Viola illustrates this point by discussing the illusion of appearances in the very first scene in which we meet her. In Act 1, Scene 2, Viola reflects on the fact that the character of the sea captain who rescued her is just as "fair," or good and noble, as his looks are fair, as apparently he is a rather handsome man. We see her compare his fairness in character to his fairness in looks in her lines:
There is a fair behavior in thee, captain;
And though that nature with a beauteous wall
Doth oft close in pollution, yet of thee
I will believe thou hast a mind that suits
With this thy fair and outward character. (I.ii.50-54)
These lines are also important because they express her understanding that looks can be deceiving, and that someone can be something completely different on the inside than they appear to be on the outside, which is a dominant theme in the play.
We especially see the illusion of appearances portrayed when Sebastian is mistaken for his sister who is pretending to be a manservant named Cesario. It's very apparent that both Sebastian and Viola have very different character traits. For one thing, when Viola as Cesario converses with Feste in Act 3, Scene 1, she is very congenial with him. They exchange witty retorts, and she remarks about how good Feste is at his job as a fool. However, when Sebastian encounters Feste in Act 4, Scene 1, whom Feste mistakes for Cesario, Sebastian doesn't give Feste the same congenial treatment. Instead, he becomes annoyed by Feste, even calling him a "foolish fellow" to which Feste retorts that Sebastian "will prove a cockney," meaning "clueless person" (eNotes, IV.i.2, 12). Sebastian even proves to have a temper. While Viola says she hates violence and prefers peace, Sebastian readily strikes Sir Andrew. Sebastian even severely hurts both Sir Andrew and Sir Toby a second time in the final act. If we can believe Sirs Andrew and Toby, the second time Sebastian struck them was apparently unprovoked, showing us that, unlike his sister, he has a much more aggressive temper, and even though he and Viola look alike, inside they are very different. Yet, Olivia feels she is in love with Sebastian merely because he looks like Cesario, who is really his sister Viola. Olivia will probably eventually be disappointed to learn that their characters are really very different. Hence, Shakespeare gives both Viola and Sebastian opposing character traits, plus mistakes their identities, to show just how deceptive looks can be.