 # Compute the distance d from y to the line through u and the origin. $y = \begin {bmatrix} 5 \\ 3 \end {bmatrix}$

$u = \begin {bmatrix} 4 \\ 9 \end {bmatrix}$

The question aims to find the distance between vector y to the line through u and the origin.

The question is based on the concept of vector multiplication, dot product, and orthogonal projection. Dot product of two vectors is the multiplication of corresponding terms and then the summing of their output. The projection of a vector onto a plane is known as the orthogonal projection of that plane.

The orthogonal projection of y is given by the formula as:

$\hat {y} = \dfrac{ y . u }{ u . u } u$

We need to calculate the dot products of the vectors in the above formula. The dot product of y and u is given as:

$y . u = (5, 3) . (4, 9)$

$y . u = 20 + 27$

$y . u = 47$

The dot product of u with itself is given as:

$u . u = (4, 9) . (4, 9)$

$u .u = 16 + 81$

$u . u = 97$

Substituting the values in the above equation, we get:

$\hat {y} = \dfrac{ 47 }{ 97 } u$

$\hat {y} = \dfrac{ 47 }{ 97 } \begin {bmatrix} 4 \\ 9 \end {bmatrix}$

$\hat {y} = \begin {bmatrix} \frac{ 188 }{ 97 } \\ \frac{ 423 }{ 97 } \end {bmatrix}$

We need to find the difference of $\hat {y}$ from y, which is given as:
$y\ -\ \hat {y} = \begin {bmatrix} 5 \\ 3 \end {bmatrix}\ -\ \begin {bmatrix} \frac{ 188 }{ 97 } \\ \frac{ 423 }{ 97 } \end {bmatrix}$

$y\ -\ \hat {y} = \begin {bmatrix} \frac{ 297 }{ 97 } \\ \frac{ -132 }{ 97 } \end {bmatrix}$

Finding the distance, we take the square root of the sum of squared terms of the vector. The distance is given as:

$d = \sqrt{ \dfrac{ 88209 }{ 9409 } + \dfrac{ 17424 }{ 9409 }}$

$d = \sqrt{ \dfrac{ 1089 }{ 97 }}$

$d = \dfrac{ 33 }{ \sqrt {97} }$

$d = 3.35 units$

## Numerical Result

The distance from vector y to the line through vector u and the origin is calculated to be:

$d = 3.35 units$

## Example

Compute the distance from the given vector y to the line through the vector u and the origin if the orthogonal projection of y is given.

$y = \begin {bmatrix} 1 \\ 3 \end {bmatrix}$

$\hat {y} = \begin {bmatrix} 22/13 \\ 33/13 \end {bmatrix}$

$u = \begin {bmatrix} 2 \\ 3 \end {bmatrix}$

The distance is calculated using the same distance formula, which is given as:

$d = 1.61 units$