## Free variables and parameters

Consider the system $$Ax = b$$ defined over the real numbers where $$A=\begin{bmatrix} 1 & 2 & 0 & 0 & -1 \\ 0 & 0 & 1 & 0 & 2 \\ 0 & 0 & 0 & 1 & 3 \end{bmatrix}$$, $$x = \begin{bmatrix} x_1\\x_2\\x_3\\x_4\\x_5\end{bmatrix}$$, and $$b = \begin{bmatrix} 4\\5\\6\end{bmatrix}$$. Note that $$A$$ is in reduced row-echelon form with no zero row. So the system has at least one solution. As there are two free variables $$x_2$$ and $$x_5$$, the system has infinitely many solutions. Is there a succint way to describe all the solutions?

The key is to set each free variable to a parameter. Here, setting $$x_2 = s$$ and $$x_5 = t$$, the system gives \begin{eqnarray} x_1 + 2s - t & = & 4 \\ x_3 + 2t & = & 5 \\ x_4 + 3t & = & 6 \\ \end{eqnarray} Solving for $$x_1$$, $$x_3$$, and $$x_4$$ gives $$x_1 = 4 - 2s + t$$, $$x_3 = 5-2t$$, $$x_4 = 6 - 3t$$.

So the solutions are $$\begin{bmatrix} x_1\\x_2\\x_3\\x_4\\x_5\end{bmatrix} = \begin{bmatrix} 4-2s+t\\s\\5-2t\\6-3t\\t\end{bmatrix} = \begin{bmatrix} 4\\0\\5\\6\\0\end{bmatrix} +s\begin{bmatrix} -2\\1\\0\\0\\0\end{bmatrix} +t\begin{bmatrix} 1\\0\\-2\\-3\\1\end{bmatrix}$$ where $$s$$ and $$t$$ are arbitrary numbers.

### Example over $$GF(2)$$

Consider the following system defined over $$GF(2)$$. \begin{eqnarray} x_1 + x_3 & = & 1\\ x_2 + x_3 & = & 0\\ \end{eqnarray} Here, $$x_3$$ is a free variable. So we can set $$x_3$$ to a paramter and write $$x_1$$ and $$x_2$$ in terms of $$x_3$$. As $$0$$ and $$1$$ are the only elements in $$GF(2)$$, there are only two solutions.

Setting $$x_3 = 0$$ gives the solution $$\begin{bmatrix} x_1\\x_2\\x_3\end{bmatrix} = \begin{bmatrix} 1\\0\\0\end{bmatrix}$$.

Setting $$x_3 = 1$$ gives the solution $$\begin{bmatrix} x_1\\x_2\\x_3\end{bmatrix} = \begin{bmatrix} 0\\1\\1\end{bmatrix}$$.

## Exercises

For each of the following system, give a succinct description of the set of solutions.

1. $$\begin{array}{r} x -y + z = 1 \\ y - 2z = 2 \end{array}$$

2. $$3x - 4y + z= 12$$

3. $$\begin{array}{r} x_1 - x_3 + x_4 = 0 \\ x_2 - 2x_4 = 0 \end{array}$$