The equations of straight lines in 3D are not the same as those in 2D. So do not mix them up. In 2D, a line is given by a single equation in x and y, but in 3D, one equation like that represents a plane, not a line.
In fact, the correct extension of a straight line from 2D to 3D is not another line, but a plane. This might seem surprising at first, but you will learn that the way planes are written in 3D is very similar to how straight lines are written in 2D.
This does not mean lines in 3D have nothing in common with lines in 2D. There are still some similarities, but their equations are quite different. You will understand this better when you study vector and parametric forms of lines in space.
So how does one write the equation? Suppose you have a line in space. How do you correctly specify this line — that it is this particular line and no other? One point and a direction would be sufficient, if you think carefully.
A straight line in space is completely determined by:
A point through which it passes, and
A direction in which it extends.
Suppose a known point on the line is (x1,y1,z1), and a vector parallel to the line is
d=ai^+bj^+ck^.
Then (a,b,c) are called the direction ratios of the line.
Let (x,y,z) be any general point on the line. Since both (x1,y1,z1) and (x,y,z) lie on the same line, the vector joining them is
r=(x−x1)i^+(y−y1)j^+(z−z1)k^.
This vector must be parallel to d=ai^+bj^+ck^.
Since the two vectors are parallel, their corresponding components must be in the same ratio. Therefore,
ax−x1=by−y1=cz−z1.
This is called the symmetric form of the equation of a line in 3D.
Any point (x,y,z) that satisfies this equation lies on the line. Conversely, every point on the line must satisfy this relation.
For example:
A line passing through the point (1,2,−3) and having direction ratios (−1,2,−3) has the equation:
Since all three ratios are equal to the same constant, we may assume this common value to be a parameter, say λ. That is,
ax−x1=by−y1=cz−z1=λ.
From this, we get:
xyz=x1+λa,=y1+λb,=z1+λc.
This form is called the parametric form of the line, because the coordinates of every point on the line depend on a parameter λ, which can take any real value.
Thus, any point on the line can be written as
(x,y,z)=(x1+λa,y1+λb,z1+λc)for some λ∈R.
Example:
Consider the line whose symmetric equation is
2x−1=3y+3=4z.
Let the common ratio be λ. Then,
xyz=1+2λ,=−3+3λ,=0+4λ.
So the parametric form of the line is:
(x,y,z)=(1+2λ,−3+3λ,4λ),λ∈R.
For example, taking λ=1, we get the point
(1+2,−3+3,4)=(3,0,4)
which lies on the line.
Every different value of λ gives a different point on the line. So two distinct points on the line always correspond to two distinct values of λ.
Let a be the position vector of a fixed point A on the line, and let b be a vector parallel to the line. Let r be the position vector of a general point P on the line.
Then the vector AP is given by:
AP=r−a.
Since the vector AP lies along the line and b is also parallel to the line, they must be collinear. Hence, we must have:
r−a=λbfor some λ∈R.
This gives the vector equation of the line:
r=a+λb,λ∈R.
This is the parametric form of the line written in vector notation. The point a fixes the location of the line in space, and the vector b gives its direction.
These are exactly the parametric equations of the line in Cartesian form. So the vector form r=a+λb is nothing but a compact and elegant way of writing the same information.
Alternative Vector Form of a Straight Line: Cross Product Form
Another way to express the equation of a straight line using vectors is through the idea of collinearity.
Let a be the position vector of a fixed point A on the line, and let b be a vector parallel to the line. Let r be the position vector of a general point P on the line.
As before, the vector r−a=AP joins the fixed point A to the variable point P. Since both A and P lie on the line and b is parallel to the line, it follows that r−a must be collinear with b.
Two vectors are collinear if and only if their cross product is zero. Hence, the condition for P to lie on the line is:
(r−a)×b=0.
This is an alternative form of the vector equation of a line. It does not involve any parameter and directly imposes a geometric condition: the vector from a fixed point on the line to any general point must be parallel to the given direction vector.
This form is especially useful when eliminating the parameter is desired or when checking whether a given point lies on a known line.
Normalized Symmetric Form
When expressing a straight line in three-dimensional space, the symmetric form using direction ratios is commonly written as:
ax−x1=by−y1=cz−z1,
where (x1,y1,z1) is a point on the line, and (a,b,c) are direction ratios of a vector along the line.
This form, while valid, can be further refined by replacing the direction ratios with direction cosines, which are normalized components of a unit vector along the direction of the line. This leads to what is called the normalized symmetric form.
Let us define the direction cosines (l,m,n) corresponding to the direction ratios (a,b,c). These are given by:
l=a2+b2+c2a,m=a2+b2+c2b,n=a2+b2+c2c.
These satisfy the identity:
l2+m2+n2=1.
Substituting l,m,n into the symmetric form yields:
lx−x1=my−y1=nz−z1,
which is the normalized symmetric form of the line. It describes the same line, but now the direction vector has unit length.
Let the common value of the three ratios be λ. Then we obtain the parametric form:
x=x1+λl,y=y1+λm,z=z1+λn.
This form has a key geometric feature: the parameter λ directly represents the signed distance between the general point (x,y,z) and the fixed point (x1,y1,z1). To see this, compute the distance between (x,y,z) and (x1,y1,z1):
Thus, in the normalized symmetric form, the parameter λ is not arbitrary—it has direct geometric meaning: it's modulus is the exact distance from the point (x1,y1,z1) along the line to any other point (x,y,z). This makes the normalized form both elegant and powerful, particularly when measuring distance along the line.
A straight line in space can also be described as the common solution of two linear equations in three variables. This representation is called the unsymmetric form of a line.
Consider the symmetric equation of a line:
2x−1=5y+1=2z+1.
Let us isolate two of the expressions at a time to eliminate the parameter and obtain two separate equations.
First, from
2x−1=5y+1,
cross-multiplying gives:
5(x−1)=2(y+1)⟹5x−5=2y+2⟹5x−2y=7.(1)
Next, from
5y+1=2z+1,
cross-multiplying gives:
2(y+1)=5(z+1)⟹2y+2=5z+5⟹2y−5z=3.(2)
So, the line can also be described as the set of all points (x,y,z) that satisfy both equations:
{5x−2y=7,2y−5z=3.
This is the unsymmetric form of the line.
In the next chapter, we will formally study planes in 3D space. Each linear equation in x,y,z like equation (1) or (2) represents a plane. The set of all points satisfying a single equation like 5x−2y=7 forms an infinite flat surface—a plane. Similarly, the second equation defines another plane.
Now, two planes in space may intersect in a line. This happens when they are not parallel and not coincident. The intersection of two non-parallel planes is always a straight line.
To visualize this, open your notebook and bend it in a V-shape. The two pages represent two planes. The crease where the two pages meet—the book binding—is exactly the line of intersection. That is the straight line common to both pages (planes), and this is how two linear equations can define a line.
Hence, in the unsymmetric form, we write a line as a pair of simultaneous linear equations:
a1x+b1y+c1z+d1a2x+b2y+c2z+d2=0,=0.
Each equation represents a plane. The line is the set of points that lie on both planes simultaneously, i.e., their intersection.
Converting an Unsymmetric Form to Symmetric Form
While converting a symmetric form into unsymmetric form is theoretically valid, it is rarely useful in practice. On the other hand, converting an unsymmetric form—that is, a pair of linear equations in x,y,z—into symmetric form is extremely useful. This is because once we have the symmetric form, we can apply all standard tools and results about direction ratios, direction cosines, distance from a point to the line, angle between lines, and so on.
Let us understand the method with an example.
Example:
Convert the unsymmetric form
x+y+z=1,2x−y+z=3
into symmetric form.
Solution:
We are given two linear equations. The line is the common solution set of these equations.
To convert into symmetric form, we fix one variable arbitrarily as a parameter. Let us set:
x=λ,λ∈R.
Substitute this into the two given equations to reduce the system to two equations in y and z.
From the first equation:
x+y+z=1⟹λ+y+z=1⟹y+z=1−λ(1)
From the second equation:
2x−y+z=3⟹2λ−y+z=3⟹−y+z=3−2λ(2)
Now, add (1) and (2):
(y+z)+(−y+z)=(1−λ)+(3−2λ)⇒2z=4−3λ⇒z=24−3λ.
Subtract (1) from (2):
(−y+z)−(y+z)=(3−2λ)−(1−λ)⇒−2y=2−λ⇒y=22−λ.
Thus, the general point (x,y,z) on the line is:
x=λ,y=22−λ,z=24−3λ.
This gives the parametric form. To convert to symmetric form, we eliminate λ between these equations. First, isolate λ in terms of y and z.
From y=22−λ⇒λ=2−2y,
and from z=24−3λ⇒λ=34−2z.
Also, x=λ, so we can now write:
λ=x=2−2y=34−2z.
On rearraging, the symmetric form is:
1x=−12y−2=−32z−4,
or equivalently, you may express it in standard symmetric form as:
Let P(x0,y0,z0) be a point in space, and let the line be given in symmetric form as:
ax−x1=by−y1=cz−z1,
which passes through the point (x1,y1,z1) and has direction ratios (a,b,c).
There are three important quantities we often wish to compute:
The perpendicular distance from the point P to the line.
The foot of the perpendicular, say N, dropped from point P onto the line.
The image of the pointP in the line, denoted by Q, which lies on the line and satisfies N as the midpoint of segment PQ.
Let us proceed to compute these quantities step by step.
Let N be the foot of the perpendicular from P to the line. Since N lies on the line, its coordinates can be written in parametric form:
(x,y,z)=(aλ+x1,bλ+y1,cλ+z1)for some λ∈R.
Now the vector PN, having direction ratios:
(aλ+x1−x0,bλ+y1−y0,cλ+z1−z0),
must be perpendicular to the line, whose direction ratios are (a,b,c). Therefore, their dot product must be zero:
(aλ+x1−x0)⋅a+(bλ+y1−y0)⋅b+(cλ+z1−z0)⋅c=0.
Expanding:
λ(a2+b2+c2)+a(x1−x0)+b(y1−y0)+c(z1−z0)=0.
From this equation, λ is easily determined. Once λ is known, we substitute it back into:
N=(aλ+x1,bλ+y1,cλ+z1),
to obtain the coordinates of the foot N.
The perpendicular distance from P to the line is then simply the Euclidean distance between the points P(x0,y0,z0) and N, using the distance formula:
Distance=(x0−xN)2+(y0−yN)2+(z0−zN)2.
We do not derive a general formula for this, as the expression becomes complex and is not easy to memorize or apply. It is far better to remember the method.
Finally, to find the image pointQ of P in the line, we use the fact that the foot N is the midpoint of segment PQ. So if Q=(x′,y′,z′), then:
where a is the position vector of a fixed point A on the line, and b is a non-zero vector in the direction of the line.
Let p be the position vector of a point P in space. Then the vector AP from the point A on the line to the point P is:
AP=p−a.
In coordinate methods, we typically first compute the foot of the perpendicular from P to the line, and then use the distance formula. However, using vector methods, we can avoid finding the foot altogether.
The key idea is to compute the perpendicular component of AP with respect to the direction b. This component is the part of AP orthogonal to b, and its magnitude gives the perpendicular distance from the point to the line.
This is given by:
Distance=∣AP×b^∣=∣b∣∣AP×b∣.
In terms of p and a, the formula becomes:
Perpendicular distance from point P to the line=∣b∣∣(p−a)×b∣.
This direct formula eliminates the need to find the foot of the perpendicular and gives the required distance using only vector operations.
There are many things we are interested in when two lines are given in space. Do they intersect? Are they parallel or perpendicular? What is the angle between them? What is the shortest distance between them? These questions form the basis of understanding how two lines relate to each other in three-dimensional geometry.
where b1 and b2 are non-zero direction vectors of the lines. The acute angleθ between the two lines is defined as the angle between their direction vectors.
Hence, the angle θ is given by:
cosθ=∣b1∣∣b2∣∣b1⋅b2∣.
We take the modulus of the dot product to ensure that θ is the acute angle between the lines.
Condition for Two Lines to Be Parallel
Two lines are said to be parallel if the angle between them is zero. This happens exactly when their direction vectors are collinear.
Let the lines be given in vector form:
r=a1+λb1,r=a2+μb2.
Then the lines are parallel if and only if:
b1=kb2for some scalar k∈R.
This means the two direction vectors are scalar multiples of each other, i.e., they have the same or exactly opposite direction.
If the lines are given in Cartesian symmetric form:
ax−x1=by−y1=cz−z1,px−x2=qy−y2=rz−z2,
then the lines are parallel if and only if their direction ratios are proportional:
pa=qb=rc.
Condition for Two Lines to Be Perpendicular
Let two lines in space be given in vector form:
r=a1+λb1,r=a2+μb2,
where b1 and b2 are non-zero direction vectors of the lines.
Then the lines are perpendicular if and only if their direction vectors are perpendicular, that is:
b1⋅b2=0.
In terms of Cartesian symmetric form, suppose the lines are:
ax−x1=by−y1=cz−z1,px−x2=qy−y2=rz−z2,
then the condition for the lines to be perpendicular is:
In vector form, the distance between two parallel lines is very straightforward to compute.
Let the two lines be:
L1:r=a1+λb,L2:r=a2+μb,
where b is a common direction vector, indicating that the lines are parallel. Let A1 and A2 be points on L1 and L2 respectively, with position vectors a1 and a2.
To find the distance between these lines, we consider the vector A2A1=a1−a2. The shortest distance between the lines is the component of this vector perpendicular to the direction b. That is, we project a1−a2 onto a direction perpendicular to b.
Let b^ be the unit vector along b, given by:
b^=∣b∣b.
Then the required perpendicular distance is the magnitude of the cross product:
In two dimensions, any pair of straight lines falls into one of three possible configurations:
The lines intersect at a unique point.
The lines are parallel but not coincident, and hence do not intersect.
The lines are coincident, and thus intersect in infinitely many points.
However, in three-dimensional space, there is one more possible orientation for two lines, which does not arise in the plane.
To understand this, begin with two parallel lines L1 and L2 in space, separated by a fixed positive distance d. Take a point P on L1 and a point Q on L2 such that the segment PQ is perpendicular to both lines.
Now imagine rotating line L2 slightly about the axis defined by PQ. After rotation, line L2 is no longer parallel to L1, and since the direction has changed but not the position of PQ, the two lines also do not intersect.
This new configuration describes a situation where the lines are neither intersecting nor parallel. Such lines are said to be skew.
Hence, two lines in three-dimensional space are called skew lines if they do not intersect and are not parallel. Equivalently, skew lines are lines that do not lie in the same plane.
There exists a unique plane through P that is perpendicular to the segment PQ and contains the line L1. Similarly, there is a unique plane through Q, also perpendicular to PQ, containing the line L2.
These two planes are parallel to each other, since they are both perpendicular to the same line segment PQ and contain lines (L1 and L2) that are not parallel and do not intersect. Thus, skew lines can be thought of as lying in distinct parallel planes, each perpendicular to the common perpendicular segment joining them.
where a1 and a2 are position vectors of points A1 and A2 on lines L1 and L2 respectively, and b1,b2 are direction vectors of the lines.
Let P be a point on L1 and Q a point on L2. Then the vector PQ=a2+μb2−(a1+λb1) joins a general point on one line to a general point on the other.
We are interested in the shortest possible value of ∣PQ∣ — this occurs when the segment PQ is perpendicular to both lines. That is, the direction vector of PQ is perpendicular to both b1 and b2.
Thus, the direction of the segment PQ in this minimal configuration must be parallel to the vector:
b1×b2,
which is perpendicular to both b1 and b2.
Let us now consider the vector A1A2=a2−a1. The shortest distance between the two lines is the projection of this vector onto the direction b1×b2.
Hence, the shortest distance D is:
D=∣b1×b2∣(a1−a2)⋅(b1×b2).
Thus,
Shortest distance between the two skew lines=∣b1×b2∣(a1−a2)⋅(b1×b2).
This is the length of the line segment PQ, which is perpendicular to both lines and joins them at the closest possible approach.
the line of shortest distance is the line segment joining a point P on L1 to a point Q on L2, such that the segment PQ is perpendicular to both lines. This line is sometimes referred to as the common perpendicular.
The direction of this line is simple to obtain. Since PQ is perpendicular to both b1 and b2, a vector along the line of shortest distance is given by:
d=b1×b2.
However, to write the equation of a line, we need both a direction vector and a point on the line. The direction vector we already have. To find a point that lies on the line of shortest distance, we must determine the foot points P and Q on the two lines such that PQ is perpendicular to both b1 and b2. This requires solving a system of equations.
Let us learn how to do this with an example.
Example: Find the Equation of the Line of Shortest Distance Between Two Skew Lines
Let the two skew lines be given in symmetric form:
L1:2x−1=−1y+1=1z−1,L2:1x+1=2y−2=3z−3.
The direction vector of line L1 is
b1=2i^−j^+k^,
and of line L2 is
b2=i^+2j^+3k^.
The line of shortest distance is perpendicular to both L1 and L2, so its direction vector is the cross product b1×b2:
In two dimensions, any two non-parallel lines always intersect at a point. However, in three dimensions, the situation is more delicate. Even if two lines are not parallel, they may still not intersect. This possibility arises because lines in 3D space can miss each other while pointing in different directions and lying in different planes — such lines are called skew lines.
This raises a natural question: How can we determine whether two non-parallel lines in 3D intersect?
Suppose the lines are given in vector form as:
L1:r=a1+λb1,L2:r=a2+μb2,
where b1 and b2 are not collinear, so the lines are not parallel.
We know that for skew lines, the shortest distance between them is given by:
Distance=∣b1×b2∣(a1−a2)⋅(b1×b2).
Therefore, if the shortest distance between the two lines is zero, they must intersect. This happens exactly when:
(a1−a2)⋅(b1×b2)=0.
This condition simply says that the vector a1−a2 is perpendicular to the vector b1×b2, or equivalently, that the three vectors a1−a2, b1, and b2 are coplanar.
This geometric interpretation can be restated using the scalar triple product:
[a1−a2,b1,b2]=0.
Hence, two non-parallel lines intersect if and only if the scalar triple product of a1−a2,b1,b2 is zero. This expresses the condition that these three vectors lie in the same plane — that is, the lines are coplanar and hence intersect.
Two non-parallel lines intersect⟺[a1−a2,b1,b2]=0.
Let two lines in space be given in vector form as:
L1:r=a1+λb1,L2:r=a2+μb2.
We say that the lines L1 and L2 are coplanar if there exists a single plane in which both lines lie completely.
This occurs in exactly two situations:
The lines are parallel: that is, the direction vectors b1 and b2 are collinear. In this case, any plane containing one line and a point on the other line contains both lines.
The lines intersect: that is, they meet at a common point. In this case, both lines lie in the unique plane determined by the point of intersection and the two direction vectors.
Hence, two lines in space are coplanar if and only if they are either parallel or intersecting. If neither is true — that is, they are not parallel and do not meet — then they are skew and not coplanar.
Two lines are coplanar⟺they are parallel or intersecting.
Section 12 of 15 · Vector Algebra and Three Dimensional Geometry
Mark this section complete when you have worked through its proofs.
Type any topic, theorem, or concept to jump directly to the section.