# Section 5.2 In this section we want to convert a system of equations to an augmented matrix: $$ \underset{\text{Linear system of equations}}{\underbrace{\begin{cases} x+3y+2z & =1\\ 2x+y-z & =2\\ x+y+z & =2 \end{cases}}}\to\underset{\text{Augmented Matrix}}{\underbrace{\left[\begin{matrix}1 & 3 & 2\\ 2 & 1 & -1\\ 1 & 1 & 1 \end{matrix}\left|\begin{matrix}1\\ 2\\ 2 \end{matrix}\right.\right]}} $$ :::{prf:property} :label: matrixRowTrans For any augmented matrix of a system of linear equations, the following **row transformations** will result in the matrix of an equivalent system 1. Interchange any two rows 1. Multiply or divide the elements of any row by a nonzero real number. 1. Replace any row of the matrix by the sum of the elements of that row and a multiple of th element of another row. ::: :::{prf:property} :label: gaussJordanMethod Using the Gauss-Jordan Method to Transform a Matrix into Diagonal Form (Reduced Row Echelon Form) 1. Obtain 1 as the first element of the first column 1. Use the first row to transform the remaining entries in the first column to zero. 1. Obtain 1 as the second entry in the second column. 1. Use the second row to transform the remaining entries in the second column to zero. 1. Continue in this manner as far as possible. ::: The goal for Gauss-Jordan Method is the following use row transformations. \begin{align*} \underset{\text{Linear system of equations}}{\underbrace{\begin{cases} x+3y+2z & =1\\ 2x+y-z & =2\\ x+y+z & =2 \end{cases}}} & \to\underset{\text{Augmented Matrix}}{\underbrace{\left[\begin{matrix}1 & 3 & 2\\ 2 & 1 & -1\\ 1 & 1 & 1 \end{matrix}\left|\begin{matrix}1\\ 2\\ 2 \end{matrix}\right.\right]}}\\ & \vdots \text{ Row Transformations}\\ & \to\left[\begin{matrix}1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{matrix}\left|\begin{matrix}i\\ j\\ k \end{matrix}\right.\right] \end{align*} Which would then say the solution set for the system would be $\{(i,j,k)\}$. ## Two by Two Examples ::::{prf:example} :label: 22GJMethodExam1 Solve $$ \begin{cases} 3x-4y & =1\\ 5x+2y & =19 \end{cases} $$ :::{dropdown} Solution: First, we will write the system as an augmented matrix. $$ \begin{cases} 3x-4y & =1\\ 5x+2y & =19 \end{cases}\to\left[\begin{matrix}3 & -4\\ 5 & 2 \end{matrix}\left|\begin{matrix}1\\ 19 \end{matrix}\right.\right] $$ Next, we will do row transformation to get our solution set. \begin{align*} \left[\begin{matrix}3 & -4 & 1\\ 5 & 2 & 19 \end{matrix}\right] & \to_{\frac{1}{3}\times R_{1}}\left[\begin{matrix}1 & -\frac{4}{3} & \frac{1}{3}\\ 5 & 2 & 19 \end{matrix}\right]\\ & \to_{-5\times R_{1}+R_{2}}\left[\begin{matrix}1 & -\frac{4}{3} & \frac{1}{3}\\ 0 & \frac{26}{3} & \frac{52}{3} \end{matrix}\right]\\ & \to_{\frac{3}{26}\times R_{2}}\left[\begin{matrix}1 & -\frac{4}{3} & \frac{1}{3}\\ 0 & 1 & 2 \end{matrix}\right]\\ & \to_{\frac{4}{3}\times R_{2}+R_{1}}\left[\begin{matrix}1 & 0 & 3\\ 0 & 1 & 2 \end{matrix}\right] \end{align*} Therefore, the solution set is $\{(3,2)\}$. ::: :::: ::::{prf:example} :label: 22GJMethodExam2 Solve $$ \begin{cases} 2x+3y & =7\\ 3x-4y & =-32 \end{cases} $$ :::{dropdown} Solution: First, $$ \begin{cases} 2x+3y & =7\\ 3x-4y & =-32 \end{cases}\to\left[\begin{matrix}2 & 3\\ 3 & -4 \end{matrix}\left|\begin{matrix}7\\ -32 \end{matrix}\right.\right] $$ Then row operations \begin{align*} \left[\begin{matrix}2 & 3 & 7\\ 3 & -4 & -32 \end{matrix}\right] & \to_{\frac{1}{2}\times R_{1}}\left[\begin{matrix}1 & \frac{3}{2} & \frac{7}{2}\\ 3 & -4 & -32 \end{matrix}\right]\\ & \to_{-3\times R_{1}+R_{2}}\left[\begin{matrix}1 & \frac{3}{2} & \frac{7}{2}\\ 0 & -\frac{17}{2} & -\frac{85}{2} \end{matrix}\right]\\ & \to_{-\frac{2}{17}\times R_{2}}\left[\begin{matrix}1 & \frac{3}{2} & \frac{7}{2}\\ 0 & 1 & 5 \end{matrix}\right]\\ & \to_{-\frac{3}{2}\times R_{2}+R_{1}}\left[\begin{matrix}1 & 0 & -4\\ 0 & 1 & 5 \end{matrix}\right] \end{align*} Therefore, the solution set is $\{(-4,5)\}$. ::: :::: This example will show how a no solution looks like when using Gauss-Jordan Method. ::::{prf:example} :label: 22GJExam3 Solve $$ \begin{cases} x+y & =2\\ 2x+2y & =5 \end{cases} $$ :::{dropdown} Solution: First, $$ \begin{cases} x+y & =2\\ 2x+2y & =5 \end{cases}\to\left[\begin{matrix}1 & 1\\ 2 & 2 \end{matrix}\left|\begin{matrix}2\\ 5 \end{matrix}\right.\right] $$ Next, row transformations. $$ \left[\begin{matrix}1 & 1 & 2\\ 2 & 2 & 5 \end{matrix}\right]\to_{-2\times R_{1}+R_{2}}\left[\begin{matrix}1 & 1 & 2\\ 0 & 0 & 1 \end{matrix}\right] $$ The last row says $0x+0y=1$, or $0=1$. Since this is impossible we say the system has no solution. The solution set is the empty set, $\emptyset$. ::: :::: ## Three by Three Examples ::::{prf:exmaple} :label: 33GJExam1 Solve $$ \begin{cases} x-y+5z & =-6\\ 3x+3y-z & =10\\ x+3y+2z & =5 \end{cases} $$ :::{dropdown} Solution: First, $$ \begin{cases} x-y+5z & =-6\\ 3x+3y-z & =10\\ x+3y+2z & =5 \end{cases}\to\left[\begin{matrix}1 & -1 & 5\\ 3 & 3 & -1\\ 1 & 3 & 2 \end{matrix}\left|\begin{matrix}-6\\ 10\\ 5 \end{matrix}\right.\right] $$ Next, row transformations. \begin{align*} \left[\begin{matrix}1 & -1 & 5 & -6\\ 3 & 3 & -1 & 10\\ 1 & 3 & 2 & 5 \end{matrix}\right] & \to_{-3\times R_{1}+R_{2}}\left[\begin{matrix}1 & -1 & 5 & -6\\ 0 & 6 & -16 & 28\\ 1 & 3 & 2 & 5 \end{matrix}\right]\\ & \to_{-1\times R_{1}+R_{3}}\left[\begin{matrix}1 & -1 & 5 & -6\\ 0 & 6 & -16 & 28\\ 0 & 4 & -3 & 11 \end{matrix}\right]\\ & \to_{\frac{1}{6}\times R_{2}}\left[\begin{matrix}1 & -1 & 5 & -6\\ 0 & 1 & -\frac{8}{3} & \frac{14}{3}\\ 0 & 4 & -3 & 11 \end{matrix}\right]\\ & \to_{-4\times R_{2}+R_{3}}\left[\begin{matrix}1 & -1 & 5 & -6\\ 0 & 1 & -\frac{8}{3} & \frac{14}{3}\\ 0 & 0 & \frac{23}{3} & -\frac{23}{3} \end{matrix}\right]\\ & \to_{\frac{3}{23}\times R_{3}}\left[\begin{matrix}1 & -1 & 5 & -6\\ 0 & 1 & -\frac{8}{3} & \frac{14}{3}\\ 0 & 0 & 1 & -1 \end{matrix}\right]\implies z=-1\\ & \to_{R_{2}+R_{1}}\left[\begin{matrix}1 & 0 & \frac{7}{3} & -\frac{4}{3}\\ 0 & 1 & -\frac{8}{3} & \frac{14}{3}\\ 0 & 0 & 1 & -1 \end{matrix}\right]\\ & \to_{-\frac{7}{3}\times R_{3}+R_{1}}\left[\begin{matrix}1 & 0 & 0 & 1\\ 0 & 1 & -\frac{8}{3} & \frac{14}{3}\\ 0 & 0 & 1 & -1 \end{matrix}\right]\implies x=1\\ & \to_{\frac{8}{3}\times R_{3}+R_{2}}\left[\begin{matrix}1 & 0 & 0 & 1\\ 0 & 1 & 0 & 2\\ 0 & 0 & 1 & -1 \end{matrix}\right]\implies y=2 \end{align*} Therefore, the solution set is $\{(1,2,-1)\}$. ::: :::: The next example will not be using the Gauss-Jordan Method. Instead it will be using the Gauss Method. In this method we still want 1s along the diagonal and zeros below each 1; however, we will not attempts to to get zeros above all the 1s like in Gauss-Jordan Method. ::::{prf:example} :label: 33GExam1 Solve $$ \begin{cases} x+2y+z & =5\\ 2x-y+z & =-5\\ -3x+y-2z & =8 \end{cases} $$ :::{dropdown} Solution: First, $$ \begin{cases} x+2y+z & =5\\ 2x-y+z & =-5\\ -3x+y-2z & =8 \end{cases}\to\left[\begin{matrix}1 & 2 & 1\\ 2 & -1 & 1\\ -3 & 1 & -2 \end{matrix}\left|\begin{matrix}5\\ -5\\ 8 \end{matrix}\right.\right] $$ Next, we will only reduce to have leading ones and zeros below them. \begin{align*} \left[\begin{matrix}1 & 2 & 1 & 5\\ 2 & -1 & 1 & -5\\ -3 & 1 & -2 & 8 \end{matrix}\right] & \to_{-2\times R_{1}+R_{2}}\left[\begin{matrix}1 & 2 & 1 & 5\\ 0 & -5 & -1 & -15\\ -3 & 1 & -2 & 8 \end{matrix}\right]\\ & \to_{3\times R_{1}+R_{3}}\left[\begin{matrix}1 & 2 & 1 & 5\\ 0 & -5 & -1 & -15\\ 0 & 7 & 1 & 23 \end{matrix}\right]\\ & \to_{-\frac{1}{5}\times R_{2}}\left[\begin{matrix}1 & 2 & 1 & 5\\ 0 & 1 & \frac{1}{5} & 3\\ 0 & 7 & 1 & 23 \end{matrix}\right]\\ & \to_{-7\times R_{2}+R_{3}}\left[\begin{matrix}1 & 2 & 1 & 5\\ 0 & 1 & \frac{1}{5} & 3\\ 0 & 0 & -\frac{2}{5} & 2 \end{matrix}\right]\\ & \to_{-\frac{5}{2}\times R_{3}}\left[\begin{matrix}1 & 2 & 1 & 5\\ 0 & 1 & \frac{1}{5} & 3\\ 0 & 0 & 1 & -5 \end{matrix}\right] \end{align*} From the last row transformation we can "dump" back into a system of equations situation. $$ \begin{cases} x+2y+z & =5\\ y+\frac{1}{5}z & =3\\ z & =-5 \end{cases} $$ From here we see $z=-5$. Next, we will solve for $y$. \begin{align*} y+\frac{1}{5}(-5) & =3\\ y & =4 \end{align*} Now that we have $z$ and $y$ we can solve for $x$. \begin{align*} x+2(4)+(-5) & =5\\ x & =2 \end{align*} Therefore, the solution set for the system is $\{(2,4,-5)\}$. ::: :::: ## Two by Three Example Since the following two equations represent two different plane, the solution set will be infinite. Therefore, we will be representing the solution set in terms of $z$ for the $x$ and $y$ component. ::::{prf:example} :label: 23GJExam1 Solve $$ \begin{cases} 2x+y+z & =5\\ 3x+2y-z & =-8 \end{cases} $$ :::{dropdown} Solution: First, $$ \begin{cases} 2x+y+z & =5\\ 3x+2y-z & =-8 \end{cases}\to\left[\begin{matrix}2 & 1 & 1\\ 3 & 2 & -1 \end{matrix}\left|\begin{matrix}5\\ -8 \end{matrix}\right.\right] $$ Next, row transformations. \begin{align*} \left[\begin{matrix}2 & 1 & 1 & 5\\ 3 & 2 & -1 & -8 \end{matrix}\right] & \to_{\frac{1}{2}\times R_{1}}\left[\begin{matrix}1 & \frac{1}{2} & \frac{1}{2} & \frac{5}{2}\\ 3 & 2 & -1 & -8 \end{matrix}\right]\\ & \to_{-3\times R_{1}+R_{2}}\left[\begin{matrix}1 & \frac{1}{2} & \frac{1}{2} & \frac{5}{2}\\ 0 & \frac{1}{2} & -\frac{5}{2} & -\frac{31}{2} \end{matrix}\right]\\ & \to_{2\times R_{2}}\left[\begin{matrix}1 & \frac{1}{2} & \frac{1}{2} & \frac{5}{2}\\ 0 & 1 & -5 & -31 \end{matrix}\right]\\ & \to_{-\frac{1}{2}\times R_{2}+R_{1}}\left[\begin{matrix}1 & 0 & 3 & 18\\ 0 & 1 & -5 & -31 \end{matrix}\right]\\ & \to\begin{cases} x+3z & =18\\ y-5z & =-31 \end{cases} \end{align*} Therefore, the infinite solution set is $$\{(-3z+18,5z-31,z)\}$$ ::: ::::