# How do you solve using gaussian elimination or gauss-jordan elimination, x+y+z=1, x+y-2z=3, x+2y+z=2?

Jul 11, 2018

The solution is $\left(\begin{matrix}x \\ y \\ y\end{matrix}\right) = \left(\begin{matrix}\frac{2}{3} \\ 1 \\ - \frac{2}{3}\end{matrix}\right)$

#### Explanation:

Perform the Jordan-Gauss elimination on the augmented matrix

$A = \left(\begin{matrix}1 & 1 & 1 & | & 1 \\ 1 & 1 & - 2 & | & 3 \\ 1 & 2 & 1 & | & 2\end{matrix}\right)$

The pivot is in the first colum and the first row.

Eliminate the first column by performing the row operations

$R 2 \leftarrow R 2 - R 1$ and $R 3 \leftarrow R 3 - R 1$

$\left(\begin{matrix}1 & 1 & 1 & | & 1 \\ 0 & 0 & - 3 & | & 2 \\ 0 & 1 & 0 & | & 1\end{matrix}\right)$

Swap the last two rows

$R 2 \leftrightarrow R 3$

$\left(\begin{matrix}1 & 1 & 1 & | & 1 \\ 0 & 1 & 0 & | & 1 \\ 0 & 0 & - 3 & | & 2\end{matrix}\right)$

The pivot is in the second row and second column

Eliminate the second column

$R 1 \leftarrow R 1 - R 2$

$\left(\begin{matrix}1 & 0 & 1 & | & 0 \\ 0 & 1 & 0 & | & 1 \\ 0 & 0 & - 3 & | & 2\end{matrix}\right)$

Make the pivot in the third row of third column

$R 3 \leftarrow R 3 \cdot \left(- \frac{1}{3}\right)$

$\left(\begin{matrix}1 & 0 & 1 & | & 0 \\ 0 & 1 & 0 & | & 1 \\ 0 & 0 & 1 & | & - \frac{2}{3}\end{matrix}\right)$

Eliminate the third column

$R 1 \leftarrow R 1 - R 3$

$\left(\begin{matrix}1 & 0 & 0 & | & \frac{2}{3} \\ 0 & 1 & 0 & | & 1 \\ 0 & 0 & 1 & | & - \frac{2}{3}\end{matrix}\right)$

The solution is

$\left(\begin{matrix}x \\ y \\ y\end{matrix}\right) = \left(\begin{matrix}\frac{2}{3} \\ 1 \\ - \frac{2}{3}\end{matrix}\right)$