Academy
Formulas/maths/Straight Lines/Condition for General Second Degree to be a Pair

Condition for General Second Degree to be a Pair

i.e. abc + 2fgh − af² − bg² − ch² = 0. This is the necessary and sufficient condition.
Derivation

The general second degree equation:

Sax2+2hxy+by2+2gx+2fy+c=0S \equiv ax^2 + 2hxy + by^2 + 2gx + 2fy + c = 0

represents a pair of lines if it factors as (l1x+m1y+n1)(l2x+m2y+n2)=0(l_1x+m_1y+n_1)(l_2x+m_2y+n_2) = 0.

Derivation

Expanding the product and comparing coefficients:

a=l1l2,b=m1m2,c=n1n2a = l_1l_2,\quad b = m_1m_2,\quad c = n_1n_2 2h=l1m2+l2m1,2g=l1n2+l2n1,2f=m1n2+m2n12h = l_1m_2+l_2m_1,\quad 2g = l_1n_2+l_2n_1,\quad 2f = m_1n_2+m_2n_1

For this system to have a solution, the determinant of the symmetric matrix of SS must vanish:

Δ=ahghbfgfc=0\boxed{\Delta = \begin{vmatrix} a & h & g \\ h & b & f \\ g & f & c \end{vmatrix} = 0}

Expanding: Δ=abc+2fghaf2bg2ch2=0\Delta = abc + 2fgh - af^2 - bg^2 - ch^2 = 0.

Finding the intersection point

The intersection of the two lines is the solution of:

ax+hy+g=0andhx+by+f=0ax + hy + g = 0 \qquad \text{and} \qquad hx + by + f = 0

(These are the partial derivatives S/x=0\partial S/\partial x = 0 and S/y=0\partial S/\partial y = 0, halved.)

Angle between the lines

The angle depends only on the homogeneous part ax2+2hxy+by2ax^2+2hxy+by^2:

tanθ=2h2aba+b\tan\theta = \frac{2\sqrt{h^2-ab}}{a+b}

The terms 2gx+2fy+c2gx+2fy+c translate the pair but do not rotate it.