In his effort to expose Claudius as a manipulator and murderer, Hamlet reclaims the honour of both his mother and father. He is often harsh and sometimes even vulgar to Gertrude, but his intention is to shock her into an awareness of what has really happened.
In a way, without Hamlet both parents are defenseless. His father can only implore Hamlet to vindicate his death since he is unable to do so; his mother has been influenced by Claudius to the point that she considers her present marriage to him as "normal" and is only a shadow of her former self.
As their only child, Hamlet has the filial duty to avenge his parents of wrongdoing and dishonour, even if for each of them it is too late to alter their personal fate.
Another, more controversial, reading of the hero's character is that he suffers from an Oedipus Complex. This psychological disorder reflects the unconscious desire of a son to kill his father and replace him as the object of the mother's love. Viewed in this light, Hamlet delays killing Claudius because he subconsciously identifies with his uncle's crime and shares his guilt. According to some critics, Hamlet's Oedipal impulse also explains why he speaks to Gertrude like a jealous lover, why he dwells on his mother's sexual relations with Claudius, and why he treats his uncle as a rival throughout the play.
- from enotes, Hamlet, Character Analysis- Hamlet