Find the point on the line $y=2x+1$ that is closest to the point $(5,2)$. I already attempted this problem this problem with the formula for Vector projection $(x^\text{T}y)/(y^\text{T}y) y$ and go the solution $(1.1,3.3)^\text{T}$ but the book states the solution is $(1.4,3.8)^\text{T}$. Can someone explain? It must have something to do with the $y$-intercept being $1$.
 A: Let the point be $(a,b)$. The line passing through $(a,b)$ and $(5,2)$ is perpendicular to $y=2x+1$, and the slope is $-(2)^{-1}=-\frac{1}{2}$, then find the equation for the line and solve the simultanious equations.
A: We know that foot of perpendicular to a line is the closest point to the given point.
There is a general expression derived in Reflection Formula by HCR for directly calculating the co-ordinates of foot of perpendicular say $(x', y')$ drawn from any point $(x_o, y_o)$ to the straight line $y=mx+c$ is given as $$(x', y')\equiv\left(\frac{x_o+m(y_o-c)}{1+m^2}, \frac{mx_o+m^2y_o+c}{1+m^2}\right)$$ Hence, the co-ordinates of the foot of perpendicular $(x', y')$ (i.e. the closest point) drawn from the point $(5, 2)$ to the line y=2x+1 are calculated as follows $$(x', y')\equiv\left(\frac{5+2(2-1)}{1+2^2}, \frac{2(5)+2^2(2)+1}{1+2^2}\right)\equiv\left(\frac{7}{5}, \frac{19}{5} \right)$$ Hence, the point $\left(\frac{7}{5}, \frac{19}{5} \right)$ on the line: $y=2x+1$ is the closest from the given point $(5, 2)$ 
