Both Macbeth and Hamlet are tragedies written by William Shakespeare. Both plays feature a protagonist who is driven to madness and murder by his ambition. Both plays also explore the themes of guilt, retribution, and the consequences of one's actions.