Vector Equation of a Line


$$x = \vec{endpoint} + t \cdot\vec{direction}$$
if (t>0), it is ray
if t has a range, it is segment


### distance between one straight line and one point 
$$D = \frac{\vec{AP} \times \vec{d}} {\vec{d}} =  \overline{AP}sin{\theta} $$
![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fa06502d3-f475-42a8-9c24-b65400835101%2FUntitled.png?table=block&id=88cf7bf2-f7b0-418f-a07e-a8181bc2a73d&cache=v2)

### Distance between two lines
$$\vec{a_1} + t\cdot\vec{b_1}\vec{a_2} + t\cdot\vec{b_2}d = |\frac{(\vec{a_2} - \vec{a_1}) \cdot (\vec{b_1}\times \vec{b_2}) } {|\vec{b_1} \times \vec{b_2}|}|$$





> [Lesson Explainer: The Perpendicular Distance between Points and Straight Lines in Space | Nagwa](https://www.nagwa.com/en/explainers/939127418581/)

> [Shortest Distance Between Two Lines in 3D](https://www.youtube.com/watch?v=6vpXM1dskmY)





