Lines - Planes - Equations - Distances - Angles




Coordinates and vectors in three dimensional space

Coordinates of a vector in three dimensional space

Take a right-handed rectangular coordinate system in space.
Call the three axes x,y,z. Call the origin O.
Take i, j, k as unit vectors along the positive axes x,y,z.
With each point P, corresponds a vector OP.
P is called the image point of OP.
The vector OP is noted P for short.
The vector P can be expressed as x.i + y.j + z.k
(x,y,z) are the coordinates of P. We write co(P) = (x,y,z) or P(x,y,z) for short.
The vector AB = AO + OB => AB = OB - OA = B - A
It is not difficult to see that
co(A + B) = co(A) + co(B)
co(AB) = co(B - A) = co(B) - co(A)
co(r.A) = r.co(A) (with r a real number)

Center of [AB]

A and B are two points in space.
The center of [AB] is point M if and only if AM = MB
Then M - A = B - M <=> 2.M = A + B <=>
co(M) = (co(A) + co(B))/2

Center of triangle ABC

Let Z be the center of the triangle ABC.
Let M = the center of [AB]. Then CZ = 2.ZM
So, Z - C = 2.(M - Z) <=> 3.Z = 2.M + C = A + B + C
Z = (A + B + C)/3

Center of a tetrahedron ABCD

Say A' is the center of triangle ABC. Then, A' = (A + B + C)/3 .
Take point Z such that DZ = 3.ZA'
Then, Z - D = 3.(A' - Z) => 4.Z = 3.A' + D = A + B + C + D
Z = (A + B + C + D)/4 We have the same result starting from the center of another triangle.
Point Z is the center of the tetrahedron ABCD.

Lines

Equations of a line in space

Take a line BC in space.
BC = C - B is called a direction vector of the line.
 
         point P is on BC
<=>
        there is a real number r such that BP = r.BC
<=>
        there is a real number r such that P - B = r.(C - B)
<=>
        there is a real number r such that P = B + r.(C - B)
The last expression is the vectorial equation of the line. The number r is a parameter.
Now, we take a right-handed rectangular coordinate system.
All points and vectors have unique coordinates.
Say P(x,y,z) ; B(b,b',b") ; C(c,c',c").
Hence,
 
         point P is on BC
<=>
        there is a real number r such that
        co(P) = co(B) + r.(co(C) - co(B))
<=>
        there is a real number r such that
        / x = b  + r.(c  - b )                  (1)
        | y = b' + r.(c' - b')                  (2)
        \ z = b" + r.(c" - b")                  (3)
These equations are called parametric equations of the line BC.
The numbers (c - b );(c' - b') and (c" - b") are the coordinates of the direction vector BC and they are called direction numbers of the line BC.
Each ( non zero) multiple of the direction numbers are new direction numbers of the line BC.
Since B and C are different points, at least one of the direction numbers
(c - b );(c' - b'); (c" - b") is not zero. Say (c-b) is not 0.
Then we can can calculate r from (1) and bring it in (2) and (3).
Hence,
 
         point P is on BC
<=>
                   x - b                           x - b
        y - b' =  ------- (c' - b') and z - b" =  ------(c" - b")
                   c - b                           c - b
These equations are called cartesian equations of the line BC.
We become these equations by eliminating r out of the parametric equations.
If all the direction numbers are non zero, previous equations are equivalent to:
 
   x - b      y - b'     z - b"
  ------ =   -------- = --------
   c - b      c'- b'     c"- b"
If one of the direction numbers is zero, the corresponding numerator is zero.

Examples

Planes

Equal directions

Two directions are given by their direction numbers (v,v',v") and (w,w',w").
 
        The directions are the same
<=>
        there is a number r such that (w,w',w") = r.(v,v',v")
<=>
        the dimension of span{(v,v',v"), (w,w',w")} is 1
<=>
        the dimension of the row space of
                [v      v'      v"]
                [w      w'      w"]
        is 1.
<=>
        rank of the previous matrix is  1
Conclusions:
 
        Two directions (v,v',v") and (w,w',w") are the same
<=>
        The rank of
                [v      v'      v"]
                [w      w'      w"]
        is 1.

Two directions (v,v',v") and (w,w',w") are different <=> The rank of [v v' v"] [w w' w"] is 2.

Equation of a plane

Take a plane defined by three points A,B,C not on one line.
The direction of the plane is defined by the vectors AB and AC.
 
        point P is on plane ABC
<=>
        There are real numbers r and s such that
        AP = r.AB + s.AC
<=>
        There are real numbers r and s such that
        P - A = r(B - A) + s.(C - A)
<=>
        There are real numbers r and s such that
        P = A + r(B - A) + s.(C - A)
The last expression is the vectorial equation of the plane. The numbers r and s are parameters.
Now, we take a right-handed rectangular coordinate system.
All points and vectors have unique coordinates.
Say P(x,y,z) ; A(a,a',a") ; B(b,b',b") ; C(c,c',c").
Hence,
 
         point P is on plane ABC
<=>
        There are real numbers r and s such that
        co(P) = co(A) + r(co(B) - co(A)) + s.(co(C) - co(A))
<=>
        There are real numbers r and s such that
        / x = a  + r.(b  - a )  + s.(c  - a )           (1)
        | y = a' + r.(b' - a')  + s.(c' - a')           (2)
        \ z = a" + r.(b" - a")  + s.(c" - a")           (3)
These equations are called parametric equations of the plane ABC.
To eliminate r and s from previous system we write
 
         point P is on plane ABC
<=>
        There are real numbers r and s such that
        r.(b  - a )  + s.(c  - a ) = x - a
        r.(b' - a')  + s.(c' - a') = y - a'
        r.(b" - a")  + s.(c" - a") = z - a"
<=>
        The following system has a solution for r and s
        r.(b  - a )  + s.(c  - a ) = x - a
        r.(b' - a')  + s.(c' - a') = y - a'
        r.(b" - a")  + s.(c" - a") = z - a"
Since the direction vectors AB and AC give a different direction, the rank of the matrix of coefficients is 2.
The system has a solution for r and s if and only if the characteristic determinant is zero. Hence,
 
         point P is on plane ABC
<=>
        | (b  - a )      (c  - a )     (x - a )|
        | (b' - a')      (c' - a')     (y - a')|  =  0
        | (b" - a")      (c" - a")     (z - a")|

        and with properties of determinants we have
<=>
        | (x  - a )      (y  - a')     (z - a")|
        | (b  - a )      (b' - a')     (b"- a")|  =  0
        | (c  - a )      (c' - a')     (c"- a")|
This is the cartesian equation of the plane ABC.
Expanding the determinant gives an equation of the form
 
        u.x + v.y + w.z + t = 0       with u,v and w not all zero.
Each plane has an equation of this form.

Example:

Take a plane defined by A(1,0,1) ; B(2,2,0) and C(3,1,4) .
We have direction numbers (1,2,-1) and (2,1,3) corresponding with the direction vectors AB and AC.
The parametric equations of the plane ABC are
 
        / x = 1 + r.1   + s.2
        | y = 0 + r.2   + s.1
        \ z = 1 + r.(-1)+ s.3
The cartesian equation of the plane ABC is
 
        |x-1    y       z-1 |
        | 1     2        -1 |  =  0  <=> 7x - 5y - 3z - 4 = 0
        | 2     1        3  |

Dot product

Since two vectors A and B are always in a plane, the fundamental properties of the dot product of two vectors in a plane are also valid in space.
For the students who are not familiar with this properties there is : Vectors in a plane

Dot product and orthonormal basis.

Take a right-handed rectangular coordinate system in space.
Call the three axes x,y,z. Call the origin O.
Take i, j, k as unit vectors along the positive axes x,y,z.
Then, i.i = j.j = k.k = 1 and i.k = k.j = j.i = 0 ,
We say that the three vectors form an orthonormal basis in space.
With respect to this basis each vector A can uniquely be written as a.i + a'.j + a".k. The numbers (a,a',a") are the unique coordinates of A.
Take two vectors A = a.i + a'.j + a".k and B =b.i + b'.j + b".k .
 
Then,   A.B =(a.i + a'.j + a".k).(b.i + b'.j + b".k)
                Using distributivity, this becomes
        A.B = a.b + a'.b' + a".b"
                All other term disappear using
                i.i = j.j = k.k = 1 and i.k = k.j = j.i = 0

Magnitude of a vector A

As in a plane we define,
 

        (The magnitude of vector A)2  = A.A
We write this magnitude as ||A||. And if A has coordinates (a,a',a"), A.A = a.a + a'.a' + a".a"
Hence,
 

                ||A||  = sqrt(a2 + a'2 + a"2 )

Distance from point A to point B

With A(a,a',a") corresponds a vector A(a,a',a").
With B(b,b',b") corresponds a vector B(b,b',b").
The distance from point A to point B = the magnitude of vector AB.
Now, AB has coordinates (b - a,b' - a',b" - a")
 

Hence, |AB| = sqrt((b - a)2  + (b' - a')2  + (b" - a")2 )

Angle between two lines in space

Formula

The angle t between two lines is the angle between two direction vectors of the lines.
Take line a with direction vector A(a,a',a") and line b with direction vector B(b,b',b").
 
        A.B = ||A||.||B||.cos(t)
<=>
                     A.B
        cos(t) = --------------
                  ||A||.||B||

Example

Take A(1,2,3) ; B(4,5,6) ; C(3,2,0)
Calculate the angle between the lines AB and AC.
The line AB has a direction numbers (3,3,3) and line AC has direction numbers (2,0,-3).
Hence
 
                    6 + 0 - 9
        cos(t) = -----------------
                 sqrt(27) .sqrt(13)

        for the sharp angle we find 80.78 degrees.

Orthogonal lines

Two lines are orthogonal if and only if the dot product of the two direction vectors is zero.

Lines, Planes and orthogonality

Planes and parallelism

A plane ABC has equation ux + vy + wz = 0. This plane goes through the origin O(0,0,0).
A second plane DEF has equation ux + vy + wz + t = 0 with t not zero. The intersection points of these planes are the solutions of the system
 
        |  ux + vy + wz = 0
        |  ux + vy + wz + t = 0
It is easy to see that this system has no solution. The planes are parallel.
Conclusion :
The planes with equation ux + vy + wz + t = 0 and ux + vy + wz + t' = 0 are parallel because they are both parallel to ux + vy + wz = 0.

Normal vector of a plane

A plane ABC has equation ux + vy + wz + t = 0.
The plane with equation ux + vy + wz = 0 is parallel to plane ABC and goes through the origin.
For each point P(a,a',a") we have
 
        P(a,a',a") is in the plain ux + vy + wz = 0
<=>
                u.a + v.a'+ w.a"= 0
<=>
        The vectors P(a,a',a") and N(u,v,w) are orthogonal
Hence, the vector N(u,v,w) is orthogonal to all the vectors P in plane ux + vy + wz = 0. The direction of N is orthogonal to this plane and to all parallel planes. N is called a normal vector to these planes. Conclusion:
 
        The direction of vector N(u,v,w) is orthogonal
                to the plane ux + vy + wz + t = 0
        This vector is a normal vector to that plane.
Remark: Each non zero multiple of a normal vector is a normal vector.

Line orthogonal to a plane

A line is orthogonal to a plane if and only if a direction vector of the line is a normal vector to the plane.
Example:
Take A(2,2,3) ; B(4,0,1) and the plane x - y - z + 4 = 0. The direction numbers (2,-2,-2) of the line AB are the coordinates of a normal vector to the plane.

Orthogonal planes

Two planes are orthogonal if and only if a normal vector to one plane is orthogonal to a normal vector to the other plane.
Example:
The planes x - y - z + 4 = 0 and 2x - y + 3z - 2 = 0 are orthogonal.

Angle between two planes

The sharp angle between two planes is the sharp angle between the normal directions of the planes

Angle between a line and a plane

The sharp angle between a line and a plane is determined by the angle between the direction vector of the line and the normal vector of the plane.

Distance from a point to a plane

Normal equation of a plane

Say lx + my + nz + t = 0 is the equation of a plane. The numbers (l,m,n) are direction numbers of a normal vector to that plane. If l.l + m.m + n.n = 1, that normal vector is a unit vector. In that case we say that lx + my + nz + t = 0 is a normal equation of the plane.
Example 0.5x -0.5y +(1/sqrt(2))z + 5 = 0 is a normal equation of a plane.

Transform an equation to a normal equation

Let ux + vy + wz = 0 be an equation of a plane ABC. Then r(ux + vy + wz) = 0 is an equation of that plane. We'll calculate r such that r(ux + vy + wz) = 0 is a normal equation of that plane. The condition is :
 

        r2 (u2  + v2  + w2 ) = 1


<=>     r =+1/sqrt(u2  + v2  + w2 )  or  r =-1/sqrt(u2  + v2  + w2 )
Usually we choose the + sign.
Example :
 
Take the plane x + 2y + 2z - 1 = 0 .
         1
        ---(x + 2y + 2z - 1) = 0  is a normal equation of that plane.
         3

From a point to a plane

Take a random point P(a,a',a") and a plane with normal equation lx + my + nz + t = 0 . It can be proved that the distance from P to that plane =
 
        | l.a + m.a' + n.a" + t |
Example : The distance from point p(1,2,3) to the plane x + 2y + 2z - 1 = 0 is
 
          1
        |---(1.1 + 2.2 + 2.3 - 1) | = 10/3
          3

You can find solved problems about Lines - Planes - Equations - Distances - Angles here


Topics and Problems

MATH-abundance home page - tutorial

MATH-tutorial Index

The tutorial address is http://home.planetinternet.be/~ping1339

Copying Conditions

Send all suggestions and remarks to Johan.Claeys@ping.be