The characters Gertrude and Ophelia are foils for each other: the way that Hamlet conceives of and refers to them draws certain parallels between their situations. Significantly, they are also the two primary female characters. Hamlet’s treatment of Ophelia is impacted by his perception of her as a lover; he sees her as the pinnacle of purity, and at some points in the play it seems as though Hamlet is interested in her for that reason. Hamlet’s treatment of his mother, on the other hand, is impacted by his disapproval of her actions. Her marriage to his villainous uncle enrages Hamlet, and he frequently refers to her as impure for remarrying so quickly after her husband’s death.
Although the play sets Ophelia and Gertrude up to juxtapose each other in Hamlet's view, Hamlet eventually comes to associate Ophelia with the same kind of supposed impurity that he associates with his mother. This is evident in Act 3, Scene 1, when he turns on Ophelia and harshly suggests that her beauty and purity aren't what he once believed them to be:
Ay, truly, for the power of beauty will sooner transform honesty from what it is to a bawd than the force of honesty can translate beauty into his likeness. This was sometime a paradox, but now the time gives it proof. I did love you once.
In this speech, Hamlet seems to imply that Ophelia’s beauty is the cause of her ruin. His perception of her as an impure woman, however, is shaped as much by his relationship with his mother as it is by his relationship with Ophelia. This is true throughout the play: Hamlet grows disgusted by women in general because of his mother’s actions, and Ophelia bears the brunt of his bad treatment. The two women also meet parallel fates: their deaths seem unavoidable and ultimately take a backstage to the drama that plays out between Hamlet and his uncle.
The character of Fortinbras serves as a foil for Hamlet. Because he is the young leader of a conquering army and a constant source of anxiety, he looms large in the play despite being onstage for a very limited period. The most significant similarity between the two men is that Fortinbras also wishes to avenge the death of his father. He acts with more emphasis than Hamlet does and therefore accentuates Hamlet’s paranoia and constant vacillation. Hamlet addresses his insecurities and bemoans Fortinbras’s presence. He is convinced that Fortinbras is making him look tentative:
Witness this army of such mass and charge,
Led by a delicate and tender prince,
Whose spirit with divine ambition puffed
Makes mouths at the invisible event,
Exposing what is mortal and unsure
To all that fortune, death, and danger dare,
Even for an eggshell. […]
How stand I, then,
That have a father killed, a mother stained,
Excitements of my reason and my blood,
And let all sleep, while to my shame I see
The imminent death of twenty thousand men
That for a fantasy and trick of fame
Go to their graves like beds, fight for a plot
Because Fortinbras and Hamlet are both power-holding princes, variously prepared for the helm of their respective nations, the way that they each respond highlights Hamlet’s lack of decisiveness. As Fortinbras attempts to invade Denmark, Hamlet can’t help but feel ineffectual and whiny. It is almost as though Hamlet can sense that he is being compared to the other, more accomplished prince. This doesn’t make it easier for him to decide whether he is prepared to seek revenge for his father’s death—in fact it continues to cloud his sense of reality.