Solving matrix using Gaussian elimination and a parameter

773 Views Asked by At

$\begin{bmatrix} x_{1} & 2x_{2} & & & ax_{5} & x_{6} & = & -2 \\ -x_{1} & -2x_{2} & & & (-1-a)x_{5} & -x_{6} & = & 3 \\ -2x_{1} & -4x_{2} & -x_{3} & 2x_{4} & a^{2}x_{5} & & = & 7 \\ x_{1} & 2x_{2} & x_{3} & -2x_{4} & (a+2)x_{5} & -x_{6} & = & -6 \end{bmatrix} $

Solve the set of equations using parameter 'a'.

1

There are 1 best solutions below

0
On BEST ANSWER

It's a lot shorter to write as an augmented matrix if you can get used to the style:

$\left[\begin{array}{cccccc|c} 1 & 2 & 0 & 0 & a & 1 & -2 \\ -1 & -2 & 0 & 0 & -1-a & -1 & 3 \\ -2 & -4 & -1 & 2 & a^{2} & 0 & 7 \\ 1 & 2 & 1 & -2 & a+2 & -1 & -6 \end{array}\right]$

Row 2 $\leftarrow$ Row 2 + Row 1; Row 3 $\leftarrow$ Row 3 + 2(Row 1); Row 4 $\leftarrow$ Row 4 - Row 1

$\left[\begin{array}{cccccc|c} 1 & 2 & 0 & 0 & a & 1 & -2 \\ 0 & 0 & 0 & 0 & -1 & 0 & 1 \\ 0 & 0 & -1 & 2 & a^{2}+2a & 2 & 3 \\ 0 & 0 & 1 & -2 & 2 & -2 & -4 \end{array}\right]$

Row 2 $\leftrightarrow$ Row 4

$\left[\begin{array}{cccccc|c} 1 & 2 & 0 & 0 & a & 1 & -2 \\ 0 & 0 & 1 & -2 & 2 & -2 & -4 \\ 0 & 0 & -1 & 2 & a^{2}+2a & 2 & 3 \\ 0 & 0 & 0 & 0 & -1 & 0 & 1 \\ \end{array}\right]$

Row 3 $\leftarrow$ Row 3 + Row 2; Row 4 = Row 4 $\times (-1)$

$\left[\begin{array}{cccccc|c} 1 & 2 & 0 & 0 & a & 1 & -2 \\ 0 & 0 & 1 & -2 & 2 & -2 & -4 \\ 0 & 0 & 0 & 0 & a^{2}+2a+2 & 0 & -1 \\ 0 & 0 & 0 & 0 & 1 & 0 & -1 \\ \end{array}\right]$

Row 3 $\leftrightarrow$ Row 4

$\left[\begin{array}{cccccc|c} 1 & 2 & 0 & 0 & a & 1 & -2 \\ 0 & 0 & 1 & -2 & 2 & -2 & -4 \\ 0 & 0 & 0 & 0 & 1 & 0 & -1 \\ 0 & 0 & 0 & 0 & a^{2}+2a+2 & 0 & -1 \\ \end{array}\right]$

What happens next depends on whether $a^2+2a+2=0$. If so, the last line of the matrix tells us the system is inconsistent and we stop. Assuming $a\in\mathbb{R}$ there are no solutions to $a^2+2a+2=0$ and we continue:

Row 4 $\leftarrow$ Row 4 / $(a^{2}+2a+2)$

$\left[\begin{array}{cccccc|c} 1 & 2 & 0 & 0 & a & 1 & -2 \\ 0 & 0 & 1 & -2 & 2 & -2 & -4 \\ 0 & 0 & 0 & 0 & 1 & 0 & -1 \\ 0 & 0 & 0 & 0 & 1 & 0 & -1 / (a^{2}+2a+2) \\ \end{array}\right]$

Row 4 $\leftarrow$ Row 4 - Row 3

$\left[\begin{array}{cccccc|c} 1 & 2 & 0 & 0 & a & 1 & -2 \\ 0 & 0 & 1 & -2 & 2 & -2 & -4 \\ 0 & 0 & 0 & 0 & 1 & 0 & -1 \\ 0 & 0 & 0 & 0 & 0 & 0 & (a^2+2a+1) / (a^{2}+2a+2) \\ \end{array}\right]$

Now consistency requires $a^2+2a+1=0$, which has only 1 solution: $a=-1$.

$\left[\begin{array}{cccccc|c} 1 & 2 & 0 & 0 & -1 & 1 & -2 \\ 0 & 0 & 1 & -2 & 2 & -2 & -4 \\ 0 & 0 & 0 & 0 & 1 & 0 & -1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \end{array}\right]$

You can start back-substituting now, but let's continue to reduced row-echelon form:

Row 1 $\leftarrow$ Row 1 + Row 3; Row 2 $\leftarrow$ Row 2 - 2(Row 3)

$\left[\begin{array}{cccccc|c} 1 & 2 & 0 & 0 & 0 & 1 & -3 \\ 0 & 0 & 1 & -2 & 0 & -2 & -2 \\ 0 & 0 & 0 & 0 & 1 & 0 & -1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \end{array}\right]$ which we can read as: $\begin{array}{l} x_1+2x_2+x_6=-3\\ x_3 -2x_4 -2x_6 = -2 \\ x_5 = -1 \\ {} \end{array}$

Columns 2,4,6 have no leading 1s, so $x_2,x_4,x_6$ become free parameters and we express the other variables in terms of those. We can write the equations as:

$\begin{bmatrix}x_1\\x_2\\x_3\\x_4\\x_5\\x_6\end{bmatrix}=\begin{bmatrix}-2x_2&&-x_6&-3\\x_2&&\\&2x_4&+2x_6&-2\\&x_4&&\\&&&-1\\&&x_6\end{bmatrix}=x_2 \begin{bmatrix}-2\\1\\0\\0\\0\\0\end{bmatrix}+x_4\begin{bmatrix}0\\0\\2\\1\\0\\0\end{bmatrix}+x_6\begin{bmatrix}-1\\0\\2\\0\\0\\1\end{bmatrix}+\begin{bmatrix}-3\\0\\-2\\0\\-1\\0\end{bmatrix}$

Any arithmetic errors are not mine but are the fault of Satan's affine transformations.