Linear Congruences with Nonunit Coefficients
The gcd of a coefficient and modulus controls both solvability and the number of solutions to a linear congruence.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 1
- Reading time
- 1 min
Write \(d=\gcd(a,n)\). If \(ax\equiv b\bmod n\), then \(d\mid b\). When \(d\mid b\), divide the integer equation \(ax-b=kn\) by \(d\). The reduced coefficient is a unit modulo \(n/d\), so there is one solution modulo \(n/d\) and \(d\) solutions modulo \(n\).
\[ax\equiv b\pmod n\quad\Longleftrightarrow\quad (a/d)x\equiv b/d\pmod{n/d}\quad(d\mid b).\]
Counting rather than guessing
For \(14x\equiv21\bmod35\), the reduced equation is \(2x\equiv3\bmod5\). Thus \(x\equiv4\bmod5\), with seven representatives modulo \(35\). This is the finite cyclic analogue of a linear-map fiber.[1]