How to find the angle between the line passing through two points in 3d

950 Views Asked by At

There are points $P(1,1,2), Q(3,-2,2), R(1,4,6), S(-1,10,30)$. How do I find the angle between the line passing through $P$ and $Q$, and the line passing through $R$ and $S$?

Am I supposed to find the distance between the points $P$ & $Q$ and $R$ & $S$? and then use that to find the angle?

2

There are 2 best solutions below

4
On BEST ANSWER

$P(1,1,2), Q(3,-2,2), R(1,4,6), S(-1,10,30)$

equation of line $PQ$ is $(x,y,z)=(1,1,2)+t(3-1,-2-1,2-2)=(1,1,2)+t(2,-3,0)$ $$ PQ:\begin{cases} x=1+2t\\ y=1-3t\\ z=2\\ \end{cases}\to \vec{a}=(2,-3,0) $$ $RS$ has equation $(x,y,z)=(1,4,6)+u(-1-1,10-4,30-6)=(1,4,6)+u(-2,6,24)$ $$ RS:\begin{cases} x=1-2u\\ y=4+6u\\ z=6+24u\\ \end{cases}\to \vec{b}=(-2,6,24) $$

call $\alpha$ the angle between the two lines.

$\vec{a}$ and $\vec{b}$ are the direction vector of the two lines.

$$\cos\alpha=\frac{\vec{a}\cdot\vec{b}}{|\vec{a}||\vec{b}|}$$ That is

$$\cos\alpha=\frac{(2,-3,0)\cdot(-2,6,24)}{||(2,-3,0)||\cdot||(-2,6,24)||}=-\sqrt{\frac{11}{182}}$$ $$\alpha\approx 104.23°$$

5
On

Relative to the origin as in vectors:$$v = \arccos\left(\frac{x_1x_2 + y_1y_2 + z_1z_2}{\sqrt{(x_1^2+y_1^2+z_1^2) \cdot (x_2^2+y_2^2+z_2^2)}}\right)$$