# What are Three-Dimensional Geometry ?

## Direction Cosines Of A Line Joining Two Points

Let a line PQ is being formed by joining two-points P (x1, y1, z1)and Q (x2, y2, z2). Let l, m, n be the direction cosines of line PQ and it makes angle α, β, γ with x, y, z
axis respectively. Draw a line parallel to PQ and passing through origin as direction cosines of two parallel lines are always same, so direction cosines of PQ will be

$$\overrightarrow{\text{MN}}=(x_2-x_1)\hat{i}\space +\space (y_2-y_1)\hat{j}\space+\space(z_2-z_1)\hat{k}.\qquad\\\text{cos}\space\alpha=\frac{x_2-x_1}{\text{PQ}},\text{cos}\space \beta=\frac{y_2-y_1}{\text{PQ}},\text{cos}\space\gamma=\frac{z_2-z_1}{\text{PQ}}.\\\qquad\text {where}, \text{PQ}=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}$$

## Direction Ratios Of A Line Joining Two Points

The direction ratios of the line segment joining P (x1, y1, z1)and Q (x2, y2, z2) may be taken as x2 - x1 , y2 - y1 , z2 - z1 or x1 - x2 , y1 - y2 , z1 - z2 .

## Cartesian Equation And Vector Equation Of A Line

A line is uniquely determined if

• It passes through one point and has a given direction.
• It passes through two given points.

Equation of a line through a given point and parallel to a given vector

$$\vec{b}:$$

• Vector Equation : A line which passes through A with position vector a, also this line is parallel to

$$\vec{b}:$$

A variable point P having position vector r lies on this line. Then,

$$\vec{r}=\vec{a}+\lambda\vec{b}\space\space\space\space\space \lambda\space\epsilon\space\text{R}$$

• Cartesian Equation : In given fig. let the co-ordinates of the given point A be (x1, y1, z1) and the direction ratios of a line parallel to this line are a, b, c. Then,

$$\frac{x-x_1}{a}=\frac{y-y_1}{b}=\frac{z-z_1}{c}=\lambda$$

Equation of a line through two given points:

• Vector Equation : In the given fig. let O is the origin, now consider a line passing through two points A and B having position vectors

$$\vec{a}\space\text{and}\space\vec{b}$$

respectively. Let a variable point P having position vector r lies on this line. Then,

$$\vec{r}=\space\vec{a}+\lambda(\vec{b}-\vec{a}).\space\space\space \lambda\space\epsilon \space R$$

• Cartesian Equation : In the given fig., let two points A (x1, y1, z1) and B (x2, y2, z2) on the given line, so equation of line in the vector form is given by :

$$\frac{x-x_1}{a}=\frac{y-y_1}{b}=\frac{z-z_1}{c}=\lambda.$$

## Skew Lines

Two straight lines are skew if they are neither parallel nor intersecting.
NOTE : Two skew lines are always non-coplanar.

## Shortest Distance Between Two Lines

Shortest distance between the given Parallel Lines:

Shortest distance between the given Parallel Lines:

See given figure, Shortest distance between the parallel lines

$$\vec{r}=\vec{a}_1+\lambda(\vec{b})\space\text{and}\space\vec{r}=\vec{a}_2+ \mu\vec{\text{b}}\space \text{is given by}$$

$$\bigg|\frac{(\vec{a}_2-\vec{a}_1)×\vec{b}}{|\vec{b}|}\bigg|$$

Shortest distance between two skew lines:

See given figure

• Vector form : Shortest distance between the skew lines

$$\vec{r}=\vec{a}_1+\lambda(\vec{b}_1)\space\text{and}\space\vec{r}=\vec{a}_2+ \mu\vec{\text{b}}_2\space \text{is given by}\\\text{d}=\bigg|\frac{(\vec{b}_1×\vec{b}_2).(\vec{a}_2×\vec{a}_1)}{|\vec{b}_1×\vec{b}_2|}\bigg|$$

• Cartesian form : Let cartesian equations of two skew lines be

$$\frac{x-x_1}{a_1}=\frac{y-y_1}{b_1}=\frac{z-z_1}{c_1}\space\text{and}\space\frac{x-x_2}{a_2}=\frac{y-y_2}{b_2}=\frac{z-z_2}{c_2}\\\text{Then}, \text{d}=\frac{\begin{vmatrix} x_2-x_1 & y_2-y_1 & z_2-z_1 \\a_1 & b_1 & c_1\\ a_2 & b_2 & c_2 \end{vmatrix}}{\sqrt{(b_1c_2-b_2c_1)^2+(c_1a_2-c_2a_1)^2+(a_1b_2-a_2b_1)^2}}$$

Shortest distance between the lines which are intersecting at a single point:

The shortest distance between two intersecting lines is zero.

$$\text{i.e}\space \text{d}=\begin{vmatrix}x_2-x_1 & y_2-y_1 & z_2-z_1 \\a_1 & b_1 & c_1\\a_2 & b_2 & c_2 \end{vmatrix}=0$$

## Angle Between Two Lines

$$\text{Let}\space\vec{\text{R}}=\vec{\text{R}}_1+\text{t}\vec{\text{B}}_1 \space\text{and}\space \vec{\text{R}}=\vec{\text{A}}_2+v\vec{\text{B}}_2\text{be two given lines. Since these lines are parallel to the vectors} \space\vec{\text{B}}_1 \text{and} \space\vec{\text{B}}_2\space \text{respectively}, \\\text{the angles between these lines is the angle between the vectors}\space\vec{\text{B}}_1 \space \text{and} \space\vec{\text{B}}_2 .\space \text{Hence, if}\space \theta \text{is the angle between }\space\vec{\text{B}}_1 \text{and} \space\vec{\text{B}}_2, \text{then the angle between the given lines is}\\\theta=\text{cos}^{-1}\bigg(\frac{\vec{B}_1\vec{B}_2}{|B_1||B_2|}\bigg)\\\text{If} \space \text{B}_1=x_1\hat{i}+y_1\hat{j}+z_1\hat{k} \space \text{and}\space \text{B}_2=x_2\hat{i}+y_2\hat{j}+z_2\hat{k}, \text{then}\\\theta=\text{cos}^{-1}\frac{x_1x_2+y_1y_2+z_1z_2}{\sqrt{x_1^2+y_1^2+z_1^2}\sqrt{x_2^2+y_2^2+z_2^2}}$$