# system of equations

#### Yankel

##### Active member
Hello

I have been trying to solve this system of equations, I need to find for which values of k the system has infinite number of solutions, no solution and a single solution.

I did some work, and found that for k=0 and k=1 there are infinite number of solutions and for k=-2 there is no solution.

However, for k=0 I ran this system on Maple and it found a single solution. What did I do wrong here ?

thank you !

#### CaptainBlack

##### Well-known member
Hello

I have been trying to solve this system of equations, I need to find for which values of k the system has infinite number of solutions, no solution and a single solution.

I did some work, and found that for k=0 and k=1 there are infinite number of solutions and for k=-2 there is no solution.

However, for k=0 I ran this system on Maple and it found a single solution. What did I do wrong here ?

View attachment 308

thank you !
You cannot set $$k^2+k-2=0$$ since you then need an implicit division by zero to get a solution which is wrong since the last equation is $$0 \times x_3=0$$ when $$k=0$$

CB

#### Yankel

##### Active member
if I solve k^2+k−2=0 I get k=1,-2

where is the division by zero comes in ?

what is the solution then ?

#### CaptainBlack

##### Well-known member
if I solve k^2+k−2=0 I get k=1,-2

where is the division by zero comes in ?

what is the solution then ?
Because you have already divided by 0.

You started out with a system of simultaneous equations $${\bf{A}} (k) {\bf{x}} ={\bf{c}}$$ to which you applies Gaussian elimination to the augmented system and that gave a last equation: $$(k^3+k^2-2k)x_3=k^2-k$$ which leaves $$x_3$$ undetermined when $$k=0$$.

What you get when you set $$k^3+k^2-2k=0$$ are the values of $$k$$ for which either no solution exists or there are an infinity of solutions, if $$k^3+k^2-2k=0$$ and $$k^2-k=0$$ you have an infinity of solutions, if $$k^3+k^2-2k=0$$ and $$k^2-k\ne 0$$ you have no solutions.

CB

Last edited:

#### soroban

##### Well-known member
Hello, Yankel!

I've been trying to solve this system of equations: .]$$\left|\begin{array}{ccc|c} k&1&1 & 1 \\ 1&k&1 & 1 \\ 1&1&k & 1 \end{array}\right|$$

I need to find values of $$k$$ for which the system has
an infinite number of solutions, no solution, and a single solution.

The system has no solution if the determinent is zero.

$$D \;=\;\begin{vmatrix}k&1&1 \\ 1&k&1 \\ 1&1&k\end{vmatrix} \;=\;k\begin{vmatrix}k&1\\1&k\end{vmatrix} - 1\begin{vmatrix}1&1\\1&k\end{vmatrix} + 1\begin{vmatrix}1&k \\ 1&1\end{vmatrix} \;=\;0$$

. . $$k(k^2-1) - (k-1) + (1-k) \:=\:0 \quad\Rightarrow\quad k^3 - k - k + 1 + 1 - k \:=\:0$$

. . $$k^3 - 3k + 2 \:=\:0 \quad\Rightarrow\quad (k-1)^2(k+2) \:=\:0 \quad\Rightarrow\quad k \:=\: 1,\:\text{-}2$$

The system has no solutions if $$k = 1$$ or $$k = \text{-}2.$$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Solve the system.

$$\text{We have: }\:\left|\begin{array}{ccc|c} k&1&1&1 \\ 1&k&1&1 \\ 1&1&k&1\end{array}\right|$$

$$\begin{array}{c}\text{Switch} \\ R_1 \& R_2 \\ \end{array}\:\left|\begin{array}{ccc|c} 1&k&1&1 \\ k&1&1&1 \\ 1&1&k&1 \end{array}\right|$$

$$\begin{array}{c} \\ \\ R_2-kR_1 \\ R_3-R_1 \end{array}\:\left|\begin{array}{ccc|c}1&k&1&1 \\ 0&1-k^2 & 1-k & 1-k \\ 0 & 1-k & k-1 & 0 \end{array}\right|$$

$$\begin{array}{c} \\ \\ \\ \tfrac{1}{1-k^2}R_2 \\ \tfrac{1}{1-k}R_3 \end{array}\:\left|\begin{array}{ccc|c} 1&k&1 \\ 0&1&\tfrac{1}{k+1} & \tfrac{1}{k+1} \\ 0 & 1 & \text{-}1 & 0 \end{array}\right|$$

$$\begin{array}{c}R_1 - kR_2 \\ \\ \\ \\ R_3-R_2 \end{array}\:\left|\begin{array}{ccc|c}1 & 0 & \tfrac{1}{k+1} & \tfrac{1}{k+1} \\ 0 & 1 & \tfrac{1}{k+1} & \tfrac{1}{k+1} \\ 0 & 0 & \text{-}\tfrac{k+2}{k+1} & \text{-}\tfrac{1}{k+1} \end{array}\right|$$

$$\begin{array}{c}\\ \\ \\ \\ \\ \\ \text{-}\tfrac{k+1}{k+2}R_3 \end{array}\:\left|\begin{array}{ccc|c} 1 & 0 & \tfrac{1}{k+1} & \tfrac{1}{k+1} \\ 0&1&\tfrac{1}{k+1} & \tfrac{1}{k+1} \\ 0&0&1& \tfrac{1}{k+2} \end{array}\right|$$

$$\begin{array}{c}R_1 - \tfrac{1}{k+1}R_3 \\ R_2 - \tfrac{1}{k+1}R_3 \\ \\ \\ \end{array}\:\left|\begin{array}{ccc|c}1&0&0 & \tfrac{1}{k+2} \\ 0&1&0 & \tfrac{1}{k+2} \\ 0&0&1 & \tfrac{1}{k+2} \end{array}\right|$$

The system has a solution for any $$k \ne \text{-}2$$

That's strange!
If $$k =1$$, a solution is: .$$\left|\begin{array}{ccc|c}1&0&0 & \tfrac{1}{3} \\ 0&1&0 & \tfrac{1}{3} \\ 0&0&1 & \tfrac{1}{3} \end{array}\right|$$

Yet in the first stage, we saw that $$k = 1$$ makes the determinant zero.
Can anyone explain this?

#### Opalg

##### MHB Oldtimer
Staff member
I have been trying to solve this system of equations, I need to find for which values of k the system has infinite number of solutions, no solution and a single solution.

I did some work, and found that for k=0 and k=1 there are infinite number of solutions and for k=-2 there is no solution.

However, for k=0 I ran this system on Maple and it found a single solution. What did I do wrong here ?

View attachment 308
The unwanted "$k=0$" came in when you multiplied a row of the matrix by $k$, as for example in the row operation $R_2\to kR_2 - R_1.$ The row operation that is allowed in the Gaussian reduction process is to add a multiple of one row to another row. In this case that would allow the operation $R_2\to R_2-\frac1k R_1$, but not $R_2\to kR_2 - R_1.$ However, that goes wrong when $k=0$ because of the fraction $\frac1k.$ So you need to investigate the case $k=0$ separately to see whether or not the solution is unique in that case.

The system has no solution if the determinent is zero.
That is not quite right. If you have a system of $n$ linear equations in $n$ variables, then it has a unique solution if the determinant (of the coefficients in the equations) is nonzero. If the determinant is zero then the system has either no solution or infinitely many solutions.