While determining the condition for the pair of straight line equation $$ax^2+2hxy+by^2+2gx+2fy+c=0$$ i.e $\quad$$ax^2+2(hy+g)x+(by^2+2fy+c)=0$ $$x=\frac{-2(hy+g)}{2a}\pm\frac{\sqrt{(hy+g)^2-a(by^2+2fy+c)}}{a} $$$$x=\frac{-2(hy+g)}{2a}\pm\frac{\sqrt{(h^2-ab)y^2+2(hg-af)y+(g^2-ac)}}{a}$$ The terms inside square root need to be a perfect square. I understand this. What I do not understand is when the inside square root terms ,quadratic in y is taken to be zero. Because of which its determinant $4(hg-af)^2-4(h^2-ab)(g^2-ac)=0$ becomes the condition for the pair of straight line equation.

I am stuck here. Can someone please help. Thanks.


3 Answers 3


If the condition

$$ a x^2 + 2 h x y + b y^2 + 2 g x + 2 f y + c = 0 $$

represents the product of two lines then the set of solutions for this conditions should be one solution point, void or infinite solution points associated to the cases in which we have the two lines intersection, two lines parallel and two lines coincident. With this idea we follow obtaining

$$ x = \frac{gh-af\pm2\sqrt{(g+hy)^2-a(b y^2+2fy+c)}}{2a} $$

If the intersection point is unique then the condition is

$$ (g + h y)^2 - a (c + 2 f y + b y^2) = 0 $$

which gives

$$ y = \frac{gh-af\pm\sqrt{a^2 f^2 + a b g^2 - 2 a f g h + a c h^2-a^2 b c}}{ab-h^2} $$

but again if the intersection point is unique we should have

$$ a^2 f^2 + a b g^2 - 2 a f g h + a c h^2-a^2 b c = 0 $$


$$ c = \frac{a f^2+b g^2-2 f g h}{a b-h^2} $$

The condition for distinct parallel lines follow as

$$ a b -h^2 = 0 $$

Another approach:

Assuming $a \ne 0$ and dividing $ax^2+2hxy+by^2+2gx+2fy+c=0$ by $a$ we have

$$ x^2+b' y^2 + c' + 2 f' y + 2 g'x +2 h' xy = (x+c_1 y + c_2)(x+d_1 y + d_2) $$

after equating coefficients and solving for $c_1,c_2,d_1,d_2$ we have the conditions

$$ \cases{h'^2-b' > 0\\ c' = -\frac{f'^2-b' g'^2-2f' g' h'}{h'^2-b'}} $$

such that the two lines equivalence is feasible.

or equivalently

$$ \cases{ h^2-a b > 0\\ c = \frac{a f^2+b g^2-2f g h}{a b -h^2} } $$

  • $\begingroup$ Could you specify if it's necesssary to use $c = \frac{a f^2+b g^2-2 f g h}{a b-h^2}$ to conclude that for there to not be a meeting point, c has to be undefined and thus $h^2-ab=0$? That can be deducted straight from $y = \frac{gh-af\pm\sqrt{a^2 f^2 + a b g^2 - 2 a f g h + a c h^2-a^2 b c}}{ab-h^2}$, (as in, there wouldn't be a defined y-coordinate for a meeting point if $h^2=ab$), and I was wondering why it was derived from looking at the expression for c, since this seems more direct and intuitive. Great answer, anyway! $\endgroup$
    – harry
    Commented Aug 10, 2021 at 1:50

For $A\ge0,$

$$Ax^2+Bx+C=A(x+B/2A)^2+C-B^2/4A$$ will be perfect square for all real values of $x$ iff $$C-B^2/4A=0$$

  • $\begingroup$ If I am not wrong , $Ax^2+Bx+C = (\sqrt{A}x+\frac{B}{\sqrt{A}2})^2-(\frac{B^2-4AC}{4A})$. Hence L.H.S is always a perfect square whenever $B^2-4AC =0$. $\endgroup$ Commented Nov 15, 2019 at 3:29
  • $\begingroup$ @Rajesh, I have consciously kept $A$ outside the square. $\endgroup$ Commented Nov 15, 2019 at 4:07
  • $\begingroup$ Thanks for the reply. R.H.S=$A(x+\frac{B}{2A})^2-(\frac{B^2-4AC}{4A})=0$ , why is that only if the 2nd term is removed, it will be a perfect square. That is, it is not necessary $B^2-4AC=0 $, will make it a perfect square, for e.g $4^2-7=3^2, 6^2-11=5^2 , 23^2-45=22^2 $ and so on.... $\endgroup$ Commented Nov 15, 2019 at 13:38

The equation (ax+by+cz)(dx+ey+fz)=0 when multiplied out is a homogeneous quadratic in x, y, z, and therefore it is the equation of a conic.

May suppose then that the quadratic is the conic whose equation is $ax^2+by^2+cz^2+2fyz+2gzx+2hxy=o$.

The condition for the conic to be two straight lines (assumed distinct) is that the determinant of coefficients vanishes viz $\begin{vmatrix} a & h & g \\ h & b & f \\ g & f & c \end{vmatrix}=0$

  • $\begingroup$ Hi, welcome to MSE! In the future, using MathJax to format your posts can make them easier to read, and thus appreciate. :) $\endgroup$
    – jgon
    Commented Nov 26, 2019 at 23:27
  • $\begingroup$ Thank you; have amended as suggested $\endgroup$ Commented Nov 27, 2019 at 5:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .