I can think of several examples of functions such that twice application of the function is equivalent to no application of it.
- Additive inverse
- Multiplicative inverse
- Fourier transform
- Complex conjugation
- Any group built up from $\mathbb{Z}_2$, applying (one of) the $\mathbb{Z}_2$ parts' operation.
"Idempotent" came to mind, but that's wrong. It means $f(f(x)) = f(x)$, not $f(f(x))=x$.
What is the word for this "flip-flop" property?