# solve linear system using gaussian elimination

I want to solve a linear system of the form Ax=b.
First of all I create the augmented matrix (A|b). I apply some elementary row operations and i obtain the REF form of A.
After than, I do not know what variable to call L, say.

For example, A $$\begin{bmatrix} 0 & 1 & 1 \\ 1 & 1 & 1 \\ 3 & 1 & 1 \\ \end{bmatrix}$$

and the matrix b $$\begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix}$$

after the the EROs I obtain the matrix $$\begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \\ \end{bmatrix}$$

I then create two equations. (a) $a+b+c=0$ (b) $b+c=0$

I want to Write solutions in the general form x = v+L_1w_1 +...+L_kw_k, for vectors v and w_1...w_k and arbitrary scalars L_1...L_k

One idea is to let $c=L$. But I do not understand why.

Let $A = \begin{pmatrix} 0 & 1 & 1 \\ 1 & 1 & 1 \\ 3 & 1 & 1\end{pmatrix}$ and $b = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}$.

Solving $Ax = b$ using Gaussian elimination, we get:

\begin{align*} \left(\begin{array}{ccc|c} 0 & 1 & 1 & 0\\ 1 & 1 & 1 & 0\\ 3 & 1 & 1 &0 \\ \end{array}\right) &\to \left(\begin{array}{ccc|c} 0 & 1 & 1 & 0\\ 1 & 1 & 1 & 0\\ 0 & -2 & -2 &0 \\ \end{array}\right) \tag{\textrm{row3} - 3\times \textrm{row2}}\\ &\to \left(\begin{array}{ccc|c} 0 & 1 & 1 & 0\\ 1 & 0 & 0 & 0\\ 0 & -2 & -2 & 0 \\ \end{array}\right) \tag{\textrm{row2} - \textrm{row1}} \\ &\to \left(\begin{array}{ccc|c} 0 & 1 & 1 & 0\\ 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \\ \end{array}\right) \tag{\textrm{row3} + 2\times \textrm{row1}} \end{align*}

This means that our null space has dimension 1. That means that there is a vector that forms a basis for this null space. Let's call it $v$. Since it is a basis for the null space, then $Av = 0$, and any scalar multiple of $v$ will also lead to zero: $A (\alpha v) = 0$ for all values of $\alpha$.

From the above, we get $x = 0$ and $y = -z$. This means that our basis vector will look like: $\begin{pmatrix} 0 \\ y \\ -y\end{pmatrix}$. Since our basis vector times any scalar will still be in the null space, it doesn't matter what value we pick for $y$. Let's just pick $y= 1$. Then, our basis vector is $\begin{pmatrix} 0 \\ 1 \\ -1\end{pmatrix}$.

Let's check to see if that's right:

$$\begin{pmatrix} 0 & 1 & 1 \\ 1 & 1 & 1 \\ 3 & 1 & 1\end{pmatrix}\begin{pmatrix} 0 \\ 1 \\ -1\end{pmatrix} = \begin{pmatrix} 0+1\cdot 1 + 1\cdot (-1) \\ 1\cdot 0 + 1 \cdot 1 + 1\cdot (-1) \\ 3 \cdot 0 + 1\cdot 1 + 1 \cdot (-1) \end{pmatrix} = \begin{pmatrix} 0 \\ 0\\ 0\end{pmatrix}.$$

You can check to see that any vector of the form $\begin{pmatrix} 0 \\ a \\ -a\end{pmatrix}$ will be sent to $0$ by $A$.