In this explainer, we will learn how to find the equation of a straight line that is parallel or perpendicular to another one in space and find the intersection point between two lines.

We know that a nonzero vector parallel to the line and a point on the line completely characterizes a line in three dimensions. Naturally, the components of the direction vector and the coordinates of the point explicitly appear in the equation of a line in various forms. Let us recall different forms for the equation of the line.

### Definition: Equation of a Line in Three Dimensions

If a line passes the point and is parallel to the nonzero vector , then its equation

- in the vector form is where is the position vector of the point that belongs to the line;
- in the Cartesian form is
- in the parametric form is

Let us consider an example where we find the vector form of the equation of a line, given a point on the line and a parallel vector.

### Example 1: Determining the Vector Form of the Equation of a Straight Line

Determine the vector form of the equation of the straight line passing through the point and parallel to the vector .

### Answer

We recall that the vector form of the equation of the line through the point parallel to the nonzero vector is given by where is the position vector of point and is the origin point . We are given that our line passes through the point , so we get .

We are also given that our line is parallel to the vector . So, the vector form of the equation of this line is

A nonzero vector that is parallel to a line is called a direction vector of the line. We know that the choice of direction vectors in the equation of a line is not unique and that any nonzero parallel vectors can replace a given direction vector.

Even though the equation of the line would differ when a different direction vector is used, the new equation would still represent the same line.

We define parallel lines below.

### Definition: Parallel Lines in Three Dimensions

Two lines are parallel if their direction vectors are parallel.

In our next example, we will find the vector form of the equation of a line which is parallel to a given line.

### Example 2: Finding the Equation of a Straight Line Passing through a Given Point and Parallel to a Given Straight Line in Vector Form

Find the vector form of the equation of the straight line passing through the point and parallel to the straight line passing through the two points and .

### Answer

We recall that the vector form of the equation of the line through the point parallel to the vector is given by where is the position vector of point and point is the origin.

We are given that our line passes through the point , which gives us . So, it remains to find the direction vector to complete the equation of our line.

We recall that two lines are parallel if they share a direction vector. Since the two lines are parallel, they share the direction vector. So, we can use the direction vector of the given line as in the vector equation of our line.

The given line goes through and , so it is parallel to the vector

This gives us .

Hence, the equation of our line in the vector form is

If two lines intersect in three dimensions, then they share a common point. One convenient way to check for a common point between two lines is to use the parametric form of the equations of the two lines. In the parametric form, each coordinate of a point is given in terms of the parameter, say . If two lines pass through the same point, then there must be a parameter value which produces the coordinates of this point in the first line and another value producing these coordinates in the second line.

In our next example, we will use this idea to find an unknown constant in the equations of two intersecting lines.

### Example 3: Finding Unknown Coefficients in the Equation of Two Straight Lines in Three Dimensions given That They Intersect

For what value of do the lines and intersect?

### Answer

We recall that we can convert the equation of a line in the Cartesian form to the parametric form by setting each component of the equation equal to and solving for the variables , , and . From the equation of the first line, we get

So, the equation of the first line in the parametric form is

From the equation of the second line, we have

Hence, the equation of the second line in the parametric form is

If the two lines share a common point , then there must be parameter values and that correspond to these coordinates in both lines. In other words, we substitute into the parametric equations (1) and into the parametric equations (2) and then equate the corresponding variables from either set of equations. This gives us the following system of equations: .

Since the first equation involves an unknown constant, we will use the second and the third equations to identify and . Then, we can substitute these values into the first equation to find the unknown constant .

We can subtract the third equation from the second equation to get

Solving this equation for , we get . We can substitute this into

Solving this equation for , we obtain . This gives us the parameter values and . Substituting these values into

Solving this equation for gives us

Hence, the two lines will intersect when .

In our previous example, we identified an unknown constant in the equations of two intersecting lines. Let us consider an example where we find the coordinates of the point of the intersection between two lines and use this to find the Cartesian form of the equation of a line.

### Example 4: Finding the Equation of a Line in the Cartesian Form Using the Intersection Point of Two Other Lines

Find the Cartesian form of the equation of the straight line passing through the origin and the intersection point of the two straight lines and .

### Answer

To find the Cartesian form for the equation of a line, we need its direction vector and a point on the line. Since we are given that our line passes through the origin and the point of intersection, we can define the direction vector of our line to be the vector from the origin ending at the point of intersection. So, we begin by identifying the point of intersection.

To find the point of intersection between the two lines and , we will use the parametric form of the equations of the lines. Let us begin by deriving the parametric form of the equations of both lines.

From the given vector form of the equation of , we have

Then, the equation of in the parametric form is

Next, let us convert the equation of to the parametric form. From the given Cartesian form, we note that . For the second equation, we can set both sides equal to and solve for the variables and .

Then, the equation of in the parametric form is

Say the lines and intersect at the point . Then, this point must be given by some parameter value for and some other parameter value for . So, we can substitute these values into the parametric form of the equation of either line and set each corresponding coordinate equal to each other. This gives us

We can rearrange the first equation to get . We can substitute this value into the second equation and rearrange:

Hence, we have obtained and . Let us see whether these parameter values produce the same set of coordinates in and . Substituting into the parametric equations of , we get

So, this produces the coordinates in .

Next, we substitute into the parametric equations of :

This leads to the same coordinates for the line . Thus, the lines and intersect at the point . Since our line also passes through the origin, our line has the direction vector .

Using the coordinates of the origin, we obtain the Cartesian form of the equation of our line:

Hence, the Cartesian form of the equation of the line which passes through the origin and the intersection point of the lines and is

If two lines intersect, we can check whether they are perpendicular by using the direction vectors of either lines. We define perpendicular lines below.

### Definition: Perpendicular Lines in Three Dimensions

Two lines are perpendicular if they intersect at a point and their direction vectors are perpendicular.

We recall that two vectors are perpendicular if the angle between them is , which is the same as saying that their dot product is equal to zero. Thus, two intersecting lines are perpendicular if the dot product of their direction vectors is equal to zero.

In our next example, we will determine whether the given two lines are parallel or perpendicular.

### Example 5: Determining Whether Two Straight Lines are Parallel or Perpendicular

Consider the two lines , , and . Determine whether they are parallel or perpendicular.

### Answer

We recall that two lines are parallel if their direction vectors are parallel, and also that they are perpendicular if they intersect and their direction vectors are perpendicular. Let us begin with checking whether their direction vectors are parallel or perpendicular. If they are perpendicular, we will also need to check whether they intersect at a point.

From the parametric form of the equation of the first line, we obtain the direction vector . From the vector form of the equation of the second line, we obtain the direction vector .

Recall that two vectors and are parallel if there a scalar satisfying

To check whether the two direction vectors are parallel, we can substitute our direction vectors into and and check for possible values for . We get

This leads to the three equations

The first equation gives . But substituting this value into the second and the third equations yields

Since both equations are false, we conclude that there is no solution for system (3). So, the direction vectors of the two lines are not parallel, which means that the two lines are not parallel.

Let us check whether the two lines are perpendicular. We recall that two lines are perpendicular if they intersect and their direction vectors are perpendicular. The direction vectors are perpendicular if their dot product is equal to zero. Taking the dot product yields

Hence, the direction vectors must be perpendicular. So, it remains to show that the lines intersect at a point. To find the intersection, we can write the equations of the lines in the parametric form. The equation of the first line is already given in the parametric form, so let us convert the second equation into the parametric form:

If the two lines share a common point, there must be parameter values and satisfying

We can use the first two equations to solve this system by elimination. We begin by multiplying the second equation by 2:

Then, we subtract the first equation from this one to get

Solving this equation for , we get . Substituting this into which leads to . So, we have obtained and . Let us see whether these parameter values produce a common point in both lines. First, we substitute in the parametric form of the equation of the first line:

This leads to the point . Next, we substitute into the parametric form of the second line: which leads to the same point . Hence, the two lines share a common point .

Since the direction vectors of the two lines are perpendicular and the two lines intersect at a point, the lines are perpendicular.

In the next example, we will find the line which is perpendicular to a given line which also passes through the origin.

### Example 6: Finding the Equation of the Line Passing through the Origin and Intersecting Another Straight Line Orthogonally

Find the equation of the line through the origin that intersects the line orthogonally.

### Answer

We are given that our line passes through the origin, so, if we can identify a direction vector of the line, then the vector form of the equation would be

Since our line must intersect orthogonally with the given line, the direction vector should be perpendicular to the direction vector of the given line, . We recall that two vectors are perpendicular if their dot product is equal to zero. Thus, we must have

Say that our line intersects with the given line at point . Then, we see from the figure below that our line has a direction vector since it is mentioned in the stem that the line passes through the origin.

So, we need to identify the point lying on the given line such that

Since is a point on the given line, its coordinates must be given by the equation of the line:

This means that there is a parameter value giving the coordinates

Then, the left-hand side of equation (4) is

This expression is equal to zero if the lines intersect orthogonally. Setting the resulting expression equal to zero will give us the parameter value corresponding to point of intersection:

Substituting the parameter value into the coordinates of :

Thus, our line and the given line intersect orthogonally at the point . This tells us that our line is parallel to the vector

We can multiply this vector by the scalar 7 to obtain a simpler direction vector parallel to :

Using this direction vector, the equation of our line in the vector form is

So far, we have discussed parallel lines, intersecting lines, and perpendicular lines in three dimensions. We will now discuss a few exceptional classes, which are coincident lines and skew lines in three dimensions.

If two parallel lines intersect at a point, then they share a point and a direction vector; hence, their equations would be identical. In this case, we say that the lines are coincident. On the other hand, if two parallel lines do not overlap entirely, then they do not share any point in common. So, two parallel lines either overlap entirely or do not intersect at all.

Let us consider an example of coincident lines. Consider the following two lines:

The lines and have direction vectors and respectively. We note that which tells us that the direction vectors are parallel. Thus, the two lines and are parallel. In addition, we note that the line passes through the point . If these coordinates satisfy the equation of , then we know that this point also lies in . Substituting this point into the Cartesian form of the equation of , we obtain

We note that the equation above is true; hence the coordinates of also satisfy the equation of . So, the lines and are parallel and also intersect at point . This tells us that these lines are coincident.

We have discussed that two distinct parallel lines do not share any point. In three dimensions, it is also possible for two nonparallel lines to lack a point of intersection. In this case, we say that these lines are skew. We state the following definition.

### Definition: Skew Lines in Three Dimensions

Two lines in three dimensions are skew if they are not parallel and do not intersect.

Below, we see an example of two skew lines.

The red line is coincident with the -axis, so it has the direction vector . The blue line passes through and , so it has the direction vector

We recall that two vectors are parallel if one is a scalar multiple of the other. If the vector were a scalar multiple of , the scalar would have to be zero when considering their -components. However, this would lead to which is clearly false. So, is not a scalar multiple of , and the two direction vectors, and hence the two lines, are not parallel. It is clear from the figure that the blue line never intersects the -axis. Therefore, these two lines do not intersect and are not parallel. So, the two lines are skew.

In our final example, we will determine whether two lines represented by their equations are parallel, coincident, intersecting, or skew.

### Example 7: Determining Whether Two Straight Lines are Parallel, Coincident, Intersecting, or Skew

Consider the two lines and . Choose the correct statement about the two lines.

- and are parallel but not coincident.
- and are coincident lines.
- and are intersecting at a point.
- and are skew lines.

### Answer

We recall that two lines are parallel if their direction vectors are parallel. From the vector form of the equations of and , we obtain the direction vectors for and for .

Recall that two vectors and are parallel if there is a scalar satisfying

Substituting the direction vectors of and in place of and , we get

We note that the -component of the vector on the rightmost side of the equation is zero, regardless of the value . Since the corresponding component of the vector on the leftmost side is nonzero, this equation does not have any solution. This means that is not a scalar multiple of . So, the lines and are not parallel.

Next, let us examine whether or not the lines intersect. To examine the intersection between two lines, we can use the parametric form for the equations of the lines. From the given vector form, we can write

Then, the equation of in the parametric form is

Likewise, for , which means that the vector form of this equation is given by

If the two lines have a point in common, there must be parameter values and which yield the coordinates of this point which satisfy the equations (5) and (6). We substitute in equation (5) and in equation (6) to create an expression for the coordinates in and . Setting each coordinate from and equal to each other, we get

The third equation immediately leads to . Substituting this into the second coordinate equation above gives us

Hence, we have obtained and . This means that if there is a shared set of coordinates between the lines and , then these coordinates should be given by the parameter value for and for .

Let us see whether these parameter values produce a common set of coordinates from and . First, we substitute into the parametric equations in (5):

This leads to the coordinates from corresponding to the parameter value 4. Next, we substitute into the parametric equations in (6):

This gives us the coordinates from corresponding to the parameter value 0. We note that this is different from the coordinates from . This means that there is no shared set of coordinates. In other words, the lines and do not intersect.

Since the lines are not parallel and also do not intersect, and are skew lines.

Let us summarize a few important concepts from this explainer.

### Key Points

- Two lines are parallel if they share a common direction vector. Alternatively, two lines are parallel if their direction vectors are parallel.
- To find the point of intersection between two lines, we find the parameter values and that produce the same set of coordinates in the parametric form of the equation of either line.
- Two lines are perpendicular if they intersect at a point and their direction vectors are perpendicular.
- If two parallel lines intersect at a point, they overlap entirely. In this case, the two lines are coincident.
- Two lines are skew if they are not parallel and also they do not intersect at any point.