How does the behavior of Macbeth change over the course of the play?
In Act 1, Scene 2, the Sergeant and Duncan discuss Macbeth's brave deeds on the battlefield. All indications up to this point show that Macbeth is loyal in fighting for his king, Duncan. In the next scene, Macbeth receives confirmation that he is the new Thane of Cawdor. He begins to stray from his loyalty to Duncan because he has initial thoughts of ambition and murder. This is still just a fleeting thought at this point, but he does consider it. This scene (Act 1, Scene 3) also marks the beginning of his anxiety.
My thought, whose murder is yet but fantastical,
Shakes so my single state of man, (I.iii.150-51)
In Act 1, Scene 4, Macbeth expresses his loyalty to Duncan, but he continues to have thoughts on becoming king. In the final scene of Act 1, Lady Macbeth tries to act as a motivator in convincing Macbeth to murder Duncan.
In Act 2, Macbeth talks himself into killing Duncan. Lady Macbeth and Macbeth are startled by a knocking at the door. This is just the beginning of their anxiety and guilty.
By Act 3, Macbeth's guilt, his greed for power, and his fear of losing that power have increased even more. He hires murderers to kill Banquo and Fleance to prevent them from taking his crown. In Scene 4, Banquo has been killed but Macbeth sees Banquo's ghost at the dinner table. Macbeth's guilt and fear have reached the point of hallucinations. He is delusional but still intent on doing whatever it takes to remain the king.
In Act 4, Macbeth has Macduff's family killed. His mental state worsens but he reaffirms his resolve to terminate any opposition. By the middle of Act 5, Macbeth is desperate but he will not give up his fight to remain king. As his situation worsens, his desire to remain in power increases. Consequently, as the reality of being overthrown increases, Macbeth grows even more bold and reckless. This leads to his downfall.