# Line

#### Moon

In three dimentional space, with such a base: {e1, e2, e3}

I have this line equation:
$$\displaystyle r * (e2 - e1) = -e2 +e3$$

How do I find the distance between this line and the beginning of the coordinate system?

#### Ackbeet

MHF Hall of Honor
What kind of multiplication is "*", in your problem? And what is r? Scalar? Vector?

#### p0oint

@Ackbeet it is cross multiplication.

Moon do you consider: $$\displaystyle e_1={0,0,1}, e_2={0,1,0}, e_3={1,0,0}$$.

Last edited:

#### Moon

r, e1, e2, e3 - are vectors. The exact form of e1, e2, e3 is not given. * - is vector multiplication, I'm sorry, I couldn't find the LaTex symbol of vector multiplication.

The universal equation I use for line is:
$$\displaystyle r * a = b$$

Where r,a, b - vectors, * - vector multiplication.

And sorry for my poor english, it's not my native language #### Ackbeet

MHF Hall of Honor
If you mean the cross product, then the LaTeX symbol for that is \times. So, you'd write

$$\displaystyle \vec{r}\times(\vec{e}_{2}-\vec{e}_{1})=\vec{e}_{3}-\vec{e}_{2}$$.

You get the little arrows over the r, for example, by typing \vec{r} in LaTeX.

So now, let me see if I can state the problem accurately:

Given the line equation above, find the distance between that line and the origin. And by "find the distance", I assume we mean that we take the minimum (or, more properly, infimum) of all the distances between points on the line and the origin. Is this correct?

#### Moon

Exactly, that's what I meant.

#### Ackbeet

MHF Hall of Honor
Well, let's suppose that $$\displaystyle \vec{r}=\{x,y,z\}$$. Then the distance from a point on the line to the origin is given by $$\displaystyle d=\sqrt{x^{2}+y^{2}+z^{2}}$$ in the Euclidean metric.

What we must do is essentially parametrize the line (it has only one degree of freedom), express the distance function in terms of that parameter, take the derivative, set it equal to zero, solve for the value of the parameter that minimizes the distance, and finally plug that value back into the distance formula. Think you can do that?

#### Moon

I guess, the parametric equation is:
$$\displaystyle \vec{r} = \vec{e1} + t*(\vec{e2} - \vec{e3})$$

Anyway the full text of the excersise is (I hope I translated it correctly): In a 3dimentional euclidean space there is line L which goes through two points of such position vectors:
$$\displaystyle \vec{r1} = \vec{e1},\vec{r2} = \vec{e2}$$
What is the equation of line L and what is the distance between this line and the origin of the coordinate system?

#### Ackbeet

MHF Hall of Honor
Ah. Given that problem statement from your book, I would disagree with your parametrization. You shouldn't even have an $$\displaystyle \vec{e}_{3}$$. Instead, your parametrization should read $$\displaystyle \vec{r}(t)=\vec{e}_{1}+t(\vec{e}_{2}-\vec{e}_{1})$$. Plug in 0 and 1 for $$\displaystyle t$$, and you can convince yourself that my parametrization is correct.

So, if you continue, what do you get next?

#### Moon

Hmm, I thought that if the space is 3 dimentional there should be 3 vectors in the base, and that's where I got e3.
I was actually trying to find the vector equation of this line, from this formula:
$$\displaystyle \vec{r} \times \vec{a} = \vec{b}$$

Vector $$\displaystyle \vec{a}$$ must be parrallel to the line, and I thought that the substraction of position vectors of points that are in this line must be parralel to this line, and that's how I got this: $$\displaystyle \vec{a} = \vec{r2} - \vec{r1} = \vec{e2} - \vec{e1}$$ .
Then, since point r1 is in the line, I plugged it into the equation, which gave me this: $$\displaystyle \vec{r1} \times (\vec{e2} - \vec{e1}) = \vec{b}$$
$$\displaystyle \vec{b} = \vec{r1} \times (\vec{e2} - \vec{e1})$$
$$\displaystyle \vec{b} = \vec{e1} \times (\vec{e2} - \vec{e1})$$
And then I got vector b from det of a matrix 3x3 with such columns: (e1, 1, 0), (e2, 0, 1), (e3, 0, -1) - I'm sorry, I don't know how to make matrix in LaTex. Anyway it turned out that vector b in this equation is: $$\displaystyle \vec{b} = -\vec{e2} + \vec{e3}$$ . Is that wrong?