I know that atropine is a muscarinic antagonist, so why does atropine have excitatory actions on the brain while it is blocking muscarinic receptors?
Atropine inhibits an inhibitor and hence its effects are excitatory.
According to the wiki page on muscarine M2 receptor:
M2 muscarinic receptors act via a Gi type receptor, which causes a decrease in cAMP in the cell, generally leading to inhibitory-type effects.
Atropine is an antimuscarinic (anticholinergic) drug.According to the wiki page on atropine:
[R]eactions to atropine include ventricular fibrillation, supraventricular or ventricular tachycardia, dizziness, nausea, blurred vision, loss of balance, dilated pupils, photophobia, dry mouth and potentially extreme confusion, deliriant hallucinations, and excitation especially among the elderly.
So atropine blocks inhibitory muscarinic receptors, and hence causes excitation.