In Shakespeare's Hamlet, Fortinbras' role is especially important for several reasons. Even though Hamlet and Fortinbras have a much in common, in fact, Fortinbras is Hamlet's foil.
In literature, a foil is a character who has contrasting qualities to another character, usually but not always a major character, so that the other character's qualities are showcased.
a foil is a secondary character who contrasts with the major character to enhance the importance of the major character (literarydevices.net)
This contrasting of qualities, or character traits, between Fortinbras and Hamlet gives the reader or audience additional insight into Hamlet's character, as well as insight into Hamlet's inability to take action, an inability that is seen as his tragic flaw.
Similarities that establish the foundation for the foil are found in both Hamlet and Fortinbras having lost their fathers. Both now have an uncle ruling on the throne. Each son is faced with the desire to avenge his father's death. Hamlet (secretly) knows that his uncle murdered Old Hamlet. He promises his father's ghost that he will avenge his father's death. However, it takes the entire play for Hamlet to eventually take action, and by then Claudius is so threatened by Hamlet that almost everyone dies. Fortinbras also wants to avenge his father's death which occurred in a battle against Denmark and Old Hamlet.
Fortinbras takes action immediately. He decides to attack Inverness to take back land that used to belong to Norway. However, Fortinbras' uncle calls him back and explains that his father lost the land and his life in a fair fight with Old Hamlet. Thus there is no need to avenge the old king's death.
Immediately, Fortinbras goes about other state business, this time, risking all for a worthless piece of land that Poland has taken. Fortinbras has direction and honor. Fortinbras has little honor at stake in fighting for this small piece of land in the hands of the Polish, but he dedicates all he has to fulfill the task. Hamlet compares the land to an "egg shell." Hamlet sees Fortinbras' dedication and is mortified at his own inaction.
Witness this army, of such mass and charge,
Led by a delicate and tender prince,
Whose spirit with divine ambition puff'd,
Makes mouths at the invisible event,
Exposing what is mortal and unsure
To all that fortune, death, and danger dare,
Even for an eggshell. (IV.iv.49-55)
Hamlet becomes aware of his "almost blunted purpose." He looks at himself and sees numerous reasons to take actions and kill Claudius. The greatest of these reasons is his father's murder, but he also resents that Claudius has pulled his mother into an abominable marriage, which causes Hamlet so much pain. He wonders why he still hesitates when he has so much more reason than Fortinbras, which should demand Hamlet's immediate response.
How stand I then,
That have a father kill'd, a mother stain'd,
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... (58-64)
While Fortinbras is triumphant and feels his father is avenged, by the end of the play, everyone in the royal court of Denmark is dead. Fortinbras arrives in Act V, scene ii, and Horatio (as charged by Hamlet) shares the circumstances of the slaughter and death that lies before Norway's prince. It is at Hamlet's request that the throne and lands of Denmark go to Fortinbras. Fortinbras is a very important character in the play: His foil role both illuminates Hamlet's flaw and questions the nature of religious scruples since Hamlet's Protestantism deterred him from traditional revenge murder.