(Download this explanation in PDF here.)

We use inversion in several different situations in English. Inversion just means putting the verb before the subject. We usually do it in question forms:

In most English verb tenses, when we want to use inversion, we just move the verb to before the subject. If there's more than one verb, because a verb tense has auxiliary verbs for example, we move the first verb.

With two verb tenses where we just change the places of the verb and subject: With other verbs tenses, we change the place of the subject and the auxiliary verb (the first auxiliary verb if there is more than one). We don't move the other parts of the verb: There are two tenses where we need to add 'do / does / did' to make the question form. We also need to change the main verb back to the infinitive. This is usually still called inversion. When do we use inversion? Of course, we use inversion in questions. You can read more about this here. But we also sometimes use inversion in other cases, when we are not making a question.

1: When we use a negative adverb or adverb phrase at the beginning of the sentence.

Usually, we put the expression at the beginning of the sentence to emphasise what we're saying. It makes our sentence sound surprising or striking or unusual. It also sounds quite formal. If you don't want to give this impression, you can put the negative expression later in the sentence in the normal way: Here are some negative adverbs and adverb phrases that we often use with inversion:
HardlyHardly had I got into bed when the telephone rang.
NeverNever had she seen such a beautiful sight before.
SeldomSeldom do we see such an amazing display of dance.
RarelyRarely will you hear such beautiful music.
Only thenOnly then did I understand why the tragedy had happened.
Not only ... butNot only does he love chocolate and sweets but he also smokes.
No soonerNo sooner had we arrived home than the police rang the doorbell.
ScarcelyScarcely had I got off the bus when it crashed into the back of a car.
Only laterOnly later did she really think about the situation.
NowhereNowhere have I ever had such bad service.
LittleLittle did he know!
Only in this wayOnly in this way could John earn enough money to survive.
In no wayIn no way do I agree with what you're saying.
On no accountOn no account should you do anything without asking me first.
In the following expressions, the inversion comes in the second part of the sentence:
Not untilNot until I saw John with my own eyes did I really believe he was safe.
Not sinceNot since Lucy left college had she had such a wonderful time.
Only afterOnly after I'd seen her flat did I understand why she wanted to live there.
Only whenOnly when we'd all arrived home did I feel calm.
Only byOnly by working extremely hard could we afford to eat.
We only use inversion when the adverb modifies the whole phrase and not when it modifies the noun: Hardly anyone passed the exam. (No inversion.)

2: We can use inversion instead of 'if' in conditionals with 'had' 'were' and 'should'. This is quite formal: 3: We can use inversion if we put an adverbial expression of place at the beginning on the sentence. This is also quite formal or literary: 4: We can use inversion after 'so + adjective...that': Try an exercise about inversion here.
Would you like more Perfect English Grammar?

1: You could sign up for my FREE email newsletter! I'll send you an email whenever I make new lessons.

Subscribe to my newsletter!
2: You could subscribe to Perfect English Grammar PLUS and get video explanations and more exercises.
Subscribe to Perfect English Grammar PLUS!

3: You could buy my book!
'A' and 'The' Explained