Computing the Distance

16.2k Views Asked by At

I'm having a little difficulty getting this problem down. I've been trying to follow my notes, but I guess I'm not doing it correctly. Anyone know how to properly answer this question?

Let $\vec{y}$ = $ \left[ {\begin{array}{cc} 8 \\ 5 \\ -5 \\ \end{array} } \right]$ and $\vec{u}$ = $ \left[ {\begin{array}{cc} 4 \\ 4 \\ 4 \\ \end{array} } \right]$. Compute the distance $d$ from $\vec{y}$ to the line through $\vec{u}$ and the origin.

3

There are 3 best solutions below

0
On BEST ANSWER

The squared distance from $(8,5,-5)$ to a point $(4t,4t,4t)$ on the line is $$(8-4t)^2+(5-4t)^2+(-5-4t)^2=48t^2-64t+114.\tag{1}$$ This is minimal at $t=64/96=2/3$ so that the nearest point on the line is $(8/3,8/3,8/3).$ Or since you only need the distance, plug $t=2/3$ into (1) and get $278/3$, and the distance is the squareroot of that.

NOTE: The line could be more simply $(t,t,t)$ which would make for smaller coefficients in (1).

0
On

$$d=\left|\vec{y}-\frac{\vec{y}\cdot\vec{u}}{|\vec{u}|}{\vec{u}}\right|$$ Then $$d=\left|\begin{pmatrix}8\\5\\-5\end{pmatrix}-\frac{32}{4\sqrt{3}}\begin{pmatrix}4\\4\\4\end{pmatrix}\right|$$

I'll leave the rest to you

0
On

You can think of $\vec{y}$ as being the sum of two vectors: a vector $\vec{y}_p$ parallel to the line through $\vec{u}$ and the origin, and a vector $\vec{y}_o$ orthogonal to that line.

The $d$ you need to compute is the length of $\vec{y}_o$.

$\vec{y}_p$ is the projection of $\vec{y}$ onto the line through $\vec{u}$ and the origin. The length of $\vec{y}_p$ is equal to the absolute value of the dot product $\vec{y}\cdot\vec{u}'$ where $\vec{u}'$ is a unit vector in the same direction as $\vec{u}$.

Knowing the length of $\vec{y}$ and the length of $\vec{y}_p$ you can use the Pythagorean Theorem to get the length of $\vec{y}_o$.