In several different structures the auxiliary verb comes before the subject. This is usually referred to as inversion.
Questions
Written questions have the following word order: auxiliary verb + subject + main verb. Note that only the auxiliary verb goes before the subject. The main verb goes after the subject.
- Has John arrived? (NOT Has arrived John?)
- Have they agreed to come? (NOT Have agreed they to come?)
In questions beginning with a question word (e.g. where, when, why, how), the auxiliary goes after the question word and before the subject.
- What are you doing there? (NOT What you are doing there?) (NOT Are what you doing there?)
Note that the inversion of subject and auxiliary verb does not always happen in spoken questions. In spoken questions the meaning is usually conveyed through intonation.
- You’re coming with me? (Spoken question meaning ‘Are you coming with me?’)
Indirect questions also don’t have the inverted word order.
- I wondered what he was going to do. (NOT I wondered what was he going to do.)
- She asked where I was going. (NOT She asked where was I going)
With may
The auxiliary may comes before the subject in wishes.
- May God bless you! (NOT God may bless you!)
After so, neither and nor
The auxiliary goes before the subject in short answers after words like so, neither and nor.
- I don’t like cricket. Neither do I. (NOT Neither I do.)
- I am hungry. So am I.