Malvolio appears in yellow stockings. The duel farce between Cesario and Sir Andrew. Antonio is arrested after being mistaken for Sebastian.
Olivia has sent for Cesario again and is waiting, anxious and distracted by her feelings. She asks Maria to bring Malvolio, hoping his formal nature will settle her thoughts.
Malvolio enters transformed: cross-gartered yellow stockings, a fixed smile, and a stream of cryptic quotations from the letter. He winks at Olivia, smiles wider when she seems alarmed, and ignores every signal that something is wrong. She concludes he has lost his mind and puts him into Sir Toby's care. Malvolio takes this as a further instruction from the letter: be proud and dismissive to Sir Toby, which he is. Sir Toby, Maria, and Fabian plan to lock him in a dark room, the standard treatment for madness at the time.
Cesario arrives again. Olivia gives her a piece of jewellery and presses her love. Cesario presses Orsino's case. They are interrupted.
Sir Toby and Fabian warn Cesario that Sir Andrew has issued a deadly challenge: a fearsome swordsman, barely able to be restrained. Cesario refuses to fight. Toby insists there is no escape. Simultaneously, Toby tells Sir Andrew that Cesario is a terrifying fighter who leaped at the chance for a duel. Both Andrew and Viola draw swords with obvious reluctance.
At this moment Antonio enters. He sees Cesario, mistakes her for Sebastian, and steps in to fight in his place. Officers arrive and arrest Antonio for his past crimes against Orsino's ships. As they take him away, Antonio appeals to Cesario for the purse he gave Sebastian for safekeeping. Viola does not know who this man is and does not have his purse. She offers half of what she has; Antonio believes Sebastian has denied knowing him. He names Cesario as Sebastian as the officers lead him out.
Viola hears the name Sebastian and takes hope: Antonio called the young man Sebastian, which means her brother may still be alive somewhere in Illyria.
This scene is the play's most technically complex: it runs the Malvolio plot and the duel plot simultaneously and connects them to the arrival of Sebastian's thread through Antonio's arrest. Three comic storylines converge in the same garden.
Malvolio in the yellow stockings is simultaneously the scene's greatest comedy and the moment the prank begins to turn uncomfortable. He is visually absurd: the stockings, the fixed smile, the winking at a woman who is clearly alarmed. But Olivia's response, genuine concern that he has gone mad, begins to reveal how far this has already gone beyond what any ordinary social joke should reach. She has him put in Sir Toby's care. The care he will receive is a locked room.
The duel scene operates through a comedy of symmetric cowardice. Both Andrew and Viola are told the other is a terrifying fighter. Both are terrified. Both draw swords with the reluctance of people who have no intention of using them. Shakespeare makes the audience aware that Viola, dressed as a man, is in genuine physical danger: she has no training, no real weapon skill, and no means of defending herself. The comedy is genuine but it contains a real threat.
Antonio's arrest is the scene's emotional turning point. He has followed Sebastian to Illyria out of love, given away his money for safekeeping, and now he believes the person he risked everything for has looked him in the face and denied knowing him. His speech as the officers take him, calling Cesario an "ingrateful" boy, is directed at the wrong person entirely: it lands on the audience as one of the play's more quietly painful moments. He is completely, understandably wrong. His wrongness, visible to the audience, is what makes it hurt.
Viola's response to hearing the name Sebastian, the sudden careful processing, the hope that her brother may still be alive, is the scene's closing emotional note. It is brief but it matters: the first movement toward the resolution that Act 5 will bring.