solution\[\begin{pmatrix} 2 & 2 & -1\\ 0 & 3 & 3\\ 4 & 1 & k \end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} 1\\ 3\\ -1 \end{pmatrix} \] The augmented matrix is\[\begin{pmatrix} 2 & 2 & -1 & 1\\ 0 & 3 & 3 & 3\\ 4 & 1 & k & -1 \end{pmatrix} \] We start by converting the above to Echelon form\[\begin{pmatrix} 2 & 2 & -1 & 1\\ 0 & 3 & 3 & 3\\ 4 & 1 & k & -1 \end{pmatrix} \overset{R_{3}=R_{3}-2R_{1}}{\longrightarrow }\begin{pmatrix} 2 & 2 & -1 & 1\\ 0 & 3 & 3 & 3\\ 0 & -3 & k+2 & -3 \end{pmatrix} \overset{R_{3}=R_{3}+R_{2}}{\longrightarrow }\begin{pmatrix} 2 & 2 & -1 & 1\\ 0 & 3 & 3 & 3\\ 0 & 0 & k+5 & 0 \end{pmatrix} \] We see that the last equation now has the form\[ \left ( k+5\right ) x_{3}=0 \] If \(k+5=n\neq 0\) then the equation becomes \(nx_{3}=0\), which means \(x_{3}=0\) is only choice, since \(n\neq 0\). This means, from the second equation, \(3x_{2}+3x_{3}=3\) or \(x_{2}=1\) and from the first equation, \(2x_{1}+2x_{2}-x_{3}=1\) or \(2x_{1}+2=1\) or \(x_{1}=\frac{-1}{2}\). Hence a unique solution. But if \(k+5=0\) then last equation gives \(0x_{3}=0\), which means any \(x_{3}\) will do the job. Hence infinite number of solutions.
Therefore, (i) \(k\neq -5\) gives unique solution. (ii) Not possible. (iii) \(k=-5\) gives infinite solutions.
solution\[\begin{pmatrix} 2 & 0 & -2\\ -1 & 1 & k\\ 3 & 1 & 4 \end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} 8\\ 4\\ 20 \end{pmatrix} \] The augmented matrix is\[\begin{pmatrix} 2 & 0 & -2 & 8\\ -1 & 1 & k & 4\\ 3 & 1 & 4 & 20 \end{pmatrix} \] We start by converting the above to Echelon form. Swap the second and third row\[\begin{pmatrix} 2 & 0 & -2 & 8\\ 3 & 1 & 4 & 20\\ -1 & 1 & k & 4 \end{pmatrix} \] Now\[\begin{pmatrix} 2 & 0 & -2 & 8\\ 3 & 1 & 4 & 20\\ -1 & 1 & k & 4 \end{pmatrix} \overset{R_{2}=R_{2}-\frac{3}{2}R_{1}}{\underset{R_{3}=R_{3}+\frac{1}{2}R_{1}}{\longrightarrow }}\begin{pmatrix} 2 & 0 & -2 & 8\\ 0 & 1 & 7 & 8\\ 0 & 1 & k-1 & 8 \end{pmatrix} \overset{R_{3}=R_{3}-R_{2}}{\longrightarrow }\begin{pmatrix} 2 & 0 & -2 & 8\\ 0 & 1 & 7 & 8\\ 0 & 0 & k-8 & 0 \end{pmatrix} \] From last equation, we obtain \(\left ( k-8\right ) x_{3}=0\).
(i) No solution case is not possible.
(ii) When \(k\neq 8\), then unique solution. Hence \(x_{3}=0\). Which means from second equation that \(x_{2}=8\) and from first equation, \(2x_{1}=8\) or \(x_{1}=4.\)\[\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} 4\\ 8\\ 0 \end{pmatrix} \] (iii) infinite number of solutions when \(k=8\). This gives \(0\left ( x_{3}\right ) =0\), hence any \(x_{3}\) will do the job. Let \(x_{3}=t\), the second equation gives \(x_{2}+7t=8\) or \(x_{2}=8-7t.\) and the first equation gives \(2x_{1}-2t=8\) or \(x_{1}=4-t\). Hence solution is\begin{align*} \begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} & =\begin{pmatrix} 4-t\\ 8-7t\\ t \end{pmatrix} \\ & =\begin{pmatrix} 4\\ 8\\ 0 \end{pmatrix} +t\begin{pmatrix} -1\\ -7\\ 1 \end{pmatrix} \end{align*}
solution
\[\begin{pmatrix} 2 & 1 & 3\\ 0 & p & 0\\ -1 & -2 & 4 \end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} 1\\ 1\\ 3 \end{pmatrix} \] The augmented matrix is\[\begin{pmatrix} 2 & 1 & 3 & 1\\ 0 & p & 0 & 1\\ -1 & -2 & 4+\frac{3}{2} & 3 \end{pmatrix} \overset{R_{3}=R_{3}+\frac{1}{2}R_{1}}{\longrightarrow }\begin{pmatrix} 2 & 1 & 3 & 1\\ 0 & p & 0 & 1\\ 0 & -\frac{3}{2} & \frac{11}{2} & \frac{7}{2}\end{pmatrix} \overset{R_{3}=R_{3}+\frac{3}{2p}R_{2}}{\longrightarrow }\begin{pmatrix} 2 & 1 & 3 & 1\\ 0 & p & 0 & 1\\ 0 & 0 & \frac{11}{2} & \frac{1}{2p}\left ( 7p+3\right ) \end{pmatrix} \] We now convert the above to reduced Echelon form. First we make each leading entry \(1\)\[\begin{pmatrix} 1 & \frac{1}{2} & \frac{3}{2} & \frac{1}{2}\\ 0 & 1 & 0 & \frac{1}{p}\\ 0 & 0 & 1 & \frac{1}{p}\frac{\left ( 7p+3\right ) }{11}\end{pmatrix} \] Now we zero out all entries in column above leading entries\[\begin{pmatrix} 1 & \frac{1}{2} & \frac{3}{2} & \frac{1}{2}\\ 0 & 1 & 0 & \frac{1}{p}\\ 0 & 0 & 1 & \frac{1}{p}\frac{\left ( 7p+3\right ) }{11}\end{pmatrix} \overset{R_{1}=R_{1}-\frac{1}{2}R_{2}}{\longrightarrow }\begin{pmatrix} 1 & 0 & \frac{3}{2} & \frac{1}{2p}\left ( p-1\right ) \\ 0 & 1 & 0 & \frac{1}{p}\\ 0 & 0 & 1 & \frac{1}{p}\frac{\left ( 7p+3\right ) }{11}\end{pmatrix} \overset{R_{1}=R_{1}-\frac{3}{2}R_{3}}{\longrightarrow }\begin{pmatrix} 1 & 0 & 0 & -\frac{5}{11p}\left ( p+2\right ) \\ 0 & 1 & 0 & \frac{1}{p}\\ 0 & 0 & 1 & \frac{1}{p}\frac{\left ( 7p+3\right ) }{11}\end{pmatrix} \] Hence, the last equation says\[ x_{3}=\frac{1}{p}\frac{\left ( 7p+3\right ) }{11}\] Therefore, if \(7p+3\neq 0\) then \(x_{3}\) is parameterized by \(p\) and we have infinite number of solutions. In this case the solution vector is\[\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} -\frac{5}{11p}\left ( p+2\right ) \\ \frac{1}{p}\\ \frac{1}{p}\frac{\left ( 7p+3\right ) }{11}\end{pmatrix} \] But if \(7p+3=0\) then \(x_{3}=0\), and this means \(p=-\frac{3}{7}\). Then from second equation we obtain \(x_{2}=\frac{-7}{3}\) and from first equation \(x_{1}=-\frac{5}{11\left ( -\frac{3}{7}\right ) }\left ( -\frac{3}{7}+2\right ) =\frac{5}{3}\). Hence in this case the solution is unique\[\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} \frac{5}{3}\\ \frac{-7}{3}\\ 0 \end{pmatrix} \] In both cases, we assumed \(p\neq 0\). It is no possible to obtain the case (ii) which is no solution.
\[\begin{pmatrix} 1 & 1 & 2\\ 2 & p & 4\\ 3 & p+1 & 6 \end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} 1\\ 2\\ p+1 \end{pmatrix} \] The augmented matrix is\[\begin{pmatrix} 1 & 1 & 2 & 1\\ 2 & p & 4 & 2\\ 3 & p+1 & 6 & p+1 \end{pmatrix} \overset{R_{2}=R_{2}-2R_{1}}{\underset{R_{3}=R_{3}-3R_{1}}{\longrightarrow }}\begin{pmatrix} 1 & 1 & 2 & 1\\ 0 & p-2 & 0 & 0\\ 0 & p-2 & 0 & p-2 \end{pmatrix} \overset{R_{3}=R_{3}-R_{2}}{\longrightarrow }\begin{pmatrix} 1 & 1 & 2 & 1\\ 0 & p-2 & 0 & 0\\ 0 & 0 & 0 & p-2 \end{pmatrix} \] We see from last equation that \(0\left ( x_{3}\right ) =p-2\). This means that if \(p-2\neq 0\) then there is no solution. This means if \(p\neq 2\) then no solution. On the other hand, if \(p=2\) then last equation becomes \(0\left ( x_{3}\right ) =0\), which means any \(x_{3}\) will do. Let \(x_{3}=t\). From second equation, we have\begin{align*} \left ( p-2\right ) x_{2} & =0\\ 0\left ( x_{2}\right ) & =0 \end{align*}
So any \(x_{2}\) will do. Let \(x_{2}=s\). Then the first equation becomes \(x_{1}+s+2t=1\) or \(x_{1}=1-s-2t\). Hence solution vector\[\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} 1-s-2t\\ s\\ t \end{pmatrix} =\begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix} +s\begin{pmatrix} -1\\ 1\\ 0 \end{pmatrix} +t\begin{pmatrix} -2\\ 0\\ 1 \end{pmatrix} \] Case (ii) do not apply. This is two family solution.
\[\begin{pmatrix} -2 & 3 & p\\ 4 & \frac{3}{2} & 2\\ 3 & 3 & \frac{5}{2}\end{pmatrix}\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} 1\\ 2\\ \frac{5}{2}\end{pmatrix} \] The augmented matrix is\[\begin{pmatrix} -2 & 3 & p & 1\\ 4 & \frac{3}{2} & 2 & 2\\ 3 & 3 & \frac{5}{2} & \frac{5}{2}\end{pmatrix} \overset{R_{2}=R_{2}+2R_{1}}{\underset{R_{3}=R_{3}+\frac{3}{2}R_{1}}{\longrightarrow }}\begin{pmatrix} -2 & 3 & p & 1\\ 0 & \frac{15}{2} & 2+2p & 4\\ 0 & \frac{15}{2} & \frac{5}{2}+\frac{3}{2}p & 4 \end{pmatrix} \overset{R_{3}=R_{3}-R_{2}}{\longrightarrow }\begin{pmatrix} -2 & 3 & p & 1\\ 0 & \frac{15}{2} & 2+2p & 4\\ 0 & 0 & \frac{1}{2}-\frac{1}{2}p & 0 \end{pmatrix} \] Last equation gives \(\left ( \frac{1}{2}-\frac{1}{2}p\right ) x_{3}=0\). If \(\frac{1}{2}-\frac{1}{2}p=0\) or \(p=1,\) then there are infinite number of solutions. Let \(x_{3}=t\). From second equation, \(\frac{15}{2}x_{2}+\left ( 2+2p\right ) x_{3}=4\) or \(\frac{15}{2}x_{2}+4t=4\), which gives \(x_{2}=\frac{8}{15}-\frac{8}{15}t\) and from first equation \(-2x_{1}+3x_{2}+x_{3}=1\) or \(-2x_{1}+3\left ( \frac{8}{15}-\frac{8}{15}t\right ) +t=1\), hence \(x_{1}=\frac{3}{10}-\frac{3}{10}t\). The solution vector is\[\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} \frac{3}{10}-\frac{3}{10}t\\ \frac{8}{15}-\frac{8}{15}t\\ t \end{pmatrix} \] If \(\frac{1}{2}-\frac{1}{2}p\neq 0\), then last equation gives \(nx_{3}=0\) which is only possible if \(x_{3}=0\). This means if \(p\neq 1\), then \(x_{3}=0\). Second equation gives \(\frac{15}{2}x_{2}=4\) or \(x_{2}=\frac{8}{15}\) and first equation gives \(-2x_{1}+3x_{2}+x_{3}=1\) or \(-2x_{1}+3\left ( \frac{8}{15}\right ) =1\), or \(x_{1}=\frac{3}{10}\), hence solution vector is\[\begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\end{pmatrix} =\begin{pmatrix} \frac{3}{10}\\ \frac{8}{15}\\ 0 \end{pmatrix} \] case (ii) is not possible.