COORDINATE GEOMETRY IN SPACE
EQUATION OF A LINE
Math123: Vectors and Geometry
Eyram Schwinger PhD
University of Ghana
February 8, 2021
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Equation of a line through a given point and parallel to a
given vector
Let A(r1 ) be a xed point in space and d 6= 0 be a xed vector. We
want to derive the equation of the straight line L passing through A
and parallel to d.
Figure 1: Vector Line
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Equation of a line through a given point and parallel to a
given vector
From gure 1, We choose P (r) as any point on the line. By the
algebra of vectors
−→ −→ −→
OP = OA + AP
Since P has position vector r and A has position vector r1 ,
−→ −→ −→
OP = OA + AP
−→
r = r1 + AP
−→
Since AP is parallel to the direction vector of the line L, we have
that
−→
AP = λd .
Thus
r = r 1 + λd . Parametric form of the equation of the line.
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Equation of a line through a given point and parallel to a
given vector
x x1 a
Let r = y , r1 = y1 , d = b , then
z z1 c
r = r 1 + λd
means
x x1 a
y = y1 + λ b ,
z z1 c
so
x = x1 + λa (1)
y = y1 + λb (2)
z = z 1 + λc . (3)
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
From equation (1) to (3)
x − x1
λ=
a
y − y1
λ=
b
z − z1
λ= .
c
Thus any point on the line satises the equation
x − x1 y − y1 z − z1
= = (a 6= 0, b 6= 0, c 6= 0).
a b c
This is the cartesian form of the equation of the line.
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Equation of a line that passes through two points
Let A(r 1 ) and B (r 2 ) be two given points in space.
Figure 2: Line between two points
In this case we can dene the direction vector of the line using the
points A, B . Thus
−→
AB = r 2 − r 1 = d .
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Equation of a line that passes through two points
So
r = r 1 + λd (4)
= r 1 + λ(r 2 − r 1 ) (5)
= (1 − λ)r 1 + λr 2 . (6)
The line can be described with the alternative equations
r = r 1 + λ(r 1 − r 2 ) = r 1 − λd
= r 2 + λ(r 2 − r 1 ) = r 2 + λd
= r 2 + λ(r 1 − r 2 ) = r 2 − λd .
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
x2
We write the vector r 2 in component as r 2 = y2 . From
z2
equation (5)
r = r 1 + λ(r 2 − r 1 )
x x1 x2 − x1
y = y1 + λ y2 − y1 ,
z z1 z2 − z1
Expanding components
x = x1 + λ(x2 − x1 )
y = y1 + λ(y2 − y1 )
z = z1 + λ(z2 − z1 ).
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Equation of a line that passes through two points
Again we can eliminate λ to give the component form of the
equation of the line as
x − x1 y − y1 z − z1
= = , (x2 6= x1 , y2 6= y1 , z2 6= z1 ).
x2 − x1 y2 − y1 z2 − z1
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Observations
p
Let λ = , then equation (6) becomes
p+q
qr 1 + pr 2
r=
p+q
thus r divides the line segment AB in the ratio p : q.
The coecients of equation (6) sum to zero
r = (1 − λ)r 1 + λr 2
=⇒ r − (1 − λ)r 1 − λr 2 = 0
and also
1 − (1 − λ) − λ = 0.
So A, B , P are collinear.
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Perpendicular distance from a point to a line
Let the line L be represented by
r = a + λd
let C (c ) be a point not on the line. We want to nd the
perpendicular distance from C to the line.
Figure 3: Perpendicular distance from a point to a line
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Perpendicular distance from a point to a line
From gure 3,
|CN |
sin β = =⇒ |CN | = |AC | sin β.
|AC |
What we know
−→
|d |
AC sin β
|AC | sin β =
|d |
−→
= d̂ × AC
|d × (c − a)|
=
|d |
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Thus
|d × (c − a)|
|CN | = .
|d |
Compare to the equation of the line
r = a + λd
=⇒ r − a = λd
=⇒ (r − a)×d = 0.
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Finding the foot of the perpendicular
Since N lies on the line,
n = a + λ d.
n
−→
We also know that CN is perpendicular to the line, hence
−→
CN · d = 0
so
d ·n =d ·c
and
d · n = d · a + λ |d |2
n
d · c = d · a + λ |d |2
n
λ |d |2 = d · (c − a)
n
d · (c − a )
λ = .
|d |2
n
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
This means that
d · (c − a)
n=a+ d
|d |2
= a + d̂ · (c − a) d̂ .
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Perpendicular distance from a point to a line
−→ −→
Alternatively, we know that AN is the scalar projection of AC on
the line. Hence −→
−→ AC · d
AN =
|d |
thus
−→ !2
AC · d
|CN | = |AC | −
2 2
|d |
1
= (c − a)2 − ((c − a) · d )2 .
|d | 2
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
The angle between two lines
Figure 4: Angle between two lines
Consider the two straight lines in gure 4 above,
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
with
l1 = a1 + λd 1
and
l2 = a2 + µd 2 .
Since the lines l1 and l2 are parallel to the vectors d 1 and d 2 ,
d1 · d2
cos θ = .
|d 1 | |d 2 |
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Conditions for two lines to be coplanar
If two lines are coplanar, then one of the following holds
1 The two lines intersect
2 The two lines are parallel.
Figure 5: Conditions for two lines to be coplanar
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Conditions for two lines to be coplanar
Let the two lines be dened by
l1 = a1 + λd 1
and
l2 = a2 + µd 2 .
If the two lines are parallel then
d 1 × d 2 = 0.
If the two lines are intersect, then
a1 + λd 1 = a2 + µd 2 .
a1 − a2 = µ d 2 − λ d 1
i i
Taking the dot product on both sides with (d 1 × d 2 )
(a1 − a2 ) · (d 1 × d 2 ) = µ d 2 · (d 1 × d 2 ) − λ d 1 · (d 1 × d 2 )
i i
=0
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Conditions for two lines to be coplanar
Two lines
l1 = a1 + λd 1
and
l2 = a2 + µd 2 .
are coplanar if
(a1 − a2 ) · (d 1 × d 2 ) = 0.
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
The equation of the bisectors of the angles between between
two lines
Figure 6: Angle Bisectors
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Figure 7: Angle bisectors - derivation
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Consider the lines in gure 7.
l1 = a + λd 1
l2 = a + µd 2
Let P (r ) be a point on the internal bisector of the angle B1 AB2 .
−→ −→
Let N be a point on AB1 with NP parallel to AB 2 . The AP bisects
B1 AB2 , so |AN | = |NP | = t .
−→
AN = t d̂ 1 = td 1 / |d 1 |
−→
NP = t d̂ 2 = td 2 / |d 2 |
−→ −→ −→
AP = r − a = AN + NP
d1 d2
=t +
|d 1 | |d 2 |
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
so
d1 d
r =a+t + 2 .
|d 1 | |d 2 |
This is the equation of the internal bisector of the angle between
lines l1 and l2 . To nd the equation of the external bisector,
consider the angle B2 AB3 in gure 7. That means we will consider
the direction vectors −d 1 and d 2 so the equation of the external
bisector becomes
d2 d
r =a+t − 1 .
|d 2 | |d 1 |
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Skew lines (Shortest distance between two skew lines)
Figure 8: Skew lines
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Skew lines are non-intersecting and non-parallel straight lines
in space
They have a common perpendicular. The length of this
perpendicular is the shortest distance between the lines.
From the two lines l1 , l2 in gure 8, let
l1 = a 1 + λ d 1
l 2 = a 2 + µd 2
−→
and let QP be the vector representing the shortest distance
between them.
−→
QP = p − q = a1 + λd 1 − (a2 + µd 2 )
= a1 − a2 + λd 1 − µd 2
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
−→ −→ −→
QP is perpendicular to l1 , l2 thus QP · d 1 = 0 and QP · d 2 = 0.
These conditions set up the simultaneous equations
λ |d 1 | − µd 1 · d 2 = (a2 − a1 ) · d 1
λd 1 · d 2 − µ |d 2 | = (a2 − a1 ) · d 2 .
which we solve for the unique λ and µ that determine the position
vectors of P and Q .
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
Skew lines
−→
Alternatively, given QP is perpendicular to l1 , l2
−→
QP = sd 1 × d 2 .
Let
d1 × d2
n = d 1 × d 2 ⇒ n̂ =
|d 1 × d 2 |
−→ −→
thus QP = s |d 1 × d 2 | n̂ = t n̂. So QP = t is the shortest distance
between l1 and l2 . Let D (a1 ) and A(a2 ) be points on l1 and l2
respectively (see gure 8).
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A
−→ −→
So QP is a projection of AD along the shortest distance,
|QP | = |AD | cos θ = |a1 − a2 | cos θ
−→ −→
QP · AD t n̂ · (a1 − a2 )
= |a1 − a2 | −→ −→ = |a1 − a2 |
QP AD t |a 1 − a 2 |
(d 1 × d 2 ) · (a1 − a2 )
= n̂ · (a1 − a2 ) =
|d 1 × d 2 |
and
−→
QP = {n̂ · (a1 − a2 )} n̂
Eyram Schwinger PhD COORDINATE GEOMETRY IN SPACE EQUATION OF A