AoPSWiki
Looking for a challenging geometry text? Preparing for MATHCOUNTS or the AMC exams? Check out Art of Problem Solving's Introduction to Geometry by Richard Rusczyk.

Linear congruence

From AoPSWiki

Revision as of 10:06, 16 June 2008 by Latenightworker13 (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

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 to be solved for.

Contents

Solving

Note that not every linear congruence has a solution. For instance, the congruence equation 2x\equiv3\pmod8 has no solutions. A solution is guaranteed iff a is relatively prime to p. If a and p are not relatively prime, let their greatest common divisor be d; then:

  • if d divides b, there will be a solution \pmod{\frac{p}{d}}
  • if d does not divide b, there will be no solution

Example

Problem

Given 5x\equiv7\pmod8, find x.

Solution 1

7\equiv15\pmod8, so 5x\equiv15\pmod8. Thus, x\equiv3\pmod 8. Note that we can divide by 5 because 5 and 8 are relatively prime.

Solution 2

Multiply both sides of the congruence by 5 to get 25x\equiv35\pmod8. Since 25\equiv1\pmod8 and 35\equiv3\pmod8, x\equiv3\pmod8.

Art of Problem Solving celebrates the many
accomplishments of its students and community members.
© Copyright 2008 AoPS Incorporated. All Rights Reserved. • FoundationPrivacyContact Us