Problem
ALG-B3-M06-P016 Involution Modulo a Prime
#16
★★★★★ Level 5 of 5
Let \(p\) be an odd prime, \(f:\mathbb Z/p\mathbb Z\to\mathbb Z/p\mathbb Z\), \(f(x+y)=f(x)+f(y)\), and \(f(f(x))=x\). Find \(f\).
First \(f(x)=ax\).
By additivity on residues, \(f(x)=ax\), where \(a=f(1)\). Then \(f(f(x))=a^2x\). The condition gives \(a^2\equiv1\pmod p\). Since \(p\) is an odd prime, \((a-1)(a+1)\equiv0\pmod p\), so \(a\equiv1\) or \(a\equiv-1\). The answer is \(f(x)=x\) and \(f(x)=-x\) modulo \(p\).
Modular version of a composition constraint.