Difference between revisions of "Linear congruence"

(Linear Congruences)
(Example 1: How to solve)
Line 6: Line 6:
 
, where a, b, c, and p are constants, and x is the variable.
 
, where a, b, c, and p are constants, and x is the variable.
  
==Example 1: How to solve==
+
==Example I: How to solve==
  
 
Say <math>5x\equiv 7\pmod{8}</math>.  Find <math>x</math>.
 
Say <math>5x\equiv 7\pmod{8}</math>.  Find <math>x</math>.

Revision as of 10:39, 15 August 2006

A Linear Congruence is a congruence mod p of the form

$ax+b\equiv c\pmod{p}$

, where a, b, c, and p are constants, and x is the variable.

Example I: How to solve

Say $5x\equiv 7\pmod{8}$. Find $x$.

Solution:

$5x\equiv 7\equiv 15\pmod{8}$, so

$x\equiv 3\pmod{8}$, because 5 is relatively prime to 8, we can divide by it.