Processing math: 100%
Skip to main content

Section 6.5 Applications to Congruences

Subsection 6.5.1 Factoring the modulus

The reason the fundamental theorem is so useful for congruences is that prime powers (for different primes) are automatically relatively prime to each other. So in using the Chinese Remainder Theorem (Theorem 5.3.2) we don't have a spend time looking for coprime factors; we can just factor into prime powers using the Fundamental Theorem of Arithmetic. So here is a useful repositioning of Proposition 5.4.4.

That means that any question about congruences is really a question about systems of congruences modulo prime powers. We will use this fact again and again in the remainder of the text, and it is a huge reason why the CRT is so intensely powerful.

Similarly, referring to Subsection 5.5.2, what if one has one complicated congruence with coefficients and a composite modulus N?

Ax≑B (mod N)

Just take N=pe11β‹―pekk and then solve all the congruences Ax≑B (mod peii) first. Then use the Chinese Remainder Theorem to β€˜patch’ them together for a final solution. This is a little tedious, but certainly doable.

Example 6.5.2.

Let's solve the following congruence using the method in the previous paragraph:

21x≑33 (mod 180).

Here are some steps:

  • Create the individual congruences

  • Solve them

  • Put them back together

Subsection 6.5.2 Moduli that are prime powers

When it comes to linear congruences, these consequences of the Chinese Remainder Theorem and Fundamental Theorem of Arithmetic suggest that we reconsider the prime power case with a more subtle tool. Assume that in solving a bunch of congruences

x≑aj (mod nj)

we would like to start by solving congruences

x≑aj (mod pe)

where pe divides nj.

The general approach, then, is to first solve modulo p, in the hope that this could lead to a solution modulo pe. Consider the following extended example, divided into two parts.

Example 6.5.3. Prime Power Congruences.

One reason we might want to solve such a congruence is for finding an inverse (recall Definition 5.3.3) for various purposes, so suppose we want to find the inverse of 4 modulo 49=72. That is solving 4x≑1 (mod 49).

First, let f(x)=4xβˆ’1. The only solution of 4x≑1 (mod 7) is clear; it is x=[2]. How might we get solutions (mod 49) from this? We delineate relevant steps.

  • First, any solution of 4x≑1 (mod 72) is also a solution of 4x≑1 (mod 7). So x≑2+7k (mod 49) for some k, since [2]={2+7k∣k∈Z}.

  • Plugging 2+7k in the original congruence yields

    4x≑4(2+7k)≑4β‹…2+4β‹…7k≑1 (mod 49),

    or, rearranging (but keeping everything unmultiplied),

    1βˆ’4β‹…2≑4β‹…7k (mod 72).
  • Now, we know that 7∣1βˆ’4β‹…2, because we already know that 2 solved our original congruence:

    1≑4β‹…2 (mod 7).

    So we can cancel out 7 from the entire congruence (as in Proposition 5.2.6) to get that

    1βˆ’4β‹…27≑4k (mod 7).

    This simplifies to βˆ’1≑4k (mod 7).

  • By inspection βˆ’1≑4k has the solution k≑5 (mod 7). Using this k and plugging it back in to get a solution to 4x≑1 (mod 72), we get

    2+7k=2+7β‹…5=37 (mod 72)

    as the solution.

And indeed 4β‹…37=148≑1 (mod 49).

Example 6.5.4.

Let's do it all again, more tersely, to get an inverse modulo 73, i.e. a solution to 4x≑1 modulo 73=343.

  • I already know that [37] is the solution to 4x≑1 (mod 72). That means that a solution to 4x≑1 (mod 73) must look like 37+72β„“ (for some integer β„“).

  • Plugging this in gives me 4(37+72β„“)≑1 (mod 73), which rearranges to

    4β‹…72ℓ≑1βˆ’4β‹…37 (mod 73).
  • Since we know that 37 solves 4x≑1 (mod 72), that means (by definition of congruence) that

    72∣1βˆ’4β‹…37,

    so we can divide β€œall three sides” of the last congruence by 72, which yields

    4ℓ≑1βˆ’4β‹…3772β‰‘βˆ’14772β‰‘βˆ’3≑4 (mod 7).
  • Solving this yields ℓ≑1 (mod 7), so

    x≑37+72β‹…1≑86 (mod 343).

And a quick check shows 4β‹…86=344≑1 (mod 343) works.

You can do this as often as you like, and (properly interpreted) it will yield all solutions of your congruence modulo pe, one step at a time. We'll see a generalization of this in Section 7.2.