Intersection of Two Lines in 3 D Calculator



An online calculator to find the point of intersection of two lines in 3D is presented.

Point of Intersection of Two Lines in 3D

The equation in vector form of a line throught the points $A(x_A \; , \; y_A \; , \; z_A)$ and $B(x_B \; , \; y_B \;, \; z_B)$ is written as
$\lt x \; , \; y \; , \; z \gt \; = \; \lt x_A \; , \; y_A \; , \; z_A \gt + t \lt x_B - x_A \; , \; y_B - y_A \; , \; z_B - z_A \gt \qquad (I)$
The equation in vector form of a line throught the points $C(x_C \; , \; y_C \; , \; z_C)$ and $D(x_D \; , \; y_D \;, \; z_D)$ is written as
$\lt x \; , \; y \; , \; z \gt \; = \; \lt x_C \; , \; y_C \; , \; z_C \gt + s \lt x_D - x_C \; , \; y_D - y_C \; , \; z_D - z_C \gt \qquad (II)$

A point with coordinates $x_0 , y_0 , z_0$ is a point of intersection of the lines $A B$ and $CD$ if it satisfies the equation:
$\lt x_A \; , \; y_A \; , \; z_A \gt + t \lt x_B - x_A \; , \; y_B - y_A \; , \; z_B - z_A \gt \; = \; \lt x_C \; , \; y_C \; , \; z_C \gt + s \lt x_D - x_C \; , \; y_D - y_C \; , \; z_D - z_C \gt$
which gives the following
systems of 3 equations and 2 unknowns $t$ and $s$.
$x_A + t \; ( x_B - x_A ) = x_C + s \; (x_D - x_C )$
$y_A + t \; ( y_B - y_A ) = y_C + s \; (y_D - y_C )$
$z_A + t \; ( z_B - z_A ) = z_C + s \; (z_D - z_C )$
We solve two equations for $t$ and $s$ and verify whether the third one is satisfied or not.

Use of the Calculator

Enter the coordinates of points $A$, $B$, $C$ and $D$ as real numbers separated by commas as shown below then press "Calculate".

$A(x_A \; , \; y_A \; , \; z_A)$: (
)
$B(x_B \; , \; y_B \; , \; z_B)$: (
)
$C(x_C \; , \; y_C \; , \; z_C)$: (
)
$B(x_D \; , \; y_D \; , \; z_D)$: (
)