We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This is how I solved it.
I used eqation 2 to find y w.r.t x,z and b
y=(1/2)(b-x-z)
applying that value to equation 1 and equation 2 I get
(2a-1)x+b+3z=0
3x+b+(2a-1)z=0
If these two lines are parallel then there will be no solution. i.e. if the slope the two lines are equal. I differentiated the two equations w.r.t x I got
dz/dx=-(2a-1)/3
and
dz/dx=-3/(2a-1)
from the above, I get a=-1,2
Since -1<2. -1 is our answer.
We can also get the same answer by equating ratios of coeeficients.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Linear Algebra Foundations #8 - Systems of Equations
You are viewing a single comment's thread. Return to all comments →
This is how I solved it. I used eqation 2 to find y w.r.t x,z and b y=(1/2)(b-x-z) applying that value to equation 1 and equation 2 I get (2a-1)x+b+3z=0 3x+b+(2a-1)z=0 If these two lines are parallel then there will be no solution. i.e. if the slope the two lines are equal. I differentiated the two equations w.r.t x I got dz/dx=-(2a-1)/3 and dz/dx=-3/(2a-1) from the above, I get a=-1,2 Since -1<2. -1 is our answer. We can also get the same answer by equating ratios of coeeficients.