Math Calculators, Lessons and Formulas

It is time to solve your math problem

mathportal.org

Math formulas: Lines in three dimensions

0 formulas included in custom cheat sheet

Line forms

Point direction form:

xx1a=yy1b=zz1c \frac{x-x_1}{a} = \frac{y - y_1}{b} = \frac{z-z_1}{c}

Two point form:

xx1x2x1=yy1y2y1=zz1z2z1 \frac{x-x_1}{x_2-x_1} = \frac{y - y_1}{y_2-y_1} = \frac{z-z_1}{z_2-z_1}

Parametric form:

x=x1+tcosαy=y1+tcosβz=z1+tcosγ \begin{aligned} x &= x_1 +t\,\cos \alpha \\ y &= y_1 +t\,\cos \beta \\ z &= z_1 +t\,\cos \gamma \end{aligned}

Distance between two lines in 3 dimensions

The distance from P2(x2,y2,z2)P_2(x_2,y_2,z_2) to the line through P1(x1,y1,z1)P_1(x_1,y_1,z_1) in the direction (a,b,c)(a,b,c) is

d=[c(y2y1)b(z2z1)]2+[a(z2z1)c(x2x1)]2+[b(x2x1)a(y2y1)]2a2+b2+c2 d = \sqrt{ \frac{\left[c(y_2-y_1)-b(z_2-z_1)\right]^2 + \left[a(z_2-z_1)-c(x_2-x_1)\right]^2 + \left[b(x_2-x_1)-a(y_2-y_1)\right]^2} {a^2 + b^2 + c^2 } }

The distance between two lines. First one through P1(x1,y1,z1)P_1(x_1,y_1,z_1) in direction (a1,b1,c1)(a_1,b_1,c_1), Second one: through P2(x2,y2,z2)P_2(x_2,y_2,z_2) in direction (a2,b2,c2)(a_2,b_2,c_2) is:

d=x2x1y2y1z2z1a1b1c1a2b2c2b1c1b2c22+c1a1c2a22+a1b1a2b22 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{\begin{vmatrix} b_1 & c_1 \\ b_2 & c_2 \end{vmatrix}^2 + \begin{vmatrix} c_1 & a_1 \\ c_2 & a_2 \end{vmatrix}^2 + \begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix}^2 }}

The two lines intersect if:

x2x1y2y1z2z1a1b1c1a2b2c2=0 \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

Was these formulas helpful?

Yes No