How to solve variables of a matrix?

61 Views Asked by At

I have the following system of linear equations.

\begin{aligned} 2x+ky+2z &=0 \\ x-y+z &=1 \\ y-z &=k \end{aligned}

Using the augmented matrix, I get

$$\begin{bmatrix} 2 &k &2 &0 \\ 1 &-1& 1& 1 \\ 0 &1& -1 &k \end{bmatrix}$$

Putting it into row echelon form, I get

$$\begin{bmatrix} 1 & k/2& 1 & 0 \\ 0 & 1 & -1 & k\\ 0 & 0 & 1 & -\dfrac{(k²+2· k+2}{k+2} \end{bmatrix}$$

This is the reduced echelon form I get. Yes I could get others. Yes I could get much simpler ones. But THIS is the one I am working with .

I get the solution of $z=-\dfrac{(k²+2· k+2)}{k+2}$.

I am not sure how to expand that negative sign in front of the brackets, this is the result from my calculator. Any help would be great ;))

I then find y to be equal to $y=k+z$. I get $y=\dfrac{4k+4}{k+2}$.

Then $x$ would be equal to $k+1$, but what I get is $x=-k-1$.

So practically I am having some issues computing the solutions of this problem. I know the system is consistent when $k$ is NOT equal to $-2$, if it might be of use. I am just curious to know if $x=k+1$ is the real answer, and if so, how to get there with algebra (which I'm pretty bad at ). Moreover, any help on trying to see if my $y$ is correct would be great.

Edit: i checked the answers, on the calculator, i get x=k+1

z=-2/(k+2)

and y=-(k²+2· k+2)/k+2

I imagine my problem is EXACTLY this x solution :I don't know how to expand it properly . I don't get what is multiplied, if 2 · (k+2) or (2· k)+2

2

There are 2 best solutions below

12
On

Your $z$ is correct, but not your $y$: from $y=k+z$, you obtain $$y=k-\dfrac{k²+2k+2}{k+2}=\dfrac{k(k+2)-(k²+2k+2)}{k+2}=-\dfrac{2}{k+2}$$ and the second equation yields $$x=1+(y-z)=1+k\qquad\text{by the third equation}.$$

2
On

Let's examine the row reduction: \begin{align} \begin{bmatrix} 2 &k &2 &0 \\ 1 &-1& 1& 1 \\ 0 &1& -1 &k \end{bmatrix} &\to \begin{bmatrix} 1 &k/2 &1 &0 \\ 1 &-1& 1& 1 \\ 0 &1& -1 &k \end{bmatrix} &&R_1\gets\tfrac{1}{2}R_1 \\[6px]&\to \begin{bmatrix} 1 &k/2 &1 &0 \\ 0 &-1-k/2& 0& 1 \\ 0 &1& -1 &k \end{bmatrix} &&R_2\gets R_2-R_1 \\[6px]&\to \begin{bmatrix} 1 &k/2 &1 &0 \\ 0 &1& 0& -2/(k+2) \\ 0 &1& -1 &k \end{bmatrix} &&R_2\gets -\tfrac{2}{k+2}R_2 \\[6px]&\to \begin{bmatrix} 1 &k/2 &1 &0 \\ 0 &1& 0& -\tfrac{2}{k+2} \\ 0 &0& -1 &\tfrac{k^2+2k+2}{k+2} \end{bmatrix} &&R_3\gets R_3-R_2 \\[6px]&\to \begin{bmatrix} 1 &k/2 &1 &0 \\ 0 &1& 0& -\tfrac{2}{k+2} \\ 0 &0& 1 &-\tfrac{k^2+2k+2}{k+2} \end{bmatrix} &&R_3\gets -R_3 \\[6px]&\to \begin{bmatrix} 1 &k/2 &0 & \tfrac{k^2+2k+2}{k+2} \\ 0 &1& 0& -\tfrac{2}{k+2} \\ 0 &0& 1 &-\tfrac{k^2+2k+2}{k+2} \end{bmatrix} &&R_1\gets R_1-R_3 \\[6px]&\to \begin{bmatrix} 1 &0 &0 & k+1 \\ 0 &1& 0& -\tfrac{2}{k+2} \\ 0 &0& 1 &-\tfrac{k^2+2k+2}{k+2} \end{bmatrix} &&R_1\gets R_1-\tfrac{k}{2}R_2 \end{align}

This assuming $k\ne-2$. When $k=-2$ the second step above yields \begin{bmatrix} 1 & -1 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 1 & -1 & -2 \end{bmatrix} and the row reduction goes on like \begin{align} &\to \begin{bmatrix} 1 & -1 & 1 & 0 \\ 0 & 1 & -1 & -2 \\ 0 & 0 & 0 & 1 \end{bmatrix} &&R_3\leftrightarrow R_2 \end{align} so the system has no solution.