The dramatic irony that Duncan is happy to visit Macbeth and does not know that Macbeth is planning to kill him heightens the audience’s anger at the injustice of killing the king.
Dramatic irony is when the audience knows something the character does not. In this case, the audience knows that Macbeth is planning to kill Duncan. Duncan has no idea. He thinks he is going to visit the house of his friend, cousin, and loyal subject. Duncan’s line when he sees it is so ironic it is comical.
This castle hath a pleasant seat; the air
Nimbly and sweetly recommends itself
Unto our gentle senses. (1:6, p. 21)
Duncan’s use of the words “pleasant,” “sweetly” and “gentle” are disturbing in this context because the audience already knows he is doomed. Therefore a fairly ordinary and even boring scene becomes macabre, fitting in with the tone of the rest of the play.