Relative position of two lines
Two lines in the plane can be in four different positions. They can be parallel, intersecting, perpendicular or coincident.
Finding the relative position from the equations
If we have two lines and their two equations, we simply solve the system of these two equations. There are three possible cases:
- The system has no solution – the lines have no common point, so they are parallel.
- The system has exactly one solution – the lines have exactly one common point (a point of intersection), so they are intersecting lines.
- The system has infinitely many solutions – the lines have infinitely many common points, so they are coincident (the same line).
Notice that this method does not tell us whether the lines are perpendicular.
In the figure we can see the parallel lines a, b, the intersecting lines c, d, which cross at one point, and the coincident lines e, f.
Here are some examples:
-
Find the relative position of the lines p and q given by the equations p: −x + 3y − 5 = 0 and q: 2x + 3y − 17 = 0. We form a system of linear equations from the two equations and solve it:
We multiply the first equation by two:
And we add the equations:
The rest of the working is easy:
We still need to find x, for example by substituting y = 3 into the equation −x + 3y − 5 = 0:
The system has a single solution, x = 4, y = 3. This means that the lines are intersecting and cross at the point X(4, 3). Figure:
-
Find the relative position of the lines p and q, given by the equation p: 2x + y − 8 = 0 and, for q, the parametric equations of a line:
Here we have one equation in general form and one set of parametric equations. We solve this case by substituting the values from the parametric equations for x and y in the general form. That is, in the general form we replace x by the right-hand side of its parametric equation, and the same for y. We get a single equation:
Then we simplify the equation in the usual way:
The equation has no solution, so the lines do not meet at any point. The lines p and q are therefore parallel. Figure:
-
Find the relative position of the lines p and q given by the equations p: 3x + y − 10 = 0 and q: −9x −3y + 30 = 0. At first glance the second equation is −3 times the first, so the lines should be coincident. But let’s work it out. We form the system of equations:
We multiply the first equation by 3:
And we add the equations:
The system has infinitely many solutions, so the lines have infinitely many common points and are coincident. Figure:
Finding the relative position from the direction and normal vectors
If we know the direction vector or the normal vector, we can find the relative position of the lines. The following rules hold:
- If the direction vectors are parallel (collinear, linearly dependent), the lines are parallel or coincident.
- If the direction vectors are not parallel (not linearly dependent), the lines are intersecting.
- If the scalar product of the direction vectors is zero, the lines are perpendicular.
The rules above hold in the same way for normal vectors. That is, if the normal vectors are parallel, the lines are parallel or coincident, and so on.
Let’s try to work out the three examples from the previous section using direction and normal vectors.
-
Find the relative position of the lines p and q given by the equations p: −x + 3y − 5 = 0 and q: 2x + 3y − 17 = 0. The normal vector of the line p is
and the normal vector of the line q is . The vectors are not parallel, because are not linearly dependent. There is no a ∈ ℝ such that . It follows that the lines are intersecting.We also work out the scalar product to check whether the lines are perpendicular. The scalar product of the normal vectors is
The scalar product is non-zero, so the lines are not perpendicular.
-
Find the relative position of the lines p and q, given by the equation p: 2x + y − 8 = 0 and, for q, the parametric equations of a line:
From the parametric equations we can read off the direction vector of q straight away. It is given by the coefficients of the parameter t, so the direction vector of q is
. From the general form of p we can read off the normal vector, which is (the coefficients of x and y). From the normal vector we get the direction vector .(We just swapped the numbers and multiplied one of the coordinates by −1. The vectors (2, 1) and (1, −2) have scalar product zero, so if (2, 1) is a normal vector, then (1, −2) is a direction vector.)
We can see that the direction vector of p is −1 times the direction vector of q, that is
. So the direction vectors are parallel, which means that the lines p and q are parallel or coincident.Now we need to decide whether the lines are parallel or coincident. It is enough to take any point A on the line q and substitute it into the equation of p. If the equation holds, the lines are coincident. Otherwise they are just parallel.
We take the parametric equations of q and substitute zero for the parameter t. We get:
We have found the point A(5, 2), which certainly lies on the line q. We substitute these coordinates into the general form p: 2x + y − 8 = 0:
This point does not satisfy the equation, so the point A(5, 2) does not lie on the line p and the lines are not coincident.
-
Find the relative position of the lines p and q given by the equations p: −x + 3y − 6 = 0 and q: 3x + y − 14 = 0. This example differs from the third example in the previous section. From both equations we can read off the normal vectors of the lines. The normal vectors are
and . The normal vectors are not linearly dependent (not parallel): there is no real a such that .Now we check whether the lines are perpendicular. We work out the scalar product:
The scalar product is zero, so the vectors are perpendicular. Therefore the lines themselves are perpendicular too. Figure:
If we want to find the point of intersection of the two lines, we have to work it out from the equations. We form a system of equations from the general forms:
We multiply the first equation by −3:
Now we add the equations and simplify further:
We find the x-coordinate by substituting into one of the equations, for example −x + 3y − 6 = 0:
The point of intersection of the two lines has coordinates
.