Lines and Planes in 3D Space
[size=150][b]Equation of a line in 3D Space[/b][/size][br][br]As we know, we can uniquely determine a line in 3D space by specifying a point on the line and the direction of the line. Suppose a line [math]L[/math] passing through the point [math]P_0=(x_0,y_0,z_0)[/math] and is in the same direction as the vector [math]\vec{v}=\langle a,b,c\rangle[/math] (this non-zero vector is called the [b]direction vector[/b] of [math]L[/math]). Let [math]P=(x,y,z)[/math] be any point on line [math]L[/math] and [math]O=(0,0,0)[/math]. We have[br][br][math]\overrightarrow{OP}=\overrightarrow{OP_0}+\overrightarrow{P_0P}[/math][br][br][math]\overrightarrow{OP_0}=\langle x_0,y_0,z_0\rangle[/math] i.e. the position vector of [math]P_0[/math].[br][br]As [math]\overrightarrow{P_0P}[/math] is parallel to [math]\vec{v}[/math], [math]\overrightarrow{P_0P}=t\vec{v}=t\langle a,b,c\rangle[/math] for some real number [math]t[/math]. Therefore, we have[br][br][math]\langle x,y,z\rangle=\langle x_0,y_0,z_0\rangle+t\langle a,b,c\rangle=\langle x_0+at,y_0+bt,z_0+ct\rangle[/math][br][br]The parametric equation of line [math]L[/math] is as follows:[br][br][math]L \ : \ \begin{cases} x & = x_0+at \\ y & = y_0+bt \\ z & = z_0+ct \end{cases}[/math][br][br]where [math]t[/math] is any real number.[br][br]The line is illustrated in the applet below.[br][br][br]
[u]Remarks[/u][list=1][*]The parametric equation of a line [math]L[/math] is not unique i.e. different parametric equations can represent the same line. For example, you can choose another point [math]P_0[/math] on the line or another direction vector that is a scalar multiple of [math]\vec{v}[/math].[/*][*]If [math]a,b,c[/math] are all non-zero, we can eliminate the parameter [math]t[/math] and write the equation of line in the following [b]symmetric form[/b]: [math]\frac{x-x_0}a=\frac{y-y_0}b=\frac{z-z_0}c[/math].[/*][/list][br][br]Two lines in 3D space are non-parallel if their direction vectors are non-parallel i.e. one is not a scalar multiple of another. In 2D space, any two non-parallel lines must intersect each other. However, this is generally not true in 3D space, as shown in the following example:[br][br][u]Example[/u]: [br][br]Let [math]L_1[/math] be the line passing through [math](1,2,3)[/math] in the direction [math]\vec{v_1}=\langle -1,1,4\rangle[/math].[br]Let [math]L_2[/math] be the line passing through [math](1,0,1)[/math] in the direction [math]\vec{v_2}=\langle 1,5,0\rangle[/math].[br][br]Show that they are non-parallel lines that do not intersect each other.[br][br][u]Solution[/u]: Obviously, [math]\vec{v_1}[/math] and [math]\vec{v_2}[/math] are not parallel vectors. Therefore line [math]L_1[/math] and [math]L_2[/math] are non-parallel.[br][br]The following are their parametric equations:[br][br][math]L_1 \ : \ \begin{cases} x & = 1-t \\ y & = 2 + t \\ z & = 3 + 4t \end{cases}[/math][br][br]for any real number [math]t[/math][br][br][math]L_2 \ : \ \begin{cases} x & = 1+s \\ y & = 5s \\ z & = 1 \end{cases}[/math][br][br]for any real number [math]s[/math][br][br]Assume there exists an intersection point [math](x,y,z)[/math] between the two lines i.e. there exists [math]t[/math] and [math]s[/math] such that they satisfy the above two parametric equation simultaneously. We should be able to solve the following system of equations:[br][br][math]\begin{cases} 1-t&=1+s \\ 2+t&=5s \\ 3+4t&=1 \end{cases}[/math][br][br]However, it can easily be shown that the above system of equations has no solution! Hence, the two lines never intersect each other.[br][br]
[u]Exercise[/u]: Find the parametric equation of the line that passes through [math](1,2,5)[/math] and [math](0,-1,-3)[/math].
[b]Answer[/b]:[br][br]Let [math]A=(1,2,5)[/math] and [math]B=(0,-1,-3)[/math]. Then [math]\overrightarrow{AB}=\langle 0,-1,-3 \rangle-\langle 1,2,5\rangle=\langle -1,-3,-8\rangle[/math] is a direction vector of the line. Together with the point [math]A=(1,2,4)[/math], we can write the parametric equation of the line as follows:[br][br][math]\begin{cases} x & = 1-t \\ y & = 2-3t \\ z & = 5-8t \end{cases}[/math][br]for any real number [math]t[/math].[br][br][br]
[b][size=150]Equation of a plane in 3D space[/size][/b][br][br]For any plane in 3D space, we can identify its "direction" by its [b]normal vector[/b] - a non-zero vector that is perpendicular to any vector contained in the plane. We can uniquely determine a plane if we are given a point [math]P_0=(x_0,y_0,z_0)[/math] and a normal vector [math]\vec{n}=\langle a,b,c\rangle[/math]. Let [math]P=(x,y,z)[/math] be any point on the plane [math]S[/math]. Then we have[br][br][math]\overrightarrow{P_0P}\cdot \vec{n}=0[/math] (because [math]\overrightarrow{P_0P}[/math] is contained in [math]S[/math]), which implies that[br][br][math]\langle x-x_0,y-y_0,z-z_0\rangle \cdot \langle a,b,c \rangle =0[/math][br][br]Therefore, the following is the equation of the plane [math]S[/math]:[br][br][math]a(x-x_0)+b(y-y_0)+c(z-z_0)=0[/math][br][br]This is called the [b]point-normal form[/b] of the equation of the plane.[br][br]Expanding the left hand side of the above equation, we get[br][br][math]ax+by+cz+d=0[/math][br][br]where [math]d=-ax_0-by_0-cz_0[/math]. This is called the [b]general form[/b] of the equation of the plane.[br][br][br]The plane is illustrated in the applet below.[br][br]
Two distinct planes are [b]parallel[/b] if their normal vectors are parallel. Moreover, they do not intersect each other. If two distinct planes are non-parallel, they intersect at a line, called the [b]line of intersection[/b].[br][br]Two distinct planes are [b]orthogonal[/b] if their normal vectors are orthogonal vectors. More generally, the angle between two planes is the angle between the normal vectors. If we specify that such angle, called [math]\theta[/math], is smaller or equal to [math]\frac{\pi}2[/math], we have the following formula:[br][br][math]\cos\theta = \left|\frac{\vec{n_1}\cdot\vec{n_2}}{|\vec{n_1}||\vec{n_2}|}\right|[/math], where [math]\vec{n_1}, \vec{n_2}[/math] are the normal vectors of the two given planes.[br][br][br][br]
[u]Exercise[/u]: Find the plane that passes through [math](-2,4,1)[/math] and is parallel to the plane [math]3x-2y+z-4=0[/math].[br]
[b]Answer[/b]:[br][br]The normal vector of the plane [math]3x-2y+z-4=0[/math] is [math]\langle 3,-2,1\rangle[/math]. Since the required plane is parallel to this plane, [math]\langle 3,-2,1\rangle[/math] is also a normal vector of the required plane. Together with the point [math](-2,4,1)[/math], we can write down the equation of the required plane as follows:[br][br][math]3(x-(-2))-2(y-4)+(z-1)=0[/math][br][br]Therefore, the equation in general form is[br][br][math]3x-2y+z+13=0[/math][br][br]
[u]Exercise[/u]: Find the plane that passes through [math]A=(1,2,3)[/math], [math]B=(4,0,1)[/math], and [math]C=(-1,1,2)[/math]. [br][br]([u]Hint[/u]: Use the cross product to find a normal vector of the plane.)
[b]Answer[/b]:[br][br]Consider the vectors [math]\overrightarrow{AB}[/math] and [math]\overrightarrow{AC}[/math]:[br][br][math]\overrightarrow{AB}=\langle 3,-2,-2 \rangle[/math][br][math]\overrightarrow{AC}=\langle -2,-1,-1 \rangle[/math][br][br]Since [math]\overrightarrow{AB}\times \overrightarrow{AC}[/math] is orthogonal to above two vectors, it is a normal vector of the plane containing these two vectors i.e. the plane passing through A, B, and C.[br][br]We have [math]\overrightarrow{AB}\times \overrightarrow{AC}=\begin{vmatrix} \vec{i} & \vec{j} & \vec{k} \\ 3 & -2 & -2 \\ -2 & -1 & -1 \end{vmatrix}=0\vec{i}+7\vec{j}-7\vec{k}[/math].[br][br]Together with the point [math]A=(1,2,3)[/math], the equation of the plane is[br][br][math]0(x-1)+7(y-2)-7(z-3)=0[/math][br][br]Hence, the equation in general form is [math]7y-7z+7=0[/math].
[u]Exercise[/u]: Find the line of intersection of the planes [math]x+2y+z-5=0[/math] and [math]2x+y-z-7=0[/math].[br][br]([u]Hint[/u]: The direction vector of the line of intersection is orthogonal to the normal vectors of the two planes.)[br]
[b]Answer[/b]:[br][br]First of all, we need to find a point on the line of intersection, which means that we need to find a solution to the following system of linear equations:[br][br][math]\begin{cases} x+2y+z-5 \ & = 0 \\ 2x+y-z-7 \ & = 0\end{cases}[/math][br][br]Since there are two equations and three unknowns, it is an "under-determined" system i.e. there should be many solutions to this system of equations. For convenience, we can set one of the unknowns, say z, to zero. Then we get [br][br][math]\begin{cases} x+2y \ & = 5 \\ 2x+y \ & = 7\end{cases}[/math][br][br]Solving it, we get [math]x=3, y=1[/math]. Therefore, [math](3,1,0)[/math] is a point on the line of intersection.[br][br]Since the line of intersection is contained in each of the two planes, its direction vector must be contained in both planes as well, which implies that the direction vector is orthogonal to the normal vectors of both planes. Hence, we can find a direction vector [math]\vec{v}[/math] of the line of intersection by taking the cross product. From the equations of both planes, their normal vectors are [math]\langle 1,2,1\rangle[/math] and [math]\langle 2,1,-1\rangle[/math]. We have[br][br][math]\vec{v}=\begin{vmatrix}\vec{i} & \vec{j} & \vec{k} \\ 1 & 2 & 1 \\ 2 & 1 & -1\end{vmatrix}=-3\vec{i}+3\vec{j}-3\vec{k}=\langle -3,3,-3\rangle[/math].[br][br]Therefore, the parametric equations of the line of intersection are[br][br][math]\begin{cases} x & = 3 - 3t \\ y & = 1 + 3t \\ z & = -3t\end{cases}[/math][br][br]
You can use the applet below to visualize the planes and lines in the exercises.[br]
[u]Distance Problem[/u][br][br]Given a plane [math]ax+by+cz+d=0[/math] and a point [math]P=(x',y',z')[/math] not lying on the plane. How can we find the (shortest) distance [math]D[/math] from the point to the plane?[br][br]Suppose point [math]Q[/math] is the foot of the perpendicular from point [math]P[/math] to the plane. By definition, the distance [math]D[/math] between [math]P[/math] and [math]Q[/math] is the distance from [math]P[/math] to the plane. Let [math]P_0=(x_0,y_0,z_0)[/math] be a point on the plane and [math]\vec{n}=\langle a,b,c \rangle[/math] be the normal vector of the plane. Then we have[br][br][math]\overrightarrow{P_0P}=\langle x'-x_0,y'-y_0,z'-z_0\rangle[/math] and the equation of the plane is [math]ax+by+cz+d=0[/math], where [math]d=-ax_0-by_0-cz_0[/math].[br][br][math]D=\left|\text{Proj}_{\vec{n}}\overrightarrow{P_0P}\right|=\frac{|\vec{n}\cdot\overrightarrow{P_0P}|}{|\vec{n}|}=\frac{|a(x'-x_0)+b(y'-y_0)+c(z'-z_0)|}{\sqrt{a^2+b^2+c^2}}=\frac{|ax'+by'+cz'+d|}{\sqrt{a^2+b^2+c^2}}[/math][br][br]Hence, the distance formula from point [math]P=(x',y',z')[/math] to the plane [math]ax+by+cz+d=0[/math] is as follows:[br][br][math]D=\frac{|ax'+by'+cz'+d|}{\sqrt{a^2+b^2+c^2}}[/math][br][br]The distance from a point to a plane is illustrated in the applet below.[br][br]
This formula can also be used to compute the distance between two parallel planes and the distance between two non-parallel lines.[br]
[u]Exercise[/u]: Given the planes [math]x+2y-2z-3=0[/math] and [math]2x+4y-4z-7=0[/math].[br][br](a) Show that these two planes are parallel.[br](b) Find the distance between these two planes[br][br]([u]Hint[/u]: Find a point on one of the planes and use the distance formula.)[br]
[b]Answer:[/b] [br][br](a) Let [math]L_1: x+2y-2z-3=0[/math] and [math]L_2: 2x+4y-4z-7=0[/math] be the two given planes. Their normal vectors are [math]\vec{n}_1=\langle 1,2,-2\rangle[/math] and [math]\vec{n}_2=\langle 2,4,-4\rangle[/math]. Obviously, [math]\vec{n}_2=2\vec{n}_1[/math], which implies that the two normal vectors are parallel. Therefore, the two planes are parallel.[br][br](b) Pick a point in [math]L_1[/math], say [math](3,0,0)[/math]. The distance between the two planes equals the distance from [math](3,0,0)[/math] to [math]L_2[/math]. Hence, the required distance[br][br][math]=\frac{|2\cdot 3+ 4\cdot 0 - 4\cdot 0-7|}{\sqrt{2^2+4^2+(-4)^2}}=\frac 16[/math]
[u]Exercise[/u]: Let [math]L_1[/math] be the line passing through [math](1,5,-1)[/math] with the direction vector [math]\vec{v_1}=\langle 4,-4,5\rangle[/math] and [math]L_2[/math] be the line passing through [math](2,4,5)[/math] with the direction vector [math]\vec{v_2}=\langle 8,-3,1\rangle[/math]. Find the distance between [math]L_1[/math] and [math]L_2[/math].[br][br]([u]Hint[/u]: Find the plane containing [math]L_2[/math] with the normal vector orthogonal to both [math]\vec{v_1}[/math] and [math]\vec{v_2}[/math] and then use the distance formula.)[br]
[b]Answer[/b]:[br][br]First, we need to find the equation of the plane containing [math]L_2[/math] and equidistant from [math]L_1[/math] ([i]Note[/i]: You can imagine there is another plane that contains [math]L_1[/math] and is parallel to this plane). Moreover, the normal vector [math]\vec{n}[/math] such plane must be orthogonal to both [math]\vec{v}_1[/math] and [math]\vec{v}_2[/math]. So we have[br][br][math]\vec{n}=\vec{v}_1\times\vec{v}_2=\begin{vmatrix}\vec{i} & \vec{j} & \vec{k} \\ 4 & -4 & 5 \\ 8 & -3 & 1 \end{vmatrix}=11\vec{i}+36\vec{j}+20\vec{k}=\langle 11,36,20\rangle[/math][br][br]As [math](2,4,5)[/math] is on [math]L_2[/math], the equation of the plane is[br][br][math]11(x-2)+36(y-4)+20(z-5)=0[/math][br][math]\implies 11x+36y+20z-266=0[/math][br][br]The distance between two lines is exactly the distance from any point on [math]L_1[/math], say [math](1,5,-1)[/math], to the plane. Therefore, the required distance [br][br][math]=\frac{|11\cdot 1+36\cdot 5 + 20\cdot (-1)-266|}{\sqrt{11^2+36^2+20^2}}=\frac{95}{\sqrt{1817}}[/math]