The differential equation of the family of lines $y=mx$ is

$\begin{array}{1 1}(1)\frac{dy}{dx}=m&(2)ydx-xdy=0\\(3)\frac{d^{2}y}{dx^{2}}=0&(4)ydx+xdy=0\end{array}$

$y=mx$
$\large\frac{dy}{dx} $$=m y= \large\frac{dy}{dx}$$.x$
$y.dx= x.dy$
$x.dy -ydx= 0$
ie $y dx -xdy=0$
Hence 2 is the correct answer.