Inversion means reversing the normal subject-verb order, placing the auxiliary or modal before the subject. This is used for emphasis, formality, or literary effect, especially after negative or limiting adverbials at the beginning of a sentence.
Quick tip: Think of inversion as question order without the question: Never have I... = Have I never...? But it's a statement, not a question.
Negative Adverbials + Inversion
After negative adverbials like 'Never', 'Rarely', 'Seldom', 'Hardly', 'Scarcely', 'Not only', 'No sooner', use question word order: auxiliary/modal + subject + main verb. This creates strong emphasis.
Never have I seen such a beautiful sunset. (I have never seen...)
Rarely does she complain about her work. (She rarely complains...)
Seldom do we get visitors at this time of year. (We seldom get...)
Hardly had we arrived when the phone rang. (We had hardly arrived...)
Only + Time/Condition + Inversion
After 'Only + time expression/condition' at the start, invert the subject and auxiliary. This emphasizes the exclusive or limited nature of when or how something happens.
Only after the exam did I realize my mistake. (I realized only after...)
Only when you try it will you understand. (You will understand only when...)
Only by working together can we solve this. (We can solve this only by...)
Only then did she know the truth. (She knew the truth only then)
Little/No + Noun + Inversion
After expressions with 'Little' (meaning 'not much') or 'No' at the beginning, use inversion to emphasize the lack or absence of something. This is very formal.
Little did I know what was waiting for me. (I knew very little...)
Little does he realize how important this is. (He realizes very little...)
Under no circumstances should you open this door. (You should not open... under any circumstances)
At no time did I agree to those terms. (I did not agree... at any time)
Common mistakes
Not "Never I have seen such a mess." — say "Never have I seen such a mess.". After negative adverbials, invert the subject and auxiliary: auxiliary + subject, not subject + auxiliary..
Not "Only yesterday I realized my mistake." — say "Only yesterday did I realize my mistake.". After 'only + time', you must use inversion with an auxiliary verb if there isn't one already..
Not "Rarely he goes to the cinema." — say "Rarely does he go to the cinema.". With present simple (except 'be'), add 'do/does/did' in inverted sentences: does + subject + base verb..
Practise it
Start with the normal sentence, then move the negative/limiting word to the front and switch to question order: I have never seen → Never have I seen.