## A system over several fields

Solve the following system of equations over $$\mathbb Z_5, \mathbb Z_7$$ and $$\mathbb R$$.
$$\begin{array}{rlrlrlr} x_1 &+& 2x_2 &+& 4x_3 &=\ & 3 \\ 3 x_1 &+& x_2 &+& 2x_3 &=\ & 4 \\ 2 x_1 &+& 4x_2 &+& x_3 &=\ & 3 \\ \end{array}$$
Over $$\mathbb Z_5$$: $$\left(\begin{array}{ccc|c} 1 & 2 & 4 & 3 \\ 3 & 1 & 2 & 4 \\ 2 & 4 & 1 & 3 \\ \end{array}\right) \sim \left(\begin{array}{ccc|c} 1 & 2 & 4 & 3 \\ 0 & 0 & 3 & 2 \\ 0 & 0 & 0 & 0 \\ \end{array}\right)$$ hence $$\mathbf x=(2{,}0,4)^T+(3{,}1,0)^Tp$$.
Over $$\mathbb Z_7$$: $$\left(\begin{array}{ccc|c} 1 & 2 & 4 & 3 \\ 3 & 1 & 2 & 4 \\ 2 & 4 & 1 & 3 \\ \end{array}\right) \sim \left(\begin{array}{ccc|c} 1 & 2 & 4 & 3 \\ 0 & 2 & 4 & 2 \\ 0 & 0 & 0 & 4 \\ \end{array}\right)$$, i.e. the system has no solution.
Over $$\mathbb R$$: $$\left(\begin{array}{ccc|c} 1 & 2 & 4 & 3 \\ 3 & 1 & 2 & 4 \\ 2 & 4 & 1 & 3 \\ \end{array}\right) \sim \left(\begin{array}{ccc|c} 1 & 2 & 4 & 3 \\ 0 & 1 & 2 & 1 \\ 0 & 0 & 7 & 3 \\ \end{array}\right)$$, hence $$\mathbf x=(1{,}1/7{,}3/7)^T$$.