0

Let $Ax=b$, as $A|b$ is given by:

$$\left(\begin{array}{ccc} 3 & 1 & 4\\ 5 & 2 & 6\\ 0 & 5 & 2 \end{array}\left|\begin{array}{c} 1\\ 5\\ 1 \end{array}\right.\right)$$

I want so solve the linear system: $$A\vec{x} = \vec{b} \mod{7}$$

I am quite new to modular arithmetic. I know how to row reduce $[A|b]$ in $\mathbb{Z}_7$. I am not sure what this question demands though.

Is it asking to obtain $rref[A|b]$ over $\mathbb{Z}_7$ get the solution?


Edit: Based on the method commented below, I found rref(A|b) over $\mathbb{Z}_7$: $$ \begin{bmatrix} 1 & 0 & 0 & 4 \\ 0 & 1 & 0 & 3 \\ 0 & 0 & 1 & 0 \end{bmatrix} $$ which gives the solution to $A\vec{x} = b \mod{7}$ as $$ \vec{x} = \begin{pmatrix} 4 \\ 3 \\ 0 \end{pmatrix} $$

Noa Even
  • 2,875
  • is this a general question or do you have an equation system with numerical coefficients that you'd like to solve? – Noa Even Sep 19 '21 at 12:42
  • @Jneven There is a particular system: A = [3, 1, 4 \ 5, 2, 6 \ 0, 5, 2] and b = [1, 5, 1]^T – DubsVeer23 Sep 19 '21 at 12:44
  • Clearly $\det A=12$ so $A$ is invertible. Just compute the inverse of $A$ as usual and hence find $A^{-1}b$, or find rref of the augmented matrix, or any of the other equivalent methods. – user10354138 Sep 19 '21 at 12:53
  • @user10354138 thanks, you mean inv(A) over Z_7 or rref(A|b) over Z_7 like here https://math.stackexchange.com/questions/1156813/who-to-solve-this-linear-modular-equation-system?noredirect=1&lq=1 – DubsVeer23 Sep 19 '21 at 12:56
  • 1
    Computing the inverse is more work than using Gaussian elimination to convert to row echelon form. Just follow the steps in the answer to that question that you linked to. – TonyK Sep 19 '21 at 13:13

1 Answers1

1

You may solve it as if the system is over the ring $\mathbb{Z}$, and then convert it to $\mathbb{Z}_7$, but you'd probably need to preform more actions and it will be harder than by performing actions above $\mathbb{Z}_7$ from the beginning. Try to continue from here:

Thus: $ {\left(\begin{array}{ccc} 3 & 1 & 4\\ 5 & 2 & 6\\ 0 & 5 & 2 \end{array}\left|\begin{array}{c} 1\\ 5\\ 1 \end{array}\right.\right){\overset{R_{2}-4R_{1}\to R_{1}}{\Longrightarrow}}}\left(\begin{array}{ccc} 3 & 1 & 4\\ -7 & -2 & -10\\ 0 & 5 & 2 \end{array}\left|\begin{array}{c} 1\\ 1\\ 1 \end{array}\right.\right)$

and remember to convert these values to modulo 7.

Noa Even
  • 2,875
  • $\Bbb Z$ is not a field. So you can't solve it in $\Bbb Z$. – TonyK Sep 19 '21 at 13:02
  • 1
    @Jneven thanks, I got it: row reduce each and at each step get modulo 7. Finally I just have to read off the rref(A|b) which is the solution to the matrix equaiton. – DubsVeer23 Sep 19 '21 at 13:39