The subjunctive is used in sentences with a main clause containing a verb of emotion like hope, joy, surprise, fear or pity followed by a subordinate clause. When there is no change in subject between clauses, an infinitive is used in the subordinate clause, but when the subject changes, the subjunctive form of the verb is used instead.