Introductory Linear Algebra - Modular Arithmetic

In summary: The other way of thinking about it is to stop allowing negative numbers, and allow every number to have a unique representation in the set 0 to n-1. This is called the "principal representatives" model. By that model, 1 is the only solution to 5x= 1 (mod 6). Note that 1 is the only multiplicative inverse for 5 (mod 6), and 5 is the only multiplicative inverse for 1 (mod 6). In general, every number that is relatively prime to 6 has a multiplicative inverse (since the only factor 6 has is 2 and 3
  • #1
sunmaz94
42
0

Homework Statement



a) For which values of a does ax = 1 have a solution in Z5?
b) For which values of a does ax = 1 have a solution in Z6?
c) For which values of a and m does ax = 1 have a solution in Zm?

Homework Equations



None.

The Attempt at a Solution



Answers:

a) All a ≠ 0
b) a = 1, 5
c) a and m have no common factors other than 1 [i.e., the gcd of a and m is 1].Please explain, in detail, why these are the answers and how one arrives at them. I honestly haven't the faintest clue. Thanks.
 
Physics news on Phys.org
  • #2
a) It's not that hard to just do the calculations. if a= 1, then ax= x= 1 has the obvious solution. If a= 2, it is easy to see that ax= 2x= 1 has the solution x= 3 because 2(3)= 6 = 1 mod 5. If a= 3, it is just as easyto see that ax= 3x= 1 has the solution x= 2 for the same reason. If a= 4, ax= 4x= 1 has the solution x= 4 because 4(4)= 16= 1 mod 5.

b) If a= 1, ax= x= 1 has the obvious solution. If a= 2, 2x= 1 has NO solution because 2x is always even and will never be 1 more than a multiple of 6. If a= 3, 3x= 1 has NO solution because 3x is alway a multiple of 3 and will never be 1 more than a multiple of 6. If a= 4, 4x is again even. If a= 5, 5x= 1 when x= 5, 5(5)= 25= 1 mod 6.

c) Put those ideas together. If m and a have a common factor n> 1, then any multiple of a, ax, will be a multiple of n and so cannot be 1 more than m which is also a mutiple of n.
 
Last edited by a moderator:
  • #3
Have you seen the following:

a has a multiplicative inverse in [tex]\mathbb{Z}_n[/tex] if and only if gcd(a,n)=1.

If not, try to prove it. To prove it, you most likely need Bezout's theorem...
 
  • #4
Thanks.
 
  • #5
HallsofIvy said:
a) It's not that hard to just do the calculations. if a= 1, then ax= x= 1 has the obvious solution. If a= 2, it is easy to see that ax= 2x= 1 has the solution x= 3 because 2(3= 6 = 1 mod 5. If a= 3, it is just as easyto see that ax= 3x= 1 has the solution x= 2 for the same reason. If a= 4, ax= 4x= 1 has the solution x= 4 because 4(4)= 16= 1 mod 5.

b) If a= 1, ax= x= 1 has the obvious solution. If a= 2, 2x= 1 has NO solution because 2x is always even and will never be 1 more than a multiple of 6. If a= 3, 3x= 1 has NO solution because 3x is alway a multiple of 3 and will never be 1 more than a multiple of 6. If a= 4, 4x is again even. If a= 5, 5x= 1 when x= 5, 5(5)= 25= 1 mod 6.

c) Put those ideas together. If m and a have a common factor n> 1, then any multiple of a, ax, will be a multiple of n and so cannot be 1 more than m which is also a mutiple of n.

Great. Thank you very much!
 
  • #6
On a)

What if a is not an integer, as in a = 0.23?

Then x = 1/0.23 = 4.3478...

It can't be just 'all a in Z except 0', because it is valid for a=0.2, but it still doesn't seem to be valid for all real nubers, e.g. a=0.23.

Note the question mentions the solution must be in Z mod 5, it does not constrain the constant. Or does it?
 
Last edited:
  • #7
We take both a and x to be in [itex]\mathbb{Z}[/itex]. This is the usual convention to deal with modular arithmetic.
 
  • #8
Thanks. I am new to somewhat serious maths. Is that true only when dealing with modular arithmetic or more generally too? If there are regularities in those seemingly arbitrary decisions, what are they?
 
Last edited:
  • #9
HallsofIvy said:
a) It's not that hard to just do the calculations. if a= 1, then ax= x= 1 has the obvious solution. If a= 2, it is easy to see that ax= 2x= 1 has the solution x= 3 because 2(3)= 6 = 1 mod 5. If a= 3, it is just as easyto see that ax= 3x= 1 has the solution x= 2 for the same reason. If a= 4, ax= 4x= 1 has the solution x= 4 because 4(4)= 16= 1 mod 5.

b) If a= 1, ax= x= 1 has the obvious solution. If a= 2, 2x= 1 has NO solution because 2x is always even and will never be 1 more than a multiple of 6. If a= 3, 3x= 1 has NO solution because 3x is alway a multiple of 3 and will never be 1 more than a multiple of 6. If a= 4, 4x is again even. If a= 5, 5x= 1 when x= 5, 5(5)= 25= 1 mod 6.

c) Put those ideas together. If m and a have a common factor n> 1, then any multiple of a, ax, will be a multiple of n and so cannot be 1 more than m which is also a mutiple of n.

Could the answer for b) a = 1, 5 also include 7, since 7(1)= 7= 1 mod 6.

.
 
  • #10
crni said:
Could the answer for b) a = 1, 5 also include 7, since 7(1)= 7= 1 mod 6.

.
And 13= 2(6)+1= 1 (mod 6), and -5= -1(6)+ 1= 1 (mod 6), and 19= 3(6)+ 1= 1 (mod 6), ... Where do you stop?

There are a couple of different ways of thinking about modular arithmetic. In introductory course, which this appears to be, we restrict the possible values for the numbers, "modulo n", to be 0 to n-1. A slightly more sophisticated way of looking at it is to say that two numbers are "equivalent", modulo n, if their difference is evenly divisible by n and look at "equivalence classes". Typically, we identify a equilence class by the smallest non-negative number in it as its "representative".

Here, using the first way, we only consider the numbers 0 to 5 so 7 would not be an answer. The second way 1 and 7 are in the same equivalence class so are not different answers. Either "1" or "7" would be a correct answer but the convention would be to give "1" as the smallest non-negative member of the set.
 
  • #11
HallsofIvy said:
And 13= 2(6)+1= 1 (mod 6), and -5= -1(6)+ 1= 1 (mod 6), and 19= 3(6)+ 1= 1 (mod 6), ... Where do you stop?

There are a couple of different ways of thinking about modular arithmetic. In introductory course, which this appears to be, we restrict the possible values for the numbers, "modulo n", to be 0 to n-1. A slightly more sophisticated way of looking at it is to say that two numbers are "equivalent", modulo n, if their difference is evenly divisible by n and look at "equivalence classes". Typically, we identify a equilence class by the smallest non-negative number in it as its "representative".

Here, using the first way, we only consider the numbers 0 to 5 so 7 would not be an answer. The second way 1 and 7 are in the same equivalence class so are not different answers. Either "1" or "7" would be a correct answer but the convention would be to give "1" as the smallest non-negative member of the set.

Yes, actually I was thinking 13, 19, etc. as well, but mentioned only 7. Thanks, this explanation makes the answer clear.
 

Related to Introductory Linear Algebra - Modular Arithmetic

1. What is modular arithmetic?

Modular arithmetic is a mathematical system that deals with numbers and their remainders when divided by a fixed number, known as the modulus. It is often used to simplify calculations involving large numbers or in cryptography.

2. What is the purpose of modular arithmetic in introductory linear algebra?

Modular arithmetic is used in introductory linear algebra to understand the concept of vector spaces, linear transformations, and matrices, as well as to solve systems of linear equations. It also helps in understanding the properties of determinants and eigenvalues of matrices.

3. How is modular arithmetic used to solve systems of linear equations?

Modular arithmetic can be used to reduce the size of numbers in a system of linear equations, making it easier to solve. It also allows for the use of techniques such as Gaussian elimination to find solutions to these systems.

4. What are some real-world applications of modular arithmetic?

Modular arithmetic is used in many real-world applications, including computer science, cryptography, coding theory, and engineering. It is also used in the design of calendars, musical scales, and repeating patterns in architecture and art.

5. Are there any limitations to using modular arithmetic in linear algebra?

While modular arithmetic can be a useful tool in linear algebra, it does have some limitations. For example, it cannot be used in fields such as complex numbers, which are essential in many areas of mathematics. It also does not work well with non-linear equations or systems that involve irrational numbers.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
623
  • Calculus and Beyond Homework Help
Replies
3
Views
118
  • Calculus and Beyond Homework Help
Replies
15
Views
965
  • Calculus and Beyond Homework Help
Replies
3
Views
3K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
949
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
13
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
734
  • Calculus and Beyond Homework Help
Replies
3
Views
929
Back
Top