Prove that the straight lines whose direction cosines are given by the relations $al+bm+cn=0$ and $fmn+gnl+hlm=0$ are perpendicular if $\dfrac {f}{a} +\dfrac {g}{b} + \dfrac {h}{c}=0$ and parallel if $\sqrt {af} \pm \sqrt {bg} \pm \sqrt {ch}=0$
My Attempt:
Given relations are $$al+bm+cn=0$$ $$fmn+gnl+hlm=0$$ Eliminating $n$ between these two equations, we get $$fm (-\dfrac {al+bm}{c}) + g(-\dfrac {al+bm}{c})l + hlm=0$$ $$agl^2+(af+bg-ch)lm+bfm^2=0$$ $$ag(\dfrac {l}{m})^2 + (ch-af+bg) (\dfrac {l}{m}) + bf=0$$
It is sufficient to work with direction ratios to test perpendicularity and parallelism. Note that $l\ne0$, because $l=0\implies m=n=l=0$ assuming $f\ne0$. Divide the first equation by $l$ and the second by $l^2$,$$a+b\frac ml+c\frac nl=0\\f\frac ml\frac nl+g\frac nl+h\frac ml=0$$Substitute $\frac ml=x,\frac nl=y$ and solve the resulting system of equations. The required direction ratios will then be $(1,x_1,y_1),(1,x_2,y_2)$ for which the conditions for perpendicularity $(1+x_1x_2+y_1y_2=0)$ and parallelism $(\frac{x_1}{x_2}=\frac{y_1}{y_2}=1)$ can be easily derived.
The formulae for sum and product of roots of a quadratic will help in getting the conditions without having to solve the quadratic.