Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store
seo-qna
SearchIcon
banner

How do you solve using the Gaussian elimination or gauss Jordan elimination, $2x+y-z+2w=-6$, $3x+4y+w=1$, $x+5y+2z+6w=-3$, $5x+2y-z-w=3$?

Answer
VerifiedVerified
516.9k+ views
Hint: Write the given equations in matrix form as $\left[ \begin{matrix}
   2 & 1 & -1 & 2 \\
   3 & 4 & 0 & 1 \\
   1 & 5 & 2 & 6 \\
   5 & 2 & -1 & -1 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -6 \\
   1 \\
   -3 \\
   3 \\
\end{matrix} \right]$ where the first matrix in the L.H.S is formed by the coefficients of given variables, second matrix contains the variables and the matrix in the R.H.S denotes the constant terms. Using gauss elimination method, make the first three elements of the fourth row, first two elements of the third row, first element of the second row of the matrix $\left[ \begin{matrix}
   2 & 1 & -1 & 2 \\
   3 & 4 & 0 & 1 \\
   1 & 5 & 2 & 6 \\
   5 & 2 & -1 & -1 \\
\end{matrix} \right]$ equal to 0 by performing several row operations. Similarly, use the same row operations in the matrix $\left[ \begin{matrix}
   -6 \\
   1 \\
   -3 \\
   3 \\
\end{matrix} \right]$. Finally, multiply the matrices present in the L.H.S and equate with the respective constant terms in the R.H.S to solve the equations easily.

Complete step by step answer:
Here we have been provided with four equations containing four variables and we are asked to solve the equations using the gauss elimination method or the gauss Jordan method. Here, we will apply the gauss elimination method.
$2x+y-z+2w=-6$
$3x+4y+w=1$
$x+5y+2z+6w=-3$
$5x+2y-z-w=3$
In Gauss elimination method first we write the given equations in matrix form as shown below:
$\left[ \begin{matrix}
   2 & 1 & -1 & 2 \\
   3 & 4 & 0 & 1 \\
   1 & 5 & 2 & 6 \\
   5 & 2 & -1 & -1 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -6 \\
   1 \\
   -3 \\
   3 \\
\end{matrix} \right]$
Now, we have to perform several row operations such that we get first three elements of the fourth row, first two elements of the third row, first element of the second row of the matrix $\left[ \begin{matrix}
   2 & 1 & -1 & 2 \\
   3 & 4 & 0 & 1 \\
   1 & 5 & 2 & 6 \\
   5 & 2 & -1 & -1 \\
\end{matrix} \right]$ equal to 0. Same row operations we need to perform in the matrix $\left[ \begin{matrix}
   -6 \\
   1 \\
   -3 \\
   3 \\
\end{matrix} \right]$ while leaving the matrix $\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]$ as it is. Once we are done with the above process we have to multiply the matrices in the L.H.S and compare with the constant terms in the R.H.S to solve for the variables. so let us perform the row operations.
$\Rightarrow \left[ \begin{matrix}
   2 & 1 & -1 & 2 \\
   3 & 4 & 0 & 1 \\
   1 & 5 & 2 & 6 \\
   5 & 2 & -1 & -1 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -6 \\
   1 \\
   -3 \\
   3 \\
\end{matrix} \right]$
Interchanging the rows ${{R}_{1}}$ and ${{R}_{3}}$ we have,
$\Rightarrow \left[ \begin{matrix}
   1 & 5 & 2 & 6 \\
   3 & 4 & 0 & 1 \\
   2 & 1 & -1 & 2 \\
   5 & 2 & -1 & -1 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -3 \\
   1 \\
   -6 \\
   3 \\
\end{matrix} \right]$
Performing the row operations ${{R}_{2}}={{R}_{2}}-3{{R}_{1}},{{R}_{3}}={{R}_{3}}-2{{R}_{1}},{{R}_{4}}={{R}_{4}}-5{{R}_{1}}$ we get,
$\Rightarrow \left[ \begin{matrix}
   1 & 5 & 2 & 6 \\
   0 & -11 & -6 & -17 \\
   0 & -9 & -5 & -10 \\
   0 & -23 & -11 & -31 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -3 \\
   10 \\
   0 \\
   18 \\
\end{matrix} \right]$
Performing the row operations ${{R}_{2}}=-9{{R}_{2}},{{R}_{3}}=11{{R}_{3}}$ we get,
$\Rightarrow \left[ \begin{matrix}
   1 & 5 & 2 & 6 \\
   0 & 99 & 54 & -153 \\
   0 & -99 & -55 & -110 \\
   0 & -23 & -11 & -31 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -3 \\
   -90 \\
   0 \\
   18 \\
\end{matrix} \right]$
Operating ${{R}_{2}}={{R}_{2}}+{{R}_{3}}$ and then interchanging the rows ${{R}_{2}}$ and ${{R}_{3}}$ we get,
$\Rightarrow \left[ \begin{matrix}
   1 & 5 & 2 & 6 \\
   0 & 99 & 54 & -110 \\
   0 & 0 & -1 & 43 \\
   0 & -23 & -11 & -31 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -3 \\
   0 \\
   -90 \\
   18 \\
\end{matrix} \right]$
Operating ${{R}_{2}}=\dfrac{23}{11}{{R}_{2}},{{R}_{4}}=9{{R}_{4}}$ we get,
$\Rightarrow \left[ \begin{matrix}
   1 & 5 & 2 & 6 \\
   0 & -207 & -115 & -230 \\
   0 & 0 & -1 & 43 \\
   0 & -207 & -99 & -279 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -3 \\
   0 \\
   -90 \\
   162 \\
\end{matrix} \right]$
Performing the row operation ${{R}_{4}}={{R}_{4}}-{{R}_{2}}$ we get,
$\Rightarrow \left[ \begin{matrix}
   1 & 5 & 2 & 6 \\
   0 & -207 & -115 & -230 \\
   0 & 0 & -1 & 43 \\
   0 & 0 & 16 & -49 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -3 \\
   0 \\
   -90 \\
   162 \\
\end{matrix} \right]$
Performing the row operations ${{R}_{2}}=\dfrac{1}{23}{{R}_{2}},{{R}_{3}}=16{{R}_{3}}$ we get,
$\Rightarrow \left[ \begin{matrix}
   1 & 5 & 2 & 6 \\
   0 & -9 & -5 & -10 \\
   0 & 0 & -16 & 688 \\
   0 & 0 & 16 & -49 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -3 \\
   0 \\
   -1440 \\
   162 \\
\end{matrix} \right]$
Operating ${{R}_{4}}={{R}_{4}}+{{R}_{3}}$ we get,
$\Rightarrow \left[ \begin{matrix}
   1 & 5 & 2 & 6 \\
   0 & -9 & -5 & -10 \\
   0 & 0 & -16 & 688 \\
   0 & 0 & 0 & 639 \\
\end{matrix} \right]\left[ \begin{matrix}
   x \\
   y \\
   z \\
   w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -3 \\
   0 \\
   -1440 \\
   -1278 \\
\end{matrix} \right]$
Therefore, we have made the required elements 0 so multiplying the matrices in the L.H.S and comparing with the respective constants in the matrix present in the R.H.S we get,
$\Rightarrow \left[ \begin{matrix}
   x+5y+2z+6w \\
   -9y-5z-10w \\
   -16z+688w \\
   639w \\
\end{matrix} \right]=\left[ \begin{matrix}
   -3 \\
   0 \\
   -1440 \\
   -1278 \\
\end{matrix} \right]$
Starting with the last row we get,
$\begin{align}
  & \Rightarrow 639w=-1278 \\
 & \Rightarrow w=-2 \\
\end{align}$
Substituting the third row we get,
$\begin{align}
  & \Rightarrow -16z+688\left( -2 \right)=-1440 \\
 & \Rightarrow -16z=-64 \\
 & \Rightarrow z=4 \\
\end{align}$
Substituting the second row we get,
$\begin{align}
  & \Rightarrow -9y-5\left( 4 \right)-10\left( -2 \right)=0 \\
 & \Rightarrow y=0 \\
\end{align}$
Substituting the first row we get,
$\begin{align}
  & \Rightarrow x+5\left( 0 \right)+2\left( 4 \right)+6\left( -2 \right)=-3 \\
 & \Rightarrow x=1 \\
\end{align}$

Hence, the solution set is given as (x, y, z, w) = (1, 0, 4, -2).

Note: Note that here we have used the gauss elimination method to solve the question. if we have to use the gauss Jordan elimination method then we have to perform more row operations in the matrix $\left[ \begin{matrix}
   1 & 5 & 2 & 6 \\
   0 & -9 & -5 & -10 \\
   0 & 0 & -16 & 688 \\
   0 & 0 & 0 & 639 \\
\end{matrix} \right]$ and convert it into a unit matrix. Finally, we have to multiply the matrices on the L.H.S and compare with the R.H.S just like we did above.