Inversion in grammar refers to the reversal of the normal word order in a sentence, often for emphasis or to form certain types of questions.
Inversion typically involves switching the order of the subject and auxiliary verb. This happens most often in question formation, negative adverbials, or for emphasis.
For example:
Normal word order: She is going to the market.
Inverted word order (question): Is she going to the market?
Inversion with negative adverbials: Never have I seen such a beautiful sunset.