ELI5: Explain Like I'm 5

Inversion (discrete mathematics)

Inversion is a big grown-up word that means flipping things around. In mathematics, we use it to talk about switching the places of two numbers in a list.

Let's say you have a list of numbers like this: 2, 5, 1, 3, 4. If we switch the places of the first two numbers, we get a new list: 5, 2, 1, 3, 4. We call that an inversion because we flipped the places of two numbers.

Inversion can also be used to count how many times we have to flip two numbers in a list to put them in order. For example, in the list 2, 5, 1, 3, 4, we would need to invert 3 times (switch 2 and 1, switch 5 and 1, and switch 5 and 3) to put the list in order from smallest to biggest: 1, 2, 3, 4, 5.

Inversion might seem like a tricky concept, but it's just a fancy way of talking about switching the places of two numbers and counting how many times we need to do that to get a list in order.