similarities and differences between oedipus rex and hamlet Sophocles' oedipus the king and shakespeare's hamlet both contain the basic elements of tragedy, but hamlet is a tragic hero, while oedipus is a tragic villain from the opening moments of hamlet, the audience knows that hamlet must avenge his father's death.