Find the ratio in which the perpendicular Find the ratio in which the perpendicular from $(4,1)$ to the line segment joining the points $(2,-1)$ and $(6,1)$ divides the segment.
My Approach:
Equation of the line joining the points $(2,-1)$ and $(6,1)$ is given by:
$$y-y_1=\frac {y_2-y_1}{x_2-x_1} (x-x_1)$$
$$y+1=\frac {2}{4} (x-2)$$
$$y+1=\frac {1}{2} (x-2)$$
$$2y+2=x-2$$
$$x-2y-4=0$$.
I got stuck at here. Please help me to complete.
 A: Let $A\equiv (2,-1),B\equiv (6,1), P\equiv (4,1)$. Let the perpendicular from $P$ intersect the given line at $Q\equiv (h,k)$, which divides the given join in ration $BQ:QA=1:\lambda$. Using ratio formula we get $h,k$, now use the fact that product of slope of perpendicular lines is $-1$ to find $\lambda$.
Using my terminology 
$h=\frac{6\lambda +2}{\lambda +1}$ and $k=\frac{\lambda -1}{\lambda+1}$
Now let slope of $AB=m_1$ and that of $PQ=m_2$ now solve $m_1.m_2=-1$ for $\lambda$.
A: You have a line $x-2y-4=0$, and you can fix it to the form $y=\frac{1}{2}x-2$.
The perpendicular line will have a slope of $-\frac{1}{a}$ or in this case $-2$ and will pass via $(4,1)$.
Hence:
$$1=4\times (-2)+b \implies b=9$$
So the perpendicular line:
$$y=-2x+9$$ 
Now let us find the point these two line intersect:
$$-2x+9=\frac{1}{2}x-2$$
$$11=\frac{5}{2}x$$
$$x=\frac{22}{5}$$
$$y=(-2)\times \frac{22}{5}+9=\frac{1}{5}$$
Th line $y=\frac{1}{2}x-2$ will be divided by the perpendicular at the point $(x,y)=(\frac{22}{5},\frac{1}{5})$
Do you know how to carry on?
