Claudius and Polonius have different motives for spying on Hamlet when the Prince has his meeting with Ophelia. Claudius is not convinced that Hamlet is mad, but he is diligently exploring every possible explanation of his stepson’s strange behavior because he is afraid it threatens him. He tells Polonius:
There's something in his soul,
O'er which his melancholy sits on brood,
And I do doubt the hatch and the disclose
Will be some danger . . .
Polonius is rather simple-minded. It doesn’t occur to him that Hamlet could only be acting mad because, unlike Claudius, he has no suspicions or guilty knowledge. He can’t see why Hamlet would be acting mad unless he were truly mad, whereas Claudius can understand that Hamlet could be acting mad as part of a plan to stage a coup or an assassination. Polonius, of course, would like nothing better than to have his daughter marry Hamlet. This is the opportunity of a lifetime for Polonius, Ophelia, and Laertes. Hamlet would become king eventually and his daughter queen. The whole family would achieve royal status. Polonius could exercise great power through his influence over his loving and obedient daughter. If Hamlet were a little bit mad, that would only give Polonius more power.
In their spying on Hamlet with Ophelia, both Claudius and Polonius reveal their characters and motives. Both of them are keenly interested in the relationship between the young people for different reasons. Claudius would be vastly relieved if he learned that Hamlet was really mad because of his love for Ophelia. No doubt he would encourage them to get married and he would feel vastly relieved of his fears and suspicions. Unfortunately for both Claudius and Polonius, Hamlet does not play the part of the passionate lover because he apparently suspects that he is being spied upon. Claudius will have to go on wondering and worrying throughout the remainder of the play.
The scene in which Claudius and Polonius spy on Hamlet and Ophelia is probably intended to be staged in an artificial way. Hamlet would be standing with his back turned to Claudius and Polonius and facing Ophelia, who would be standing at extreme stage right. Claudius and Polonius would be standing in plain sight at some small distance behind Hamlet. The two spies would be leaning sharply forward at close to a 45-degree angle, each man with a hand cupped around one ear to show they were listening intently. They would look slightly ridiculous just from their postures. They are listening for the signs of young love, but they have forgotten what young love is like. They wouldn't recognize it if they heard it. Hamlet would not see them but would know they are there because Ophelia could see them very clearly over Hamlet's shoulder, and her guilty knowledge would show on her innocent face. She is like a mirror in which he can see behind him. The scene would be funnier if it were played in an old-fashioned manner with stylized, exaggerated movements than if the director attempted to make it seem more natural and actually set up something to give Claudius and Polonius concealment. Moviemakers frequently spoil Shakespeare by seeking to improve on him.
In the middle of 2.2, after the ambassadors have departed, Polonius goes off on his loquacious ramblings about Hamlet being mad. Polonius has a theory that Hamlet has gone mad over the loss of Ophelia's love. Both Gertrude and Claudius are sceptical. Claudius says, "How may we try it further?" Polonius responds, "If circumstances lead me I will find where truth is hid, though it were hid indeed within the center."
Now, go back quickly to 2.1 where Polonius is talking to Reynaldo about spying on Laertes. He explains to Reynaldo the aim of his tactic: "Your bait of falsehood takes this carp of truth." Polonius now extends this idea to catch the truth behind Hamlet's madness using Ophelia as the bait of falsehood. Really, he is looking for confirmation of his own belief; but he must convince Claudius and Gertrude. So in 2.2 he continues as he explains how Hamlet walks the halls at times. He will then "loose" his daughter to Hamlet. The King in hiding can then judge for himself.
In 3.1 Polonius baits his hook with poor Ophelia. "Ophelia walk you here...Read on this book, that show of such an exercise may color your loneliness." Polonius figures that if Hamlet is mad for Ophelia's love then dangling her in front of Hamlet should generate a reaction. The falsehood of this bait is making it appear that Ophelia hasn't been planted. The appearance of loneliness serves to draw Hamlet out.