SOLUTION: Suppose that A is the matrix over Z7: A = 3 2 4 4 3 5 2 1 2. (a) Find the inverse of A in Z7. (b) Let b = 1 −4 9 Solve Ax = b in Z7.

Algebra ->  Matrices-and-determiminant -> SOLUTION: Suppose that A is the matrix over Z7: A = 3 2 4 4 3 5 2 1 2. (a) Find the inverse of A in Z7. (b) Let b = 1 −4 9 Solve Ax = b in Z7.      Log On


   



Question 1204571: Suppose that A is the matrix over Z7:
A =
3 2 4
4 3 5
2 1 2.
(a) Find the inverse of A in Z7.
(b) Let b =
1
−4
9
Solve Ax = b in Z7.

Answer by math_tutor2020(3817) About Me  (Show Source):
You can put this solution on YOUR website!

Part (a)

Let's ignore the Z7 notation for a moment.

For now we're just going to worry about finding the inverse.

The given matrix is
A+=+%28matrix%283%2C3%2C3%2C2%2C4%2C4%2C3%2C5%2C2%2C1%2C2%29%29
I'll place the 9 items in separate boxes
324
435
212


Append the 3x3 identity matrix to the right hand side like so
324100
435010
212001

The goal is to use matrix row reduction (i.e. Gauss-Jordan Elimination) to transform the left 3x3 block into the identity matrix.
The resulting right hand side will be the inverse.

324100
435010
212001

212001R1 <--> R3
435010
324100

11/21001/2(1/2)*R1 --> R1
435010
324100

11/21001/2
01101-2R2 - 4*R1 --> R2
324100

11/21001/2
01101-2
01/2110-3/2R3 - 3*R1 --> R3

11/21001/2
01101-2
001/21-1/2-1/2R3 - (1/2)*R2 --> R3

11/21001/2
01101-2
0012-1-12*R3 --> R3

Almost done. Just a few more steps.
11/21001/2
010-22-1R2 - R3 --> R2
0012-1-1

11/20-213/2R1 - R3 --> R1
010-22-1
0012-1-1

100-102R1 - (1/2)R2 --> R1
010-22-1
0012-1-1

Here is a very useful tool
http://www.math.odu.edu/~bogacki/lat/
It is called "linear algebra toolkit". It is a collection of matrix solvers that show step by step solutions. I recommend it to check your work.

We now have the left hand 3x3 block as the identity matrix.
The 3x3 block on the right hand side is the inverse.

The inverse of A+=+%28matrix%283%2C3%2C3%2C2%2C4%2C4%2C3%2C5%2C2%2C1%2C2%29%29 is A%5E%28-1%29+=+%28matrix%283%2C3%2C-1%2C0%2C2%2C-2%2C2%2C-1%2C2%2C-1%2C-1%29%29

This can be verified by showing that

and

I'll let the student do these two calculations to verify.


Now let's return to the idea of Z7.
This is the set of integers modulo 7. We look at the remainders when dividing over 7.
Those remainders are: {0,1,2,3,4,5,6}
If we have a value too large, then subtract off 7 repeatedly until landing on one of those remainders listed above.
For instance, start with 15 and subtract off two copies of 7 to get 15-7-7 = 1, which shows that 15/7 gives remainder 1.

If we have a value too small, then repeatedly add 7 until landing on one of the remainders.
Example: start with -2 and land on -2+7 = 5
It shows that -2 = 5 (mod 7)

So when we're working with Z7, then the inverse A%5E%28-1%29+=+%28matrix%283%2C3%2C-1%2C0%2C2%2C-2%2C2%2C-1%2C2%2C-1%2C-1%29%29 turns into A%5E%28-1%29+=+%28matrix%283%2C3%2C6%2C0%2C2%2C5%2C2%2C6%2C2%2C6%2C6%29%29

This wraps up part (a)

---------------------------------------------------------------------------------------------

Part (b)


Use the trick mentioned in the previous part to find that
-4 = 3 (mod 7)
9 = 2 (mod 7)

So,
b+=+%28matrix%283%2C1%2C1%2C-4%2C9%29%29+=+%28matrix%283%2C1%2C1%2C3%2C2%29%29 when in Z7.


The matrix equation Ax+=+b turns into A%5E%28-1%29%2AAx+=+A%5E%28-1%29%2Ab when we left-multiply both sides by the inverse of matrix A.


That turns into x+=+A%5E%28-1%29%2Ab

I'll skip steps, but you'll then perform matrix multiplication to get

Then we'll need to find the remainder of each of those items mod 7
10 = 3 (mod 7)
23 = 2 (mod 7)
32 = 4 (mod 7)

The final answer to part (b) is x+=+%28matrix%283%2C1%2C3%2C2%2C4%29%29

What this means is that
when in Z7.