Subjects linear algebra

Gaussian Elimination

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Gaussian Elimination


1. Solve the system \(\{x_1 + x_2 + 2x_3 = 8, -x_1 - 2x_2 + 3x_3 = 1, 3x_1 - 7x_2 + 4x_3 = 10\}\) by Gaussian elimination. Step 1: Write augmented matrix:\ $$\begin{bmatrix}1 & 1 & 2 & | & 8 \\ -1 & -2 & 3 & | & 1 \\ 3 & -7 & 4 & | & 10\end{bmatrix}$$ Step 2: Add row 1 to row 2:\ $$\begin{bmatrix}1 & 1 & 2 & | & 8 \\ 0 & -1 & 5 & | & 9 \\ 3 & -7 & 4 & | & 10\end{bmatrix}$$ Step 3: Subtract 3*row 1 from row 3:\ $$\begin{bmatrix}1 & 1 & 2 & | & 8 \\ 0 & -1 & 5 & | & 9 \\ 0 & -10 & -2 & | & -14\end{bmatrix}$$ Step 4: Multiply row 2 by -1:\ $$\begin{bmatrix}1 & 1 & 2 & | & 8 \\ 0 & 1 & -5 & | & -9 \\ 0 & -10 & -2 & | & -14\end{bmatrix}$$ Step 5: Add 10*row 2 to row 3:\ $$\begin{bmatrix}1 & 1 & 2 & | & 8 \\ 0 & 1 & -5 & | & -9 \\ 0 & 0 & -52 & | & -104\end{bmatrix}$$ Step 6: Solve for \(x_3\):\ $$-52x_3 = -104 \implies x_3 = 2$$ Step 7: Substitute \(x_3=2\) into row 2:\ $$x_2 - 5(2) = -9 \implies x_2 - 10 = -9 \implies x_2 = 1$$ Step 8: Substitute \(x_2=1, x_3=2\) into row 1:\ $$x_1 + 1 + 2(2) = 8 \implies x_1 + 1 + 4 = 8 \implies x_1 = 3$$ Answer 1: \(x_1=3, x_2=1, x_3=2\). --- 2. Solve \(\{2x_1 + 2x_2 + 2x_3 = 0, -2x_1 + 5x_2 + 2x_3 = 1, 8x_1 + x_2 + 4x_3 = -1\}\). Step 1: Matrix:\ $$\begin{bmatrix}2 & 2 & 2 & | & 0 \\ -2 & 5 & 2 & | & 1 \\ 8 & 1 & 4 & | & -1\end{bmatrix}$$ Step 2: Divide row 1 by 2:\ $$\begin{bmatrix}1 & 1 & 1 & | & 0 \\ -2 & 5 & 2 & | & 1 \\ 8 & 1 & 4 & | & -1\end{bmatrix}$$ Step 3: Add 2*row 1 to row 2:\ $$\begin{bmatrix}1 & 1 & 1 & | & 0 \\ 0 & 7 & 4 & | & 1 \\ 8 & 1 & 4 & | & -1\end{bmatrix}$$ Step 4: Subtract 8*row 1 from row 3:\ $$\begin{bmatrix}1 & 1 & 1 & | & 0 \\ 0 & 7 & 4 & | & 1 \\ 0 & -7 & -4 & | & -1\end{bmatrix}$$ Step 5: Add row 2 and row 3:\ $$\begin{bmatrix}1 & 1 & 1 & | & 0 \\ 0 & 7 & 4 & | & 1 \\ 0 & 0 & 0 & | & 0\end{bmatrix}$$ Step 6: Solve for \(x_2\) and \(x_3\) from row 2:\ $$7x_2 + 4x_3 = 1$$ Step 7: Express \(x_2 = \frac{1 - 4x_3}{7}\) and \(x_1 = -x_2 - x_3\) Answer 2: \(x_1 = - \frac{1-4x_3}{7} - x_3,\ x_2=\frac{1 - 4x_3}{7},\ x_3=\text{free}\). --- 3. Solve \(\{x - y + 2z - w = -1, 2x + y - 2z - 2w = -2, - x + 2y - 4z + w = 1, 3x - 3w = -3\}\). Step 1: Matrix form:\ $$\begin{bmatrix}1 & -1 & 2 & -1 & | & -1 \\ 2 & 1 & -2 & -2 & | & -2 \\ -1 & 2 & -4 & 1 & | & 1 \\ 3 & 0 & 0 & -3 & | & -3\end{bmatrix}$$ Step 2: Solve last equation for \(x\):\ $$3x - 3w = -3 \implies x - w = -1 \implies x = w -1$$ Step 3: Substitute \(x=w-1\) into first three equations: Equation 1: \(w -1 - y + 2z - w = -1 \Rightarrow -y + 2z -1 = -1 \Rightarrow -y + 2z = 0 \Rightarrow y = 2z\) Equation 2: \(2(w-1) + y - 2z - 2w = -2 \Rightarrow 2w - 2 + y - 2z - 2w = -2 \Rightarrow y - 2z - 2 = -2 \Rightarrow y - 2z = 0 \Rightarrow y = 2z\) Equation 3: \(- (w-1) + 2y - 4z + w = 1 \Rightarrow -w + 1 + 2y - 4z + w = 1 \Rightarrow 2y -4z +1 = 1 \Rightarrow 2y -4z = 0 \Rightarrow y = 2z\) Step 4: All three consistently give \(y=2z\). Step 5: Variables in terms of \(z, w\):\ $$x = w-1,\ y= 2z,\ z=z,\ w=w$$ Answer 3: Infinite solutions parameterized by \(z, w\). --- 4. Solve \(\{-2b + 3c = 1, 3a + 6b - 3c = -2, 6a + 6b + 3c = 5\}\). Step 1: Write matrix:\ $$\begin{bmatrix}0 & -2 & 3 & | & 1 \\ 3 & 6 & -3 & | & -2 \\ 6 & 6 & 3 & | & 5\end{bmatrix}$$ Step 2: Swap row 1 and row 2 to get leading a coefficient: $$\begin{bmatrix}3 & 6 & -3 & | & -2 \\ 0 & -2 & 3 & | & 1 \\ 6 & 6 & 3 & | & 5\end{bmatrix}$$ Step 3: Divide row 1 by 3: $$\begin{bmatrix}1 & 2 & -1 & | & -\frac{2}{3} \\ 0 & -2 & 3 & | & 1 \\ 6 & 6 & 3 & | & 5\end{bmatrix}$$ Step 4: Subtract 6*row 1 from row 3: $$\begin{bmatrix}1 & 2 & -1 & | & -\frac{2}{3} \\ 0 & -2 & 3 & | & 1 \\ 0 & -6 & 9 & | & 9\end{bmatrix}$$ Step 5: Multiply row 2 by -1/2: $$\begin{bmatrix}1 & 2 & -1 & | & -\frac{2}{3} \\ 0 & 1 & -\frac{3}{2} & | & -\frac{1}{2} \\ 0 & -6 & 9 & | & 9\end{bmatrix}$$ Step 6: Add 6*row 2 to row 3: $$\begin{bmatrix}1 & 2 & -1 & | & -\frac{2}{3} \\ 0 & 1 & -\frac{3}{2} & | & -\frac{1}{2} \\ 0 & 0 & 0 & | & 6\end{bmatrix}$$ Step 7: The last row reads \(0=6\) which is a contradiction. Answer 4: No solution (system inconsistent).