Solving linear congruences (intro) - Discrete Math

Start this quiz

  1. The linear congruence 12x≡8(mod20)12x \equiv 8 \pmod{20} can be simplified before solving. What is the correct simplified form and its smallest positive solution?
    Answer: 3x≡2(mod5)3x \equiv 2 \pmod{5}; solution x=4x = 4 We can divide the entire congruence by gcd(12,8,20) = 4 to get 3x≡2(mod5)3x \equiv 2 \pmod{5}. To solve this, we need the multiplicative inverse of 3 modulo 5. Since 3⋅2=6≡1(mod5)3 \cdot 2 = 6 \equiv 1 \pmod{5}, we have 3−1≡2(mod5)3^{-1} \equiv 2 \pmod{5}. Therefore x≡2⋅2≡4(mod5)x \equiv 2 \cdot 2 \equiv 4 \pmod{5}, giving the smallest positive solution x=4x = 4. Choice B fails to simplify completely. Choice C uses the correct simplified form but makes an error in finding the inverse. Choice D incorrectly simplifies the original congruence.
  2. If ax≡b(modm)ax \equiv b \pmod{m} has solutions, and after finding one solution x0x_0, the general solution is x≡x0+md⋅t(modm)x \equiv x_0 + \frac{m}{d} \cdot t \pmod{m} where d=gcd⁡(a,m)d = \gcd(a,m). For the congruence 18x≡12(mod30)18x \equiv 12 \pmod{30}, what is the value of md\frac{m}{d}?
    Answer: md=5\frac{m}{d} = 5 Here a=18a = 18, m=30m = 30, so d=gcd⁡(18,30)=6d = \gcd(18,30) = 6. Therefore md=306=5\frac{m}{d} = \frac{30}{6} = 5. This means solutions are spaced 5 units apart modulo 30, and there are 6 distinct solutions modulo 30. Choice A uses d=15d = 15 incorrectly. Choice C uses dd itself instead of md\frac{m}{d}. Choice D uses mgcd⁡(a,b)\frac{m}{\gcd(a,b)} instead of mgcd⁡(a,m)\frac{m}{\gcd(a,m)}.
  3. The linear congruence 12x≡8(mod20)12x \equiv 8 \pmod{20} is equivalent to which of the following simplified congruences?
    Answer: 3x≡2(mod5)3x \equiv 2 \pmod{5} Since gcd⁡(12,20)=4\gcd(12, 20) = 4 and 4 divides 8, divide the coefficient, the right side and the modulus by 4: 12x≡8(mod20)12x \equiv 8 \pmod{20} becomes 3x≡2(mod5)3x \equiv 2 \pmod{5}. Both have the same solutions, x≡4(mod5)x \equiv 4 \pmod{5} (that is, 4, 9, 14, 19 modulo 20). Keeping the modulus at 20, 3x≡2(mod20)3x \equiv 2 \pmod{20} has only x≡14(mod20)x \equiv 14 \pmod{20}, so it loses solutions. Halving the coefficient and right side but not the modulus, 6x≡4(mod20)6x \equiv 4 \pmod{20}, gives x≡4(mod10)x \equiv 4 \pmod{10}, so it loses 9 and 19. In 4x≡8(mod5)4x \equiv 8 \pmod{5} the coefficients were not divided correctly; it gives x≡2(mod5)x \equiv 2 \pmod{5}, a different solution set.
  4. Consider 9x≡6(mod15)9x \equiv 6 \pmod{15}. This congruence can be simplified, but one must be careful about the modulus. What is the correct approach and final answer?
    Answer: Divide by 3: 3x≡2(mod5)3x \equiv 2 \pmod{5}; solution x≡4(mod5)x \equiv 4 \pmod{5} When solving linear congruences, you can often simplify by dividing out common factors, but you must adjust the modulus correctly to maintain equivalence. For 9x≡6(mod15)9x \equiv 6 \pmod{15}, notice that gcd⁡(9,6,15)=3\gcd(9, 6, 15) = 3. Since 3 divides all terms, you can divide the entire congruence by 3. This gives you 3x≡2(mod?)3x \equiv 2 \pmod{?}, but here's the crucial part: the modulus must also be divided by 3, becoming 3x≡2(mod5)3x \equiv 2 \pmod{5}. To solve 3x≡2(mod5)3x \equiv 2 \pmod{5}, you need the multiplicative inverse of 3 modulo 5. Since 3⋅2=6≡1(mod5)3 \cdot 2 = 6 \equiv 1 \pmod{5}, the inverse is 2. Multiplying both sides by 2: x≡2⋅2≡4(mod5)x \equiv 2 \cdot 2 \equiv 4 \pmod{5}. This makes C correct. Option A is wrong because the congruence can indeed be simplified when there's a common factor. Option B makes the critical error of dividing the coefficients by 3 but keeping the original modulus 15 unchanged—this fundamentally alters the congruence relationship. While B's final answer x≡4(mod15)x \equiv 4 \pmod{15} happens to contain solutions, it's not the complete solution set. Option D attempts invalid division since 9 and 15 aren't coprime, and fractions don't work directly in modular arithmetic without finding multiplicative inverses. Key strategy: When simplifying linear congruences by dividing out common factors, always divide the modulus by the same factor. The solutions to the simplified congruence will be the same as the original, just with a smaller modulus.
  5. The linear congruence 8x≡12(mod20)8x \equiv 12 \pmod{20} requires careful analysis. Which statement about this congruence is correct?
    Answer: It simplifies to 2x≡3(mod5)2x \equiv 3 \pmod{5} with solution x≡4(mod5)x \equiv 4 \pmod{5} Because gcd⁡(8,20)=4\gcd(8, 20) = 4 and 4 divides 12, the congruence has solutions, exactly 4 of them modulo 20. Dividing every part by 4 gives 2x≡3(mod5)2x \equiv 3 \pmod{5}. The inverse of 2 modulo 5 is 3, since 2⋅3=6≡1(mod5)2 \cdot 3 = 6 \equiv 1 \pmod{5}, so x≡3⋅3=9≡4(mod5)x \equiv 3 \cdot 3 = 9 \equiv 4 \pmod{5}. Lifting back to modulo 20 gives the full solution set {4,9,14,19}\{4, 9, 14, 19\}; for example, 8⋅9=72=3⋅20+128 \cdot 9 = 72 = 3 \cdot 20 + 12. The claim of no solutions misreads the divisibility test: 4 does divide 12. The set {4,14}\{4, 14\} lists only two of the four residues and misses 9 and 19, so 'exactly 2 solutions' is false. The set {3,8,13,18}\{3, 8, 13, 18\} fails at once: 8⋅3=24≡4(mod20)8 \cdot 3 = 24 \equiv 4 \pmod{20}, not 12.
  6. The congruence 21x≡14(mod35)21x \equiv 14 \pmod{35} has multiple solutions. After reducing to lowest terms, how many distinct solutions exist modulo 35?
    Answer: 7 solutions modulo 35 First find gcd(21,35) = 7. Since 7 divides 14, solutions exist. The number of solutions modulo 35 is gcd(21,35) = 7. To find them, we first reduce: divide by 7 to get 3x≡2(mod5)3x \equiv 2 \pmod{5}. Since gcd(3,5) = 1, this has exactly one solution modulo 5. We find 3−1≡2(mod5)3^{-1} \equiv 2 \pmod{5}, so x≡4(mod5)x \equiv 4 \pmod{5}. The 7 solutions modulo 35 are: x≡4,9,14,19,24,29,34(mod35)x \equiv 4, 9, 14, 19, 24, 29, 34 \pmod{35}. Choice A assumes the reduced congruence gives the total count. Choice B incorrectly uses gcd(21,14). Choice D incorrectly concludes no solutions exist.
  7. The congruence 15x≡10(mod25)15x \equiv 10 \pmod{25} can be solved by first reducing it. After proper reduction, what multiplicative inverse is needed, and what is the final answer?
    Answer: Need inverse of 3 mod 5; answer is x≡4(mod5)x \equiv 4 \pmod{5} First, we find gcd(15,10,25) = 5 and divide the entire congruence by 5: 3x≡2(mod5)3x \equiv 2 \pmod{5}. We need the multiplicative inverse of 3 modulo 5. Since 3⋅2=6≡1(mod5)3 \cdot 2 = 6 \equiv 1 \pmod{5}, we have 3−1≡2(mod5)3^{-1} \equiv 2 \pmod{5}. Therefore x≡2⋅2≡4(mod5)x \equiv 2 \cdot 2 \equiv 4 \pmod{5}. Choice B attempts to solve without reduction. Choice C identifies the correct inverse but gives an incorrect final answer. Choice D incorrectly identifies which inverse is needed after reduction.
  8. Consider the linear congruence 7x≡3(mod15)7x \equiv 3 \pmod{15}. After determining whether this congruence has solutions, what is the smallest positive integer xx that satisfies it?
    Answer: x=9x = 9 First, we check if solutions exist by finding gcd⁡(7,15)=1\gcd(7,15) = 1. Since gcd⁡(7,15)=1\gcd(7,15) = 1 divides 33, solutions exist. To solve 7x≡3(mod15)7x \equiv 3 \pmod{15}, we need the multiplicative inverse of 77 modulo 1515. Using the extended Euclidean algorithm: 15=2⋅7+115 = 2 \cdot 7 + 1, so 1=15−2⋅71 = 15 - 2 \cdot 7. This means 7−1≡−2≡13(mod15)7^{-1} \equiv -2 \equiv 13 \pmod{15}. Therefore x≡3⋅13≡39≡9(mod15)x \equiv 3 \cdot 13 \equiv 39 \equiv 9 \pmod{15}. Choice A gives 7⋅6=42≡12(mod15)7 \cdot 6 = 42 \equiv 12 \pmod{15}. Choice C gives 7⋅12=84≡9(mod15)7 \cdot 12 = 84 \equiv 9 \pmod{15}. Choice D is incorrect since gcd⁡(7,15)=1\gcd(7,15) = 1 divides 33.
  9. Consider the congruence 4x≡6(mod10)4x \equiv 6 \pmod{10}. Which statement correctly describes the solution set?
    Answer: The congruence has exactly two solutions modulo 1010 First check if solutions exist: gcd⁡(4,10)=2\gcd(4,10) = 2. Since 22 divides 66, solutions exist. The number of solutions modulo 1010 is gcd⁡(4,10)=2\gcd(4,10) = 2. To find them, reduce by dividing by 22: 2x≡3(mod5)2x \equiv 3 \pmod{5}. Since gcd⁡(2,5)=1\gcd(2,5) = 1, this has a unique solution modulo 55. The inverse of 22 modulo 55 is 33 (since 2⋅3=6≡1(mod5)2 \cdot 3 = 6 \equiv 1 \pmod{5}), so x≡3⋅3≡9≡4(mod5)x \equiv 3 \cdot 3 \equiv 9 \equiv 4 \pmod{5}. The solutions modulo 1010 are x∈{4,9}x \in \{4, 9\}. Choice A is wrong because there are two solutions, not one. Choice C is wrong because solutions exist. Choice D is wrong because there are only two solutions.
  10. If gcd⁡(a,15)=3\gcd(a,15) = 3 and the congruence ax≡9(mod15)ax \equiv 9 \pmod{15} has solutions, how many solutions does it have modulo 1515?
    Answer: 33 solutions When you encounter a linear congruence ax≡b(modm)ax \equiv b \pmod{m}, the number of solutions depends on the relationship between gcd⁡(a,m)\gcd(a,m) and bb. If gcd⁡(a,m)\gcd(a,m) divides bb, then there are exactly gcd⁡(a,m)\gcd(a,m) solutions modulo mm. In this problem, we're given gcd⁡(a,15)=3\gcd(a,15) = 3 and the congruence ax≡9(mod15)ax \equiv 9 \pmod{15}. First, let's verify that solutions exist: since 33 divides 99 (because 9=3×39 = 3 \times 3), the congruence indeed has solutions. Now we can apply the theorem: the number of solutions modulo 1515 equals gcd⁡(a,15)=3\gcd(a,15) = 3. This happens because when gcd⁡(a,m)=d>1\gcd(a,m) = d > 1, we can reduce the congruence by dividing through by dd, which creates dd distinct solution classes modulo mm. Looking at the wrong answers: Choice A suggests only 11 solution, which would only be true if gcd⁡(a,15)=1\gcd(a,15) = 1, meaning aa and 1515 were coprime. Choice B claims 1515 solutions, but you can never have more solutions than the modulus itself, and this would require every residue class to be a solution. Choice C suggests 55 solutions, which might tempt you if you incorrectly calculated 15/3=515/3 = 5, but that's not how the theorem works. Remember this key principle: for linear congruences ax≡b(modm)ax \equiv b \pmod{m}, when solutions exist, the number of solutions always equals gcd⁡(a,m)\gcd(a,m). Check divisibility first, then apply this formula directly.
  11. If 5x≡7(mod12)5x \equiv 7 \pmod{12} and we know that 5⋅5≡1(mod12)5 \cdot 5 \equiv 1 \pmod{12}, then all solutions to the congruence in the range 0≤x<360 \leq x < 36 are:
    Answer: x∈{11,23,35}x \in \{11, 23, 35\} When you encounter linear congruences like 5x≡7(mod12)5x \equiv 7 \pmod{12}, you need to find the multiplicative inverse of the coefficient to isolate xx. The problem helpfully tells you that 5⋅5≡1(mod12)5 \cdot 5 \equiv 1 \pmod{12}, meaning 5 is the multiplicative inverse of 5 modulo 12. To solve for xx, multiply both sides by 5: 5⋅5x≡5⋅7(mod12)5 \cdot 5x \equiv 5 \cdot 7 \pmod{12} 25x≡35(mod12)25x \equiv 35 \pmod{12} Since 25≡1(mod12)25 \equiv 1 \pmod{12} and 35≡11(mod12)35 \equiv 11 \pmod{12}: x≡11(mod12)x \equiv 11 \pmod{12} This means x=11+12kx = 11 + 12k for any integer kk. In the range 0≤x<360 \leq x < 36: - When k=0k = 0: x=11x = 11 - When k=1k = 1: x=23x = 23 - When k=2k = 2: x=35x = 35 So the complete solution set is {11,23,35}\{11, 23, 35\}, which is answer C. Let's check why the other options fail: Answer A gives {5,17,29}\{5, 17, 29\}, but 5⋅5=25≡1(mod12)5 \cdot 5 = 25 \equiv 1 \pmod{12}, not 7. Answer B gives {7,19,31}\{7, 19, 31\}, but 5⋅7=35≡11(mod12)5 \cdot 7 = 35 \equiv 11 \pmod{12}, not 7. Answer D only includes {11,23}\{11, 23\} but misses x=35x = 35, which is still in the specified range. Study tip: Always find all solutions within the given range by adding the modulus repeatedly to your base solution. Don't stop early—check that your largest solution is still less than the upper bound.
  12. For which value of aa does the linear congruence 6x≡a(mod15)6x \equiv a \pmod{15} have exactly one solution modulo 15?
    Answer: The congruence never has exactly one solution modulo 15 Since gcd(6,15) = 3, the congruence 6x≡a(mod15)6x \equiv a \pmod{15} has solutions if and only if 3∣a3 | a. When solutions exist, there are exactly gcd(6,15) = 3 distinct solutions modulo 15. The congruence cannot have exactly one solution modulo 15 because when it has solutions, it always has exactly 3 solutions. Choices B, C, and D incorrectly assume that certain values of aa can yield a unique solution, but this violates the fundamental theorem about the number of solutions to linear congruences.
  13. The congruence 21x≡14(mod35)21x \equiv 14 \pmod{35} simplifies to 3x≡2(mod5)3x \equiv 2 \pmod{5}. What is the complete solution set for xx in the original congruence?
    Answer: x≡4,9,14,19,24,29,34(mod35)x \equiv 4, 9, 14, 19, 24, 29, 34 \pmod{35} Since gcd⁡(21,35)=7\gcd(21, 35) = 7 and 7 divides 14, the congruence has exactly 7 solutions modulo 35. Dividing everything by 7 gives 3x≡2(mod5)3x \equiv 2 \pmod{5}. The inverse of 3 modulo 5 is 2 because 3⋅2=6≡1(mod5)3 \cdot 2 = 6 \equiv 1 \pmod{5}, so x≡4(mod5)x \equiv 4 \pmod{5}. Listing these modulo 35 gives x≡4,9,14,19,24,29,34(mod35)x \equiv 4, 9, 14, 19, 24, 29, 34 \pmod{35}. Check one: 21⋅4=84=2⋅35+1421 \cdot 4 = 84 = 2 \cdot 35 + 14. Using the gcd 7 as the new modulus, x≡4(mod7)x \equiv 4 \pmod{7}, confuses the number of solutions with the modulus; for example x=11x = 11 satisfies it but 21⋅11=231≡21(mod35)21 \cdot 11 = 231 \equiv 21 \pmod{35}. Listing only x≡4(mod35)x \equiv 4 \pmod{35} misses six solutions. The list 9, 16, 23, 30, 2 steps by 7 instead of 5, and 16 fails: 21⋅16=336≡21(mod35)21 \cdot 16 = 336 \equiv 21 \pmod{35}.
  14. If x1x_1 is a particular solution to ax≡b(modm)ax \equiv b \pmod{m}, then all solutions are given by x≡x1+kt(modm)x \equiv x_1 + kt \pmod{m} where t=mgcd⁡(a,m)t = \frac{m}{\gcd(a,m)} and kk ranges over integers. For 6x≡9(mod15)6x \equiv 9 \pmod{15}, what is the value of tt?
    Answer: t=5t = 5 Here a=6a = 6 and m=15m = 15, so gcd⁡(6,15)=3\gcd(6,15) = 3. Therefore t=mgcd⁡(a,m)=153=5t = \frac{m}{\gcd(a,m)} = \frac{15}{3} = 5. This means that if x1x_1 is one solution, then x1,x1+5,x1+10x_1, x_1+5, x_1+10 are the three distinct solutions modulo 15. Choice A gives the gcd itself rather than the quotient. Choice C uses the coefficient aa instead of the correct formula. Choice D uses the modulus mm instead of the quotient.
  15. A student attempts to solve 4x≡6(mod10)4x \equiv 6 \pmod{10} by finding 4−1(mod10)4^{-1} \pmod{10} and concludes no solution exists because gcd(4,10) ≠ 1. What is the error in this reasoning, and what is the correct approach?
    Answer: The error is not checking divisibility; since gcd(4,10) = 2 divides 6, solutions exist by reduction The student's error is applying the wrong test. When gcd(a,m) ≠ 1, we cannot find a multiplicative inverse of aa modulo mm, but this doesn't mean the congruence ax≡b(modm)ax \equiv b \pmod{m} has no solutions. The correct test is whether gcd(a,m) divides bb. Here gcd(4,10) = 2, and since 2 divides 6, solutions exist. We reduce by dividing by 2: 2x≡3(mod5)2x \equiv 3 \pmod{5}. Since 2⋅3≡1(mod5)2 \cdot 3 \equiv 1 \pmod{5}, we get x≡3⋅3≡4(mod5)x \equiv 3 \cdot 3 \equiv 4 \pmod{5}. The solutions modulo 10 are {4,9}\{4,9\}. Choice A incorrectly claims an inverse exists. Choice C makes a computational error. Choice D accepts the wrong reasoning.
  16. Consider the linear congruence 7x≡3(mod15)7x \equiv 3 \pmod{15}. After finding the multiplicative inverse of 77 modulo 1515, what is the smallest non-negative solution for xx?
    Answer: x=9x = 9 First, we need to find the multiplicative inverse of 7 modulo 15. Using the extended Euclidean algorithm: gcd(7,15) = 1, so the inverse exists. We find that 7⋅13≡91≡1(mod15)7 \cdot 13 \equiv 91 \equiv 1 \pmod{15}, so 7−1≡13(mod15)7^{-1} \equiv 13 \pmod{15}. Multiplying both sides of the original congruence by 13: x≡13⋅3≡39≡9(mod15)x \equiv 13 \cdot 3 \equiv 39 \equiv 9 \pmod{15}. Choice A results from incorrectly using 6 as the inverse of 7. Choice C is the unreduced form of 39. Choice D results from using 12 as the inverse of 7.
  17. For which value of aa does the congruence 6x≡a(mod9)6x \equiv a \pmod{9} have exactly three solutions modulo 99?
    Answer: a=3a = 3 For 6x≡a(mod9)6x \equiv a \pmod{9}, let d=gcd⁡(6,9)=3d = \gcd(6, 9) = 3. The congruence has solutions exactly when 3∣a3 \mid a, and then it has exactly d=3d = 3 solutions modulo 9. For a=3a = 3: divide through by 3 to get 2x≡1(mod3)2x \equiv 1 \pmod{3}, so x≡2(mod3)x \equiv 2 \pmod{3}, giving x∈{2,5,8}x \in \{2, 5, 8\} modulo 9. Check: 6⋅2=12≡36 \cdot 2 = 12 \equiv 3, 6⋅5=30≡36 \cdot 5 = 30 \equiv 3, 6⋅8=48≡3(mod9)6 \cdot 8 = 48 \equiv 3 \pmod{9}. For a=1a = 1, a=2a = 2 or a=4a = 4, 3 does not divide aa. Every multiple 6x6x is a multiple of 3 modulo 9 (only 0, 3 or 6), so it can never equal 1, 2 or 4, and these congruences have no solutions. Thinking that a nonzero aa coprime to 9 must give a solution ignores that 6 is not invertible modulo 9. The value with exactly three solutions is a=3a = 3.
  18. For what values of kk does the system of congruences x≡5(mod8)x \equiv 5 \pmod{8} and x≡k(mod12)x \equiv k \pmod{12} have a solution?
    Answer: k≡1,5,9(mod12)k \equiv 1, 5, 9 \pmod{12} Two congruences x≡a(modm)x \equiv a \pmod{m} and x≡b(modn)x \equiv b \pmod{n} have a common solution exactly when a≡b(modgcd⁡(m,n))a \equiv b \pmod{\gcd(m, n)}. Here gcd⁡(8,12)=4\gcd(8, 12) = 4, so we need k≡5≡1(mod4)k \equiv 5 \equiv 1 \pmod{4}. Modulo 12, the residues with k≡1(mod4)k \equiv 1 \pmod{4} are k≡1,5,9(mod12)k \equiv 1, 5, 9 \pmod{12}. For example, k=1k = 1 works with x=13x = 13, and k=9k = 9 works with x=21x = 21. Requiring k≡5(mod8)k \equiv 5 \pmod{8} is too strict: it compares kk with the wrong modulus and would wrongly exclude k=1k = 1. The condition k≡3(mod4)k \equiv 3 \pmod{4} fails: x≡5(mod8)x \equiv 5 \pmod{8} forces x≡1(mod4)x \equiv 1 \pmod{4}, which contradicts x≡3(mod4)x \equiv 3 \pmod{4}. Not every kk works: k=0k = 0 would make xx even, but x≡5(mod8)x \equiv 5 \pmod{8} makes it odd.

Start this quiz