Geometry · real student question

Find the distance between the point (1, 4) and the line (0,0) + a*(3, 1).

Question

Find the distance between the point P=(1,4)P=(1,4) and the line

:  (0,0)+a(3,1),aR\ell:\;(0,0)+a(3,1),\qquad a\in\mathbb{R}

Step-by-step solution

  1. Write the distance to a general point of the line. A point of \ell is (3a,a)(3a,a), so

    d(a)=(13a)2+(4a)2=16a+9a2+168a+a2=10a214a+17d(a)=\sqrt{(1-3a)^2+(4-a)^2}=\sqrt{1-6a+9a^2+16-8a+a^2}=\sqrt{10a^2-14a+17}

    This function answers "how far is PP from the point at parameter aa" — the distance to the line is its minimum value.

  2. Minimise the quadratic under the root. A square root is increasing, so minimising d(a)d(a) is the same as minimising q(a)=10a214a+17q(a)=10a^2-14a+17, whose vertex is at

    a=142(10)=1420=0.7a=-\frac{-14}{2(10)}=\frac{14}{20}=0.7

    This is the same aa the perpendicular projection would give: pddd=3+410=0.7\tfrac{\mathbf p\cdot\mathbf d}{\mathbf d\cdot\mathbf d}=\tfrac{3+4}{10}=0.7.

  3. Evaluate at the vertex.

    q(0.7)=10(0.49)14(0.7)+17=4.99.8+17=12.1    d=12.13.4785q(0.7)=10(0.49)-14(0.7)+17=4.9-9.8+17=12.1\;\Longrightarrow\;d=\sqrt{12.1}\approx 3.4785

  4. Confirm with the 2D cross-product shortcut. In the plane the distance from PP to a line through the origin with direction d=(3,1)\mathbf d=(3,1) is

    d=pxdypydxd=114310=11103.4785d=\frac{\left|p_xd_y-p_yd_x\right|}{\|\mathbf d\|}=\frac{|1\cdot 1-4\cdot 3|}{\sqrt{10}}=\frac{11}{\sqrt{10}}\approx 3.4785

    and indeed (1110)2=12110=12.1  \left(\tfrac{11}{\sqrt{10}}\right)^2=\tfrac{121}{10}=12.1\;\checkmark, matching the minimised quadratic exactly.

  5. State the answer carefully. If the question means the distance to the whole line, the answer is

    d=1110=1110103.4785d=\frac{11}{\sqrt{10}}=\frac{11\sqrt{10}}{10}\approx 3.4785

    If instead a specific parameter aa is intended, the distance is the function 10a214a+17\sqrt{10a^2-14a+17}, which equals 174.12\sqrt{17}\approx 4.12 at a=0a=0 and grows without bound as a|a|\to\infty.

Answer

d=1110=1110103.4785(at a=0.7)d=\frac{11}{\sqrt{10}}=\frac{11\sqrt{10}}{10}\approx 3.4785\quad\text{(at }a=0.7)

Need to solve a different problem like this? Open the solver →