Solve ## 6x\equiv 15\pmod {21} ##.

  • Thread starter Math100
  • Start date
In summary, modular arithmetic is a system of arithmetic for integers where numbers "wrap around" upon reaching a certain value called the modulus. To solve a modular equation, the value of the variable that satisfies the equation in the given modulus needs to be found by manipulating the equation and reducing it to a simpler form. A solution exists for a modular equation if the greatest common divisor of the coefficient of the variable and the modulus is equal to 1. There are some shortcuts and tricks for solving modular equations, such as using the Chinese Remainder Theorem. For example, to solve the equation ## 6x\equiv 15\pmod {21} ##, the steps include finding the greatest common divisor of 6 and 21, dividing
  • #1
Math100
756
201
Homework Statement
Solve the following linear congruence:
## 6x\equiv 15\pmod {21} ##.
Relevant Equations
None.
Consider the linear congruence ## 6x\equiv 15\pmod {21} ##.
Applying the Euclidean Division yields:
## 21=3\cdot 6+3 ##
## 6=2\cdot 3+0 ##.
Then ## gcd(6, 21)=3 ##.
Since ## 3\mid 15 ##, it follows that the linear congruence ## 6x\equiv 15\pmod {21} ## has
a unique solution modulo ## n ##.
Observe that ## x\equiv (6+\frac{21}{3}t)\pmod {21} ## where ## 0\leq t\leq 2 ##.
Thus ## x\equiv (6+7t)\pmod {21} ##.
Therefore, ## x\equiv 6\pmod {21}, x\equiv 13\pmod {21} ## and ## x\equiv 20\pmod {21} ##.
 
Physics news on Phys.org
  • #2
Math100 said:
Homework Statement:: Solve the following linear congruence:
## 6x\equiv 15\pmod {21} ##.
Relevant Equations:: None.

Consider the linear congruence ## 6x\equiv 15\pmod {21} ##.
Applying the Euclidean Division yields:
## 21=3\cdot 6+3 ##
## 6=2\cdot 3+0 ##.
Then ## gcd(6, 21)=3 ##.
Since ## 3\mid 15 ##, it follows that the linear congruence ## 6x\equiv 15\pmod {21} ## has
a unique solution modulo ## n ##.
You found three solutions, so how can they be unique?
Math100 said:
Observe that ## x\equiv (6+\frac{21}{3}t)\pmod {21} ## where ## 0\leq t\leq 2 ##.
It seems to be right since you have found the correct solutions, but why is this the case?

We have
\begin{align*}
6x\equiv 15 \pmod{21}&\Longrightarrow 21\,|\,(6x-15)=3\cdot (2x-5)\\
&\Longrightarrow 7\,|\,2x-5\\
&\Longrightarrow x=(7s+5)/2 \wedge 0\leq x \leq 20\\
&\Longrightarrow s\in \{1,3,5\}\\
&\Longrightarrow x\in\{6,13,20\}
\end{align*}

How did you get ## x\equiv (6+7t)\pmod {21} ## where ## 0\leq t\leq 2 ##?
Math100 said:
Thus ## x\equiv (6+7t)\pmod {21} ##.
Therefore, ## x\equiv 6\pmod {21}, x\equiv 13\pmod {21} ## and ## x\equiv 20\pmod {21} ##.
 
  • #3
fresh_42 said:
You found three solutions, so how can they be unique?

It seems to be right since you have found the correct solutions, but why is this the case?

We have
\begin{align*}
6x\equiv 15 \pmod{21}&\Longrightarrow 21\,|\,(6x-15)=3\cdot (2x-5)\\
&\Longrightarrow 7\,|\,2x-5\\
&\Longrightarrow x=(7s+5)/2 \wedge 0\leq x \leq 20\\
&\Longrightarrow s\in \{1,3,5\}\\
&\Longrightarrow x\in\{6,13,20\}
\end{align*}

How did you get ## x\equiv (6+7t)\pmod {21} ## where ## 0\leq t\leq 2 ##?
## x\equiv (x_{0}+\frac{n}{d}t)\pmod {n} ##
## x\equiv (6+\frac{21}{3}t)\pmod {21} ##
 
  • #4
As for ## 0\leq t\leq 2 ##, I got this because ## gcd(6, 21)=3 ##, so ## t ## must be ## 0\leq t\leq 2 ## or ## 0\leq t<3 ##.
 
  • #5
Since you claimed that three solutions aren't unique, then is the answer just ## x\equiv 6\pmod {21} ##?
 
  • #6
Math100 said:
Since you claimed that three solutions aren't unique, then is the answer just ## x\equiv 6\pmod {21} ##?
No, all three are possible solutions.

You only get unique solutions if the greatest common divisor is ##1.## Here we have ##3##. The reason is that ##\operatorname{gcd}(a,b)## can be written as
$$
\operatorname{gcd}(a,b)=s\cdot a+t\cdot b
$$
If we had ##\operatorname{gcd}(a,b)=1,## then ##1\equiv s\cdot a \pmod b## and ##a## can be inverted: ##s\equiv 1/a \pmod b.## Now we could solve all equations ##a\cdot x \equiv c \pmod b## simply by multiplying it with ##s##. Hence
$$
s\cdot (a\cdot x) \equiv (s\cdot a)\cdot x \equiv 1\cdot x \equiv x\equiv s\cdot c \pmod b.
$$

But here we have only the equation ##3=1\cdot 21 - 3\cdot 6## and ##6## cannot be inverted modulo ##21.##
 
  • Like
Likes Math100
  • #7
But which method is correct? The one you showed me above with ## x=(7s+5)/2\land 0\leq x\leq 20\implies s\in {1, 3, 5}\implies x\in {6, 13, 20} ##, or the one I used?
 
  • #8
Math100 said:
But which method is correct? The one you showed me above with ## x=(7s+5)/2\land 0\leq x\leq 20\implies s\in {1, 3, 5}\implies x\in {6, 13, 20} ##, or the one I used?
Both are ok. Your only mistake was to call the solution unique. We have three valid solutions so they cannot be unique.
 
  • Like
Likes Math100

1. How do I solve a modular equation like "6x≡15 (mod 21)"?

To solve a modular equation, you need to find the value of x that satisfies the equation. In this case, we can divide both sides by 3 to get "2x≡5 (mod 7)". Then, we can multiply both sides by the modular inverse of 2 (which is 4) to get "x≡10 (mod 7)". Therefore, the solution for this equation is x=10.

2. What is a modular inverse and how do I find it?

A modular inverse is a number that, when multiplied by a given number, gives a remainder of 1 when divided by a certain modulus. In this case, we need to find the modular inverse of 2 (mod 7). To do this, we can use the Extended Euclidean Algorithm or simply try out different numbers until we find one that satisfies the condition (in this case, 4).

3. Can I use the same method to solve any modular equation?

Yes, the method used to solve this equation (dividing both sides by a number and then multiplying by the modular inverse) can be applied to any modular equation as long as the modulus is relatively prime to the number being divided by. If the modulus and the number being divided by have a common factor, then the equation may have multiple solutions or no solution at all.

4. Can I use a calculator to solve modular equations?

Yes, most scientific calculators have a modular arithmetic function that can be used to solve modular equations. However, it is important to understand the underlying principles and methods in order to use the calculator correctly.

5. What are some real-world applications of modular equations?

Modular equations are commonly used in cryptography, computer science, and coding theory. They are also used in various engineering fields to solve problems related to periodicity and synchronization. Additionally, modular arithmetic is used in the calculation of dates and time, as well as in music theory and game theory.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
1
Views
880
  • Precalculus Mathematics Homework Help
Replies
1
Views
846
  • Precalculus Mathematics Homework Help
Replies
3
Views
715
  • Precalculus Mathematics Homework Help
Replies
1
Views
816
  • Precalculus Mathematics Homework Help
Replies
2
Views
879
  • Precalculus Mathematics Homework Help
Replies
4
Views
939
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
2K
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
Back
Top