Subject-auxiliary inversion
In this type of inversion, the subject and the auxiliary switch positions. In the present and past simple, the auxiliaries do/does and did come before the subject, which is followed by the bare infinitive. The word order is the same as in questions.