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
<=>
      AM = MB
<=>
     M - A = B - M
<=>
      2.M = A + B
<=>
     co(M) = (co(A) + co(B))/2
Example:
Let A(2,5,0) and B(4,3,2). The center of [AB] is M(3,4,1).

Centroid of triangle ABC

Let Z be the centroid of the triangle ABC.
 
  Let M = the center of [AB].

    CZ = 2.ZM
<=>
    Z - C = 2.(M - Z)
<=>
    3.Z = 2.M + C
<=>
    3.Z = A + B + C
<=>
    Z = (A + B + C)/3
<=>
    co(Z) = ( co(A) + co(B) + co(C) )/3
Example:
Let A(2,5,0) , B(4,3,2) and C(3,4,7).
The centroid of the triangle ABC is (3,4,3).

Center of mass of a tetrahedron ABCD

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

Lines

Equations of a line in space

Take a line BC in space.
The vector B is called a support vector of the line. The vector 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
        P = B + r (C - B)
<=>
        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 obtain these equations by eliminating r from the parametric equations.
If all the direction numbers are different from zero, previous equations are equivalent to:
 
   x - b      y - b'     z - b"
  ------ =   -------- = --------
   c - b      c'- b'     c"- b"
If a the direction number is zero, the corresponding numerator is zero.

The line BC is defined by the vectors B(b,b',b") and C(c,c',c").
The parametric equations of the line BC with support vector B(b,b',b") and direction vector BC are
 
        / x = b  + r.(c  - b )
        | y = b' + r.(c' - b')
        \ z = b" + r.(c" - b")
If all the direction numbers (c - b );(c' - b'); (c" - b") are different from zero, previous equations are equivalent to:
 
   x - b      y - b'     z - b"
  ------ =   -------- = --------
   c - b      c'- b'     c"- b"
These equations are the cartesian equations of the line BC.

Examples

Intersection point of two lines.

Based on parametric equations one can easily calculate whether or not two lines intersect.

Example 1:
Take the lines a and b

 
        / x = 1  + r.(-1)
        | y = 2  + r.3
        \ z = 3  + r.5
and

        / x = 2  + r
        | y = 1  - r
        \ z = 3  + r
r is the name of a parameter on both lines. But these parameters are independent. Therefore we give the second parameter a different name. For line b, we write
 

        / x = 2  + r'
        | y = 1  - r'
        \ z = 3  + r'
There is an intersection point if and only if the following system has a solution for r and r'.
 
   1 - r = 2 + r'
   2 + 3r = 1- r'
   3+ 5r = 3+ r'
After some calculation, we see that this system has no solutions. So the lines a and b do not intersect.

Example 2:

If two lines are given by their cartesian equations and if we want to calculate the intersection point, then we have to solve a system of 4 equations in x, y and z. This can be a rather difficult system. If we first calculate the parametric equations of the lines, this work can be circumvented.

A line r is given by its cartesian equations [ x+y+z=6 , 2x+2y+z=11 ].
A line s is given by its cartesian equations [ x+y-4z=1 , x-z=2 ].
We'll find the intersection point in two ways.

  1. We use cartesian equations

    The possible intersection is the solution of the system :

     
      /  x +  y +  z = 6
      | 2x + 2y +  z = 11
      | x  +  y - 4z = 1
      \ x       -  z = 2
    
    We apply the theory of the systems. The matrix of the coefficients is
     
      [1  1  1]
      [2  2  1]
      [1  1 -4]
      [1  0 -1]
    
    The rank of this matrix is 3. We choose the first three equations as main equations. The last equation is the side equation. There is an intersection point if and only if the system has a solution. The condition is : the characteristic determinant of the side equation is zero.
     
      |1  1  1  6|
      |2  2  1 11|
      |1  1 -4  1| = 0
      |1  0 -1  2|
    
    The condition is fulfilled! We omit the last equation. We solve the system and we find the intersection point S(3,2,1).

  2. We use parametric equations

    To find parametric equations we calculate two simple points of each line.

    For r: A(0,5,1) and B(5,0,1). We use A as support vector. (5,-5,0) is a direction vector, but then (1,-1,0) is a direction vector too. The parametric equations are :

     
      x =     r
      y = 5 - r
      z = 1
    
    For s: C(2,-1,0) and D (0 -7 -2). We use C as support vector. (2,6,2) is a direction vector, but then (1,3,1) is a direction vector too. The parametric equations are :
     
      x =  2  +  r'
      y = -1 + 3 r'
      z =       r'
    
    So we calculate r en r' from
     
      r = 2 + r'
      5 - r = -1 + 3r'
      1 = r'
    
    We find r' =1 and r = 3. The intersection point is S(3,2,1).

Example 3

Given :
The line AB with equations [2x + 2m y + z = 3 , x + y + z = 1]
The line CD with equations [3x - 2 y + z = m , x - y + z = 2]

Find m such that the lines intersect.

 
   The two lines intersect
<=>
   The following system has a solution for x, y and z

    x +    y +  z = 1
    x -    y +  z = 2
    3x - 2 y +  z = m
    2x + 2m y + z = 3
The rank of the matrix of the coefficients is 3. The system has a solution for x, y and z if and only if the characteristic determinant is zero.
The condition is
 
  | 1   1   1  1 |
  | 1  -1   1  2 |
  | 3  -2   1  m |  = 0
  | 2  2 m  1  3 |

<=>  2m + 11 = 0

<=>  m = -11/2

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 vector A is a support vector. The direction of the plane is defined by the vectors AB and AC.
The vectors AB and AC are direction vectors.
 
        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.

The parametric equations of the plane through the points A(a,a',a") ; B(b,b',b") ; C(c,c',c") are
 
        / x = a  + r.(b  - a ) + s.(c  - a )
        | y = a' + r.(b' - a') + s.(c' - a')
        \ z = a" + r.(b" - a") + s.(c" - a")

To obtain the cartesian equation of the plane, we eliminate r and s from the parametric equations.

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.
The first row of the determinant contains the coordinates of the support vector.
The second and the third row contain the coordinates of two direction vectors.
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.

The cartesian equation of a plane through the points A(a,a',a") ; B(b,b',b") ; C(c,c',c") is
 
        | (x  - a )      (y  - a')     (z - a")|
        | (b  - a )      (b' - a')     (b"- a")|  =  0
        | (c  - a )      (c' - a')     (c"- a")|

  The equation can be written as

        u.x + v.y + w.z + t = 0       with  u,v en w not all zero.

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  |

Intersection of two planes

Given: two planes 7x - 5y - 3z - 4 = 0 and x - 2y + 3z - 2 = 0
A point P(x,y,z) is an intersection point if and only if x, y and z are a solution of
 
/ 7x - 5y - 3z - 4 = 0
\  x - 2y + 3z - 2 = 0
We already know that the cartesian representation of a line consists of two equations. Well, this is precisely what we have in previous system. So, the above system is the expression of the intersection line.

If two planes are parallel there is no line corresponding with the system of the equations of the planes. The following systems do not represent a line

 
/ 7x - 5y - 3z - 4 = 0
\ 7x - 5y - 3z - 5 = 0
The planes have no common point.



/ x + 3y + 2z + 3= 0
\ 2x + 6y + 4z + 6 =0
The planes coincide.


From parametric equations of two planes to the cartesian equations of a line.
Two planes are given by their parametric equations
 
 x = r + s
 y =    3s
 z = 2r

and

 x = 1 + r + s
 y = 2 + r
 z = -3    + s
Find the cartesian equations of the intersection line.

Solution :

First, we calculate the cartesian equations of the two planes

 
   | x  y  z |
   | 1  0  2 | = 0  <=> 6x - 2y - 3z = 0
   | 1  3  0 |

   |x-1   y-2  z+3 |
   | 1     1    0  | = 0 <=>  x - y - z - 2 = 0
   | 1     0    1  |

   The cartesian equations of the intersection line are

   / 6x - 2y - 3z = 0
   \ x - y - z - 2 = 0

Bundle of Planes

Suppose that two planes are given: 7x - 5y - 3z - 4 = 0 and x - 2y + 3z - 2 = 0.
Now, take a plane with equation k.(7x - 5y - 3z - 4) + l.(x - 2y + 3z - 2) = 0
Here k and l are homogeneous parameters. We have :
 
P(a,b,c) is on the intersection of 7x - 5y - 3z - 4 = 0 and  x - 2y + 3z - 2 = 0

=>   7a - 5b - 3c - 4 = 0  and  a - 2b + 3c - 2 = 0

=>  k.(7a - 5b - 3c - 4) + l.(a - 2b + 3c - 2) = 0

=>  P(a,b,c) is a point of the plane k.(7x - 5y - 3z - 4) + l.(x - 2y + 3z - 2) = 0
So, each point of the intersection of 7x - 5y - 3z - 4 = 0 and x - 2y + 3z - 2 = 0 is a point of the plane k.(7x - 5y - 3z - 4) + l.(x - 2y + 3z - 2) = 0.
 
  The plane

  k.(7x - 5y - 3z - 4) + l.(x - 2y + 3z - 2) = 0

  is a variable plane through the intersection of

   7x - 5y - 3z - 4 = 0 and  x - 2y + 3z - 2 = 0
If k and l vary, the plane rotates around this fixed intersection line. Then we have a bundle of planes. The parameters k and l are homogeneous parameters.

Let t = l/k.
Then, the equation of the bundle becomes

 
   (7x - 5y - 3z - 4) + t.(x - 2y + 3z - 2) = 0.
t is a non-homogeneous parameter.

General formulation

 
  The plane

  k.(ux + vy + wz + q ) + l.(u'x + v'y + w'z + q') = 0

 is a variable plane through the line with equations

  / ux + vy + wz + q = 0
  \ u'x + v'y + w'z + q'= 0

 k and  l are homogeneous parameters.

 The variable plane can be written with the use of a non-homogeneous parameter t.

  (ux + vy + wz + q ) + t(u'x + v'y + w'z + q') = 0

Example 1:
Point D(1,2,3) is on a line d with direction (3,2,1). Find the plane through d and through the point F(0,4,0).

 
The line d has equations
   x -1     y - 2      z - 3
  ------ = ------- = --------
    3        2          1
<=>
   x - 3 z + 8 = 0 and  y - 2 z + 4 = 0
The variable plane through d is (x - 3 z + 8)+ t(y - 2 z + 4) = 0
Point F is on that plane if and only if 8 + t(4+4) = 0 <=> t = -1
The requested plane is x - y - z + 4 = 0.

Example 2:
Given : The lines p , q and l
 
  p   [ x + y - z + 1 = 0 ; 2x - y + z + 3 = 0]

  q   [ 2x + y - 1 = 0 ; x + y - z - 1 = 0 ]

  l   [ x + y + z = 0 ; 2x - y + 3z = 0 ]
Find the equations of the variable line m intersecting p, q and l.

Procedure:

Take a variable point L on the line l. The requested line m is the intersection of the planes (L,p) and (L,q).

 
     
Working out :
  1. The line l goes through O(0,0,0) and (-4,1,3).
    So l has (-4,1,3) as direction.
    A variable point of the line l is L(-4r, r, 3r).

  2. The plane (L,p)
     
      A variable plane through the line p is
    
       (x + y - z + 1) + t(2x - y + z + 3) = 0
    
       L is in that plane if and only if
    
       (-4r + r - 3r + 1) + t (-8r - r + 3r + 3) = 0
    <=>
        t = (6r-1)/(-6r+3)
    
       The plane (L,p) is
    
       (-6r+3)(x + y - z + 1) + (6r-1)(2x - y + z + 3) = 0
    
  3. The plane (L,q)
     
      A variable plane through the line q is
    
       (x + y - z - 1) + t ( 2x + y - 1) = 0
    
       L is in that plane if and only if
    
       (-4r + r - 3r - 1) + t (-8r + r - 1) = 0
    <=>
        t = (6r+1)/(-7r-1)
    
       The plane (L,q) is
    
       (-7r-1)(x + y - z - 1) + (6r+1) ( 2x + y - 1) = 0
    
  4. The requested line m is
     
        / (-6r+3)(x + y - z + 1) + (6r-1)(2x - y + z + 3) = 0
        \ (-7r-1)(x + y - z - 1) + (6r+1) ( 2x + y - 1) = 0
    
For each value of the parameter r, we get a line intersecting p, q and l.

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.
Relative 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
 
     Relative to an orthonormal basis in space, we have:

     The dot product of two vectors
     A(a,a',a") and  B(b,b',b") is a.b + a'.b' + a".b"

     We write
     A.B = a.b + a'.b' + a".b"

Example:

Take two vectors A(3,2,5) and B(1,0,4).
A.B = 3 + 0 + 20 = 23.

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 )
Example:

The magnitude of vector A(2,-1,4) is sqrt(4+1+16) = sqrt(21).

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 sharp 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 vectors

Two vectors a and b are orthogonal if and only if a.b = 0

Example :
v(1,4,-1) en w(5,-1,1) are orthogonal vectors

Orthogonal lines

Two lines are orthogonal if and only if the direction vectors are orthogonal.

Example:
Find the m-values such that the following lines are orthogonal
 
 / x = 2 + (2m-1)r
 | y = 3 + m r
 \ z = 2 + r

 / x = 2 - r
 | y = 3 + m r
 \ z = 6

The direction vectors are ( 2m-1 , m , 1 ) and ( -1 , m , 0)

The lines are orthogonal if and only if -2m + 1 + m2 = 0 <=> m = 1

Common perpendicular to non-coplanar lines and dot product

The lines b and c are not coplanar lines.
The common perpendicular to b and c is the line that meets both lines and is perpendicular to both.

Example :

The line b contains the point B(1,2,1) and has a direction vector v(3,2,1).
The line c contains the point C(-2,2,-1) and has a direction vector w(1,-1,2).
Find the common perpendicular to the lines b and c.

Take on line b a variable point P= P(1 + 3r, 2 + 2r, 1+ r).
Take on line c a variable point Q= Q(-2 + s, 2 - s, -1 + 2s).
Then the vector PQ = PQ(-3 + s -3r, -s -2r, -2 + 2s -r)

 
     
The vector PQ must be perpendicular to v and to w. The conditions are:
 
  PQ . v = 0  <=> ... <=> -14 r + 3 s = 11
  PQ . w = 0  <=> ... <=> - 3 r + 6 s = 7
From this system we find r = -3/5 and s = 13/15.
Then P = P(-4/5, 4/5, 2/5) and Q = Q(-17/15, 17/15, 11/15).
The line PQ is the common perpendicular to b and c. Its direction is (-1, 1 1).
The parametric equations of PQ are
 
  x = -4/5 - r
  y = 4/5 + r
  z = 2/5 + r

Lines, Planes orthogonal and parallel

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 fot t not zero. 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.

Cross product

Definition

The cross product a × b of two vectors a and b is a vector defined by three rules:
  1. The vector a × b is orthogonal with a and with b
  2. a, b and a × b form a right handed coordinate system
  3. ||a × b|| = ||a||.||b|| sin(theta) , with theta the angle between a and b .

Practical calculation of the cross product

If a(x,y,z) and b(x',y',z') (coordinates in an orthonormal system)
Then the coordinates of a × b are the cofactors of c1, c2 and c3 in the determinant
 
| c1     c2    c3 |
|  x     y     z |
|  x'    y'    z'|
These cofactors are
 
  (y z' - y' z)
 -(x z' - x' z)
  (x y' - x' y)
Example

The cross product of a(1,3,2) and b(-1,2,4) is the vector with coordinates the cofactors of * in the determinant

 
|   *    *     * |
|   1    3     2 |
|  -1    2     4 |
We find (8,-6,5). The vector c(8,-6,5) is orthogonal with a and c.

Different names for 'cross product'

cross product and vector product are synonyms

Theoretical background

See " http://mathworld.wolfram.com/CrossProduct.html

The common perpendicular to non-coplanar lines and cross product

The line b contains the point B(1,2,1) and has a direction vector v(3,2,1).
The line c contains the point C(-2,2,-1) and has a direction vector w(1,-1,2).
Find the common perpendicular d to the lines b and c.

The cross product v × w = u(5,-5,-5) gives the direction orthogonal to both lines b and c. So the direction (-1,1,1) is the direction of the common perpendicular.
 
    
The plane beta through b and with direction (-1,1,1) is
 
   | x - 1  y - 2  z - 1 |
   |   3      2      1   | = 0
   |  -1      1      1   |

<=> x - 4 y + 5 z + 2 = 0
The plane gamma through c and with direction (-1,1,1) is
 
   | x + 2  y - 2  z - 1 |
   |   1     -1      2   | = 0
   |  -1      1      1   |

<=>  x + y = 0
The common perpendicular d is the intersection line of these planes. The equations of d are :
 
   / x - 4 y + 5 z + 2 = 0
   \ x + y = 0

Normal vector to 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.

Note:

Example 1:

The plane 3x + 2y + z -12 = 0 has a normal vectors (3, 2, 1) , (-6, -4, -2) ....

Example 2:

Given: point P(1,2,3) and the vector v(4,5,6).
The plane through point P and with normal vector v is

 
   4 (x-1) + 5 (y-2) + 6 (z-3) = 0
<=>
   4 x + 5 y + 6 z - 32 = 0

Parallel planes

Two planes are parallel if and only if their normal vectors have the same direction.

Example 1:
m are n are different real parameters different from zero.
Find the values of m and n such that the following planes are parallel.
 
  m x + m y + n z = 1     (1)

  n x + n y + m z = 1     (2)

A normal vector to plane (1) is a(m, m, n).
A normal vector to plane (2) is b(n, n, m).

 
   The planes are parallel
<=>
   a and b have the same direction
<=>
   the rank of the following matrix is 1
   [ m  m  n ]
   [ n  n  m ]
<=>
   / m n - n m = 0
   \ m2 - n2 = 0
<=>
    m2 - n2 = 0

          and since m and n are different
<=>
    m + n = 0
Conclusion : The planes are parallel if and only if m+ n = 0.

Example 2:
Find the m-values such that the following system does not represent a line.
 
    / x - my = 2-m
    \ 3x - mz = 6 - 3m

 
     The system does not represent a line
<=>
     The planes x - my = 2-m  and  3x - mz = 6 - 3m are parallel
<=>
     The normal vectors of the planes have the same direction
<=>
     the rank of the following matrix is 1

   [ 1  -m   0 ]
   [ 3   0  -m ]
<=>
    3m = 0  en m2 = 0
<=>
    m = 0

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.
The line AB is orthogonal to that 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.

Property:
If two planes are orthogonal, a normal vector to one plane is a direction vector of the other plane.

Angle between two planes

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

Example:
Find the angle between the plane x + y + z = 4 and the plane x + 2y +3z = 5

n(1,1,1) is normal to the first plane.
m(1,2,3) is normal to the second plane.
cos(m,n) = (m.n)/(||m||.||n||) = 0.925
The sharp angle between m and n is 22.2 degrees.
The angle between the planes is 22.2 degrees.

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 to the plane.

Example:
Find the angle between
the plane x + y +z = 4 and
the line [x = 1 + r ; y = 1+ 2r ; z = 1 + 3r].

n(1,1,1) is normal to the plane.
m(1,2,3) is a direction vector of the line.
cos(m,n) = (m.n)/(||m||.||n||) = 0.925
The sharp angle between m and n is 22.2 degrees.
The sharp angle between the line and the plane is 67.8 degrees.

Direction vector of a line

We know that the direction vector of a line can be found using two points of that line. However, there is a second simple method.
Example:
The line has equations
 
      3x -2 y + 7z - 4 = 0
      2x - 5y + 3z - 5 = 0
In fact, this line is the intersection of the planes [3x -2 y + 7z - 4 = 0 ; 2x - 5y + 3z - 5 = 0]
The direction of this intersection is the direction orthogonal to the normal vectors of the planes. It is the direction of the cross product of these two normal vectors. In our example it is the direction of the cross product of the vectors (3,-2,7) and (2,-5,3). This direction (29,5,-11) is the direction of the given line.

General formulation
 
The direction vector of the line

   / u x + v y + w z + t = 0
   \ u'x + v'y + w'z + t'= 0

is the direction of the cross product of the vectors

   (u , v, w) and ((u', v', w')

Example 1:
The line m has equations [2x + ry + 1 = 0 ; x + 3z + 1 = 0]
The line n has equations [x + y + rz + 3 = 0 ; x - 2y + r = 0]
Find the r-values such that the lines m and n are orthogonal.

A direction vector of m is given by the cross product of (2,r,0) and (1,0,3). We find (3r, 6, -r).

A direction vector of n is given by the cross product of (1,1,r) and (1,-2,0). We find (2r, r, -3).

The lines m and n are orthogonal if and only if the dot product of their direction vectors is zero. This condition is

 
     6r2 + 6r + 3r = 0
<=>
     6r2 + 9r = 0
<=>
     3r(2r+3) = 0
<=>
     r = 0 of r = -3/2
Example 2:
The line m has equations [x - r y = 2 - r ; 3x - r z = 6 - 3r]
The line n has equations [x + 2z = 1 ; y - (r-1)z = 0 ]
r is different from 0.
Find the r-values such that the lines m and n are parallel.

A direction vector of m is given by the cross product of (1, -r, 0) and (3, 0, -r). We find (r2, r, 3r) or also (r, 1, 3).

A direction vector of n is given by the cross product of (1, 0, 2) and (0, 1, 1-r). We find (-2, r-1, 1).

 
   m and n are parallel
<=>
   m and n have the same direction
<=>
   The following matrix has rank = 1

     [ r     1    3]
     [ -2   r-1   1]
<=>
      / r+6 = 0
      \ 1-3(r-1) = 0
The last system has no solution.
The lines m and n are never parallel.

The 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

Distance 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 1:
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
Example 2:
The vertices of the triangle base of a pyramid are A(0,0,0) ; B(1,2,3) ; C(3,4,4).
The fourth vertex is T(2,5,8).
Find the volume of the pyramid TABC.

 
  We first calculate the area of triangle ABC with Heron's formula
        c = |AB| = sqrt(14)
        b = |AC| = sqrt(41)
        a = |BC| = 3

  The semiperimeter of the triangle is s = 6.57

  With Heron's formula, the area of the triangle ABC is sqrt(s(s-a)(s-b)(s-c))= 3.354

  The height of the pyramid is the distance from T to the plane ABC.
  The plane ABC has equation 4x - 5y + 2z = 0
  The distance from T to the plane ABC is

       | 4 . 2 - 5 . 5 + 2 . 8|
      -------------------------- = 1/sqrt(45)
           sqrt(45)

  The volume of the pyramid is

     (1/3) (Area of triangle ABC). height = 0.1666

Planes bisecting the angle between two planes

The locus of all points equidistant from two intersecting planes form the planes bisecting the angle between the two given planes.

Example:

We start with two planes 2 x - y + 2 z + 5 = 0 and x - 2 y - 2 z - 3 = 0.

 
   P(x,y,z) is equidistant from the given planes

<=>

    2 x - y + 2 z + 5         x - 2 y - 2 z - 3
  | ----------------- | =  | ------------------- |
    sqrt(4 + 1 + 4)            sqrt(1 + 4 + 4)

<=>

  | 2 x - y + 2 z + 5 | = |  x - 2 y - 2 z - 3 |

<=>

   2 x - y + 2 z + 5 = ± (x - 2 y - 2 z - 3)

<=>
   x + y + 4 z + 8 = 0  or 3 x - 3 y + 2 = 0

Bundle of planes and distance

The line d has equations
 
  x + y + z -3 = 0
 2x - y + z -1 = 0
Find the planes through the line d such that the distance from P(2,1,1) to these planes is equal to one.

All the planes through the line d form a bundle. A variable plane of this bundle is

 
    (x + y + z -3) + t(2x - y + z -1) = 0
<=>
   (1 + 2t)x + (1 - t)y + (1 + t)z -3 -t = 0

t is parameter. We look for the values of t such that the distance from P to this plane is one. The condition is :
 
   (1 + 2t).2 + (1 - t) + (1 + t) -3 - t
  --------------------------------------------- = 1
  sqrt( (1 + 2t)2 + (1 - t)2 + (1 + t)2 )

We find the values : t1 = 0.55 and t2 = -1.22

The required planes are:

 
  (x + y + z -3) + 0.55 (2x - y + z -1) = 0
and
  (x + y + z -3) - 1.22 (2x - y + z -1) = 0

Distance from a Point to a Line

Find the distance from point P(1,1,1) to the line with parametric equations
 
   x = 2 + r
   y = 3 + 2r
   z = 1 + r

Draw a figure with all the items.

First method:

Second method

Third method

Distance between two lines

We calculate the distance from a point of the first line, to the plane through the second line and parallel to the first one.
 
       
Example:
The line a has equations [ x - y - 1 = 0 ; x + y - z = 0 ]
The line b has parameter equations [ x = t ; y = t - 2 ; z = t ]

To find the direction of line a we take two simple points on line a.
A1(1,0,1) and A2(0, -1,-1). The direction of line a is (1,1,2).

The plane through line b and parallel to line a has the equation

 
  | x  y+2  z |
  | 1   1   1 | = 0
  | 1   1   2 |

<=>  x - y - 2 = 0
Now, we calculate the distance from A1 to this plane.
 
      1 - 0 - 2           1
  | -------------- | = ------
    sqrt(1 + 1 + 0)    sqrt(2)
1/sqrt(2) is the distance between the lines a and b.

Projection of a vector on a plane and matrix of the projection.

The orthogonal projection P of a vector V on a plane through O is the difference between the vector V and his orthogonal projection P' on a normal vector N to that plane.
 

So, V = P + P'
We know from the theory of vectors that the orthogonal projection P' of V on N is equal to (V.N)N/N2.
As soon as P' is known, we can find P by P = V - P'.

Example:

Relative to a given orthonormal basis V = V(3,5,2).
The plane has as equation x + y -2 z = 0.
We calculate the orthogonal projection of V on that plane.

 
   N(1,1,-2) is a normal vector of the plane.

   The projection P' of  V on N is 4 N /6 = 2 N /3

   P'(2/3, 2/3, -4/3)

   The projection P of V on the plane is

   V(3,5,2) - P'((2/3, 2/3, -4/3) = P(7/3, 13/3, 10/3)

The orthogonal projection of vectors on a plane through point O is a linear transformation of the three dimensional space. With this projection corresponds a matrix Ao and with this matrix we can find the projection of any vector in a simpel way.

Finding the matrix Ao is not obvious. For this purpose we rely on the knowledge about changing the basis of the vector space and its consequences on the matrix of the projection.

We start by choosing 3 new base vectors. As base vectors we choose two independent vectors in the given plane and as third vector we choose a normal vector to that plane. For example:
( A(1,-1,0) ; B(2,0,1) ; N(1,1,-2) )

Relative to this new basis all vectors have new coordinates. From the theory of the vector spaces we know that these new coordinates are connected to the old coordinates by a matrix C. The columns of C are the coordinates of the new basis vectors relative to the original (old) basis. In our example is

 
      [ 1  2  1]
  C = [-1  0  1]
      [ 0  1 -2]
Relative to this new basis the linear transformation has a simple matrix. The columns of this matrix are the new coordinates of the projected new basis vectors.
 
   new  basisvector     new coordinates of the projected basis vector
   ----------------    ----------------------------------------------
          A                       (1,0,0)
          B                       (0,1,0)
          N                       (0,0,0)

The matrix of the projection relative to the new basis is

        [1 0 0]
 An =   [0 1 0]
        [0 0 0]

Between the old and the new matrix of the projection  we have the connection

     An = C-1 Ao C
<=>
     Ao = C An C-1

With this we calculate the  matrix Ao of the projection relative
to the natural basis. We find:

               [ 5 -1  2]
  Ao = (1/6)   [-1  5  2]
               [ 2  2  2]
Once this result is found, it is very easy to find the reflection of any vector.

As an example, we retake the vector V(3,5,2) from above. The image is :

 
        [ 5 -1  2] [3]   [ 7/3]
  (1/6) [-1  5  2] [5] = [13/3]
        [ 2  2  2] [2]   [10/3]
So,in a very simple way, we find the same result as above.

Reflection of a vector in a plane and matrix of this reflection.

The orthogonal reflection V ' of a vector V in a plane through O is connected with the orthogonal projection P of V on that plane. We have V + V ' = 2P

To find the reflection V ' it is sufficient to find P (see previous paragraph).

Example:

Relative to a given orthonormal basis V = V(3,5,2).
The plane has as equation x + y -2 z = 0.

We calculate the reflection V ' of V in the given plane.

In the previous paragraph, we have found that te projection of V on the plane is equal to P(7/3, 13/3, 10/3).

 
  V' = 2 P - V

  2 (7/3, 13/3, 10/3) - (3, 5, 2) = (5/3, 11/3, 14/3)

  V' = V'(5/3, 11/3, 14/3)
The orthogonal reflection of vectors in a plane through O is a linear transformation in a three dimensional space.

With this reflection corresponds a matrix Ao and with this matrix we can calculate the reflection of any vector in a simple way.

Finding the matrix Ao is not obvious. For this purpose we rely on the knowledge about changing the basis of the vector space and its consequences on the matrix of the projection.

We start by choosing 3 new base vectors. As base vectors we choose two independent vectors in the given plane and as third vector we choose a normal vector to that plane. For example:
( A(1,-1,0) ; B(2,0,1) ; N(1,1,-2) )

Relative to this new basis all vectors have new coordinates. From the theory of the vector spaces we know that these new coordinates are connected to the old coordinates by a matrix C. The columns of C are the coordinates of the new basis vectors relative to the original (old) basis. In our example is

 
      [ 1  2  1]
  C = [-1  0  1]
      [ 0  1 -2]
Relative to this new basis the linear transformation has a simple matrix. The columns of this matrix are the new coordinates of the mirrored new basis vectors.
 
   new  basis vector      new coordinates of the mirrored basis vector
   -------------------    --------------------------------------------
          A                       (1,0, 0)
          B                       (0,1, 0)
          N                       (0,0,-1)

The matrix of the reflection relative to the new basis is

        [1 0  0]
 An =   [0 1  0]
        [0 0 -1]

Between the old and the new matrix of the reflection  we have the connection

     An = C-1 Ao C
<=>
     Ao = C An C-1

With this we calculate the  matrix Ao of the reflection with respect
to the natural basis. We find:

                [ 2   -1  2  ]
     Ao = (1/3) [ -1  2   2  ]
                [ 2   2   -1 ]
Once this result is found, it is very easy to find the reflection of any vector.

As an example, we retake the vector V(3,5,2) from above. The image is :

 
            [ 2   -1  2  ] [3]   [ 5/3]
      (1/3) [ -1  2   2  ] [5] = [11/3]
            [ 2   2   -1 ] [2]   [14/3]
So,in a very simple way, we find the same result as above.

Exercises about lines, planes, distances, angles

You can find solved problems about Lines - Planes - Equations - Distances - Angles with this link
 




Topics and Problems

MATH-abundance home page - tutorial

MATH-tutorial Index

The tutorial address is http://home.scarlet.be/math/

Copying Conditions

Send all suggestions, remarks and reports on errors to Johan.Claeys@ping.be     The subject of the mail must contain the flemish word 'wiskunde' because other mails are filtered to Trash