In Act 4 of Merchant of Venice, what is the purpose of Portia's dressing up as a boy and her "mercy" speech?
Dressing up as a man: In Act 3, after Portia learns of Antonio's situation and Bassanio leaves for Venice to try to help Antonio, Portia tells her servant Nerissa that she is going to dress up as a man and use men's foolishness against them. Her decision to disguise herself is practical and symbolic. Realistically, if Portia wants to be of any help in the Venetian court, she cannot appear as a woman, especially not as a lawyer (referred to as a "doctor of letters" in the play) because women were not allowed to practice law. Symbolically, Portia dresses up as a man because she wants to prove that women are wiser than men and demonstrate how simple it is for women to manipulate men. Portia's disguise is successful in achieving both her goals.
Quality of mercy speech: Portia's speech to Shylock is ironic, and it is difficult to know if Portia's only reason for giving the speech is to trap Shylock in his own choices or if she delivers the speech in part to offer Shylock one last opportunity to "save" himself. Either way, Portia uses her description of mercy's qualities to warn Shylock that even though he might be focused on getting justice that at some point in his life, he--like all humans-- will pray for mercy. She reasons that
". . . we all do pray for mercy, / And that same prayer doth teach us all to render / The deeds of mercy" (4.1.206-208).
According to Portia, if Shylock does not show mercy to others, he will not receive it himself. And, of course, Portia is right. At the end of the courtroom scene, Shylock begs for mercy for himself--mercy that he was unwilling to show toward Antonio.