System of equation with 'free variable'

Randyyy

Junior Member
Joined
May 14, 2020
Messages
113
Hey, the following task is to solve the system of equation below. By using the method of elimination eventually I get the solution that [MATH]x_1 = 1 - \dfrac{3x_3}{5}, x_2 = - \dfrac{x_3}{5}[/MATH] but it seems that [MATH]x_3[/MATH] is a 'free variable' and doing a bit of research, this to my understanding meant that the system of equation has got infinite amount of solutions because the free variable can attain infinitely many values that satisfy the system of equation below. But I also found that if there are p rows and q variables, if p=q then I should have no free variable. How come then I manage to have a free variable? The answers are correct according to Wolfram so I am a bit confused.
linalg.png
 
Last edited:
I also found that if there are p rows and q variables, if p=q then I should have no free variable. Not true at all! If p=q AND the equations are linearly independent then and only then is your statement true.

p equations are dependent if one of the p equations can be obtained from the other p-1 equations.

Example: equation 2 can be obtained from equation 1 by multiplying eq1 by 3.

x+2y = 6
3x+6y =18

The above system has two equations and two unknown, so p=q=2

Try solving that system and post back.
 
Interesting, this is almost like solving the equation x+2y=6 in itself which will never yield a solution (although wolfram somehow did: y=3-(x/2). Here´s my attempt at the system above that are linearly dependent ( I think that´s correctly worded?)

[MATH]x+2y=6 \iff x=6-2y[/MATH][MATH]3(6-2y)+6y=18[/MATH] if we expand we get 18=18, [MATH]6y-6y+18=18[/MATH]
is the takeaway here that if I have p=equations and q=variables, if and only if p=q and they are linearly independent will it yield in a solution for every variable and if one of the 3 turns out to be linearly dependent then I will be left with a free variable?

I googled bit to check how I can determine if they are linearly dependent or not because if we take a look at the system above you cant really multiply by 2,4 etc to get the same values. I found this though:

"you can take the vectors to form a matrix and check its determinant. If the determinant is non zero, then the vectors are linearly independent. Otherwise, they are linearly dependent. "
 
Wolfram did NOT find a unique solution. The solution is x+2y = 6 or ANY other way of writing that equation or an equivalent equation.

Yes, what you wrote above is true.

There are many ways to check if a system of equations will have a UNIQUE solution if p=q. The easiest is by computing the determinant.
 
Wolfram did NOT find a unique solution. The solution is x+2y = 6 or ANY other way of writing that equation or an equivalent equation.
ah you are right, I should have looked more carefully, all they did was isolate y to get that answer. if we Isolate x we get another answer and if we keep it as x+2y=6 we have yet another one. I checked and it turns out that the determinant of my system of equation = 0 which makes it linearly dependent, very interesting! (granted I didn´t make any stupid errors but it seems to support the claim since we have a free variable)

It actually makes so much sense now. Thank you Jomo for correcting my incomplete/incorrect statement I made earlier in the thread and giving clear examples. :)
 
Last edited:
The equations are
\(\displaystyle x_1+ 2x_2+x_3= 1\)
\(\displaystyle 2x_1- x_2+ x_3=2\)
\(\displaystyle 4x_1+ 3x_2+3x_3= 4\)

I notice that if we multiply the second equation by 2 add add the first equation, we eliminate \(\displaystyle x_2\):
\(\displaystyle 5x_1+ 3x_3= 5\) so \(\displaystyle 5x_1= 5- 3x_3\) and then \(\displaystyle x_1= 1- \frac{3}{5}x_3\) as you say. I also notice that multiplying the first equation by 2 and subtracting the second equation eliminates \(\displaystyle x_1\):
\(\displaystyle 5x_2+ x_3= 0\) so \(\displaystyle 5x_2= -x_3\) and then \(\displaystyle x_2= -\frac{1}{5}x_3\), also as you say.

But I haven't used the third equation, \(\displaystyle 4x_1+ 3x_2+ 3x_3= 4\)! Replacing \(\displaystyle x_1\) with \(\displaystyle 1- \frac{3}{5}x_3\) and \(\displaystyle x_2\) with \(\displaystyle -\frac{1}{5}x_3\) in that equation we get \(\displaystyle \frac{12}{5}x_3-\frac{3}{5}x_3+ 3x_3=\left(\frac{12}{5}-\frac{3}{5}+ \frac{15}{5}\right)x= \frac{24}{5}x=4\) so that \(\displaystyle x_3= \frac{20}{24}= \frac{5}{6}\) and now we can calculate the precise values of \(\displaystyle x_1\) and \(\displaystyle x_2\).
 
I followed your lead HallsofIvy and inserting the values we get that x1=1-(3/5)*(5/6) = 1/2 and x2 = -(1/5)(5/6) = -1/6 and x3 of course is 5/6. I tried plugging them into the three equations and it works! But how come Wolfram and other mathematical software (namely Mathematica) could not find a solution to the system?' They gave the same result and with Mathematica it could only give me 2 variables at a time, 3 variables was invalid as it apparently wasn't able to be solved and I received similar equations as above depending on what variables I chose. mm.png
(Note that (x1,x2,x3)=(x,y,z) in the picture above.)
This is the output received from both Mathematica and Wolfram. So just to clarify, this isn't the full solution? The complete solution to the system of equation above is [MATH]x_1=\frac{1}{2}, x_2 =- \frac{1}{6}, x_3 = \frac{5}{6}[/MATH]?
 
But I haven't used the third equation, \(\displaystyle 4x_1+ 3x_2+ 3x_3= 4\)! Replacing \(\displaystyle x_1\) with \(\displaystyle 1- \frac{3}{5}x_3\) and \(\displaystyle x_2\) with \(\displaystyle -\frac{1}{5}x_3\) in that equation we get \(\displaystyle \frac{12}{5}x_3-\frac{3}{5}x_3+ 3x_3=\left(\frac{12}{5}-\frac{3}{5}+ \frac{15}{5}\right)x= \frac{24}{5}x=4\) so that \(\displaystyle x_3= \frac{20}{24}= \frac{5}{6}\) and now we can calculate the precise values of \(\displaystyle x_1\) and \(\displaystyle x_2\).
No, the equation becomes 0 = 0, so the system is dependent as claimed.
 
[MATH]x_1 = 1 - \frac{3}{5}x_3, x_2 =- \frac{1}{5}x_3[/MATH] we have that [MATH]4x_1+3x_2+3x_3=4 \iff 4(1-\frac{3x_3}{5})+\frac{12x_3}{5} = 4-\frac{12x_3}{5}+\frac{12x_3}{5}+4=4[/MATH] and this gives 4=4 or 0=0 like Dr.Peterson said. So my final answer would be that [MATH]x_1 = 1 - \frac{3}{5}x_3, x_2 = - \frac{1}{5}x_3[/MATH] and [MATH]x_3[/MATH] is a free variable and there are infinitely many solutions to the system of equations because there are infinitely many values [MATH]x_3[/MATH] can attain that satisfies the system of equation above. I checked and this seems to be the correct conclusion. [MATH]x_3=\frac{5}{6},\frac{9}{10}[/MATH] etc are a few solutions to the system above.

Also, I'd like to Thank HallsofIvy and Dr.Peterson for the help as well, I appreciate it!
 
Last edited:
ah you are right, I should have looked more carefully, all they did was isolate y to get that answer. if we Isolate x we get another answer and if we keep it as x+2y=6 we have yet another one.

It actually makes so much sense now. Thank you Jomo for correcting my incomplete/incorrect statement I made earlier in the thread and giving clear examples. :)
I am glad that I was of help. That doesn't happen often enough.

Above you keep saying that you are getting different answers which is not true. x+2y =6, -2x - 4y = -12, x+2y -6 =0, x =6-2y, y = 3 -x/2 and many others are not different answers. They may be different ways of expressing the same answer but they represent the same answer.
 
Top