If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Class 12 math (India)>Unit 14

Lesson 2: Equation of a line

# Equation of a line in space

Contains vector and cartesian form of a line in 3D.
• What conditions are sufficient to uniquely determine a line in space?
• Equation of a line in vector form
• Equation of a line in cartesian form

## What uniquely determines a line in space?

Suppose we know that a line runs from south-west to north-east. In other words, we know the direction of the line. Is this condition sufficient to uniquely determine the line?
No. See that there can be many parallel lines, all running from south-west to north-east. So, only a direction does not determine the line uniquely.
But now, in addition, we know that the line passes through a specific point $P$. Can we determine the line uniquely now?
Yes. See that there is only one line which runs from south-west to north-east and also passes through the point $P$.
Thus a line is uniquely determined if we know its direction, and a point through which it passes.
However, this is not the only way to uniquely determine a line. We can also have other conditions which uniquely determine a line. We will study one more case here.
Suppose we have two distinct points and are given that a line passes through them. Is this line unique?
Yes. See that both the direction of the line and its position in space are fixed by saying that the line passes through two given points.
Although here we have shown lines in two dimensions, check that the above principles remain true for lines in three dimensions as well.
In below sections, we will learn to write the equation of a line in three dimensions for the above two cases. We will write the equation in two different forms - vector form and cartesian form. So, let's begin!

## Vector form of the equation of a line

### Case 1: Line passing through a given point and parallel to a given vector

Consider a line which passes through a point with position vector $\stackrel{\to }{a}$ and is parallel to the vector $\stackrel{\to }{d}$. See that the vector $\stackrel{\to }{d}$ defines the 'direction' of the line. Let $\stackrel{\to }{r}$ be the position vector of a general point on the line. How can we write $\stackrel{\to }{r}$ in terms of $\stackrel{\to }{a}$ and $\stackrel{\to }{d}$?
First consider the position vector $\stackrel{\to }{a}+\stackrel{\to }{d}$. Does this point on the line? Clearly yes. Now check $\stackrel{\to }{a}+2\stackrel{\to }{d}$. Does this point also lie on the line? Yes. Going on in this fashion see that points with position vectors $\stackrel{\to }{a}+3\stackrel{\to }{d}$, $\stackrel{\to }{a}+4\stackrel{\to }{d}$, $\stackrel{\to }{a}+5\stackrel{\to }{d}$ etc. will all lie on the line. Not only these, but other points with position vectors like $\stackrel{\to }{a}+0.7\stackrel{\to }{d}$, $\stackrel{\to }{a}+3.2\stackrel{\to }{d}$ etc. will also lie on the line.
How about if we want to go in the opposite direction from $\stackrel{\to }{a}$? Does the point with position vector $\stackrel{\to }{a}-\stackrel{\to }{d}$ lie on the line? Yes. Similarly, see that position vectors like $\stackrel{\to }{a}-2\stackrel{\to }{d}$, $\stackrel{\to }{a}-3\stackrel{\to }{d}$ or $\stackrel{\to }{a}-1.5\stackrel{\to }{d}$ will all lie on the line. What we have found here is a recipe to describe any general point on the line. We can write the equation of the line as
$\stackrel{\to }{r}=\stackrel{\to }{a}+\lambda \stackrel{\to }{d}$
where $\lambda$ is what is called as a parameter in mathematics. Here $\lambda$ takes on values from $-\mathrm{\infty }$ to $+\mathrm{\infty }$. As $\lambda$ moves from $-\mathrm{\infty }$ to $+\mathrm{\infty }$, we cover all the points which form the line.
Check your understanding 1
What will be the vector equation of the line which is parallel to the vector $5\stackrel{^}{i}+2\stackrel{^}{j}-4\stackrel{^}{k}$?

Check your understanding 2
What will be the vector equation of the line passing through the point $\left(1,-3,2\right)$ and parallel to the vector $7\stackrel{^}{i}+9\stackrel{^}{j}-2\stackrel{^}{k}$?

### Case 2: Line passing through two given points

Now, consider a line which passes through two points with position vectors $\stackrel{\to }{a}$ and $\stackrel{\to }{b}$. What is the equation of this line?
Note that the line will be parallel to $\stackrel{\to }{b}-\stackrel{\to }{a}$. So, in this case $\stackrel{\to }{b}-\stackrel{\to }{a}$ plays the same role which $\stackrel{\to }{d}$ played in the above case. We simply replace $\stackrel{\to }{d}$ with $\stackrel{\to }{b}-\stackrel{\to }{a}$ in the previous equation. We get
$\stackrel{\to }{r}=\stackrel{\to }{a}+\lambda \left(\stackrel{\to }{b}-\stackrel{\to }{a}\right)$
This is the equation of a line passing through two points with position vectors $\stackrel{\to }{a}$ and $\stackrel{\to }{b}$. Here, note that $\stackrel{\to }{r}=\stackrel{\to }{b}+\lambda \left(\stackrel{\to }{b}-\stackrel{\to }{a}\right)$, or $\stackrel{\to }{r}=\stackrel{\to }{a}+\lambda \left(\stackrel{\to }{a}-\stackrel{\to }{b}\right)$ will also be valid equations of the line.

## Cartesian form of the equation of a line

### Case 1: Line passing through a given point and parallel to a given vector

Let's now move on to finding the equations in cartesian form, i.e. we need to find $x$, $y$ and $z$ coordinates of a general point on the line.
Consider a line which passes through a point $\left({x}_{1},{y}_{1},{z}_{1}\right)$ and is parallel to the vector $a\stackrel{^}{i}+b\stackrel{^}{j}+c\stackrel{^}{k}$.
Because the line is parallel to the vector $a\stackrel{^}{i}+b\stackrel{^}{j}+c\stackrel{^}{k}$, $a,b,c$ will be the direction ratios of the line. What this means is that when we move from one point on the line to another, the change in the coordinates occurs in the ratio $a:b:c$.
Start from the point $\left({x}_{1},{y}_{1},{z}_{1}\right)$. Does the point $\left({x}_{1}+a,{y}_{1}+b,{z}_{1}+c\right)$ lie on the line? Yes. Note that when the $x$ coordinate increases by $a$, the $y$ coordinate increases by $b$, and the $z$ coordinate increases by $c$.
What about the point $\left({x}_{1}+2a,{y}_{1}+2b,{z}_{1}+2c\right)$? Yes, this point also lies on the line. See that when the $x$ coordinate increases by $2a$, the $y$ coordinate increases by $2b$, and the $z$ coordinate increases by $2c$. Similarly, other points with coordinates like $\left({x}_{1}+3a,{y}_{1}+3b,{z}_{1}+3c\right)$, or $\left({x}_{1}+1.7a,{y}_{1}+1.7b,{z}_{1}+1.7c\right)$ etc. will also lie on the line.
How about if we want to go in the opposite direction? Does the point $\left({x}_{1}-a,{y}_{1}-b,{z}_{1}-c\right)$ lie on the line? Yes. Note that when the $x$ coordinate decreases by $a$, the $y$ coordinate decreases by $b$, and the $z$ coordinate decreases by $c$. Similarly, other points with coordinates like $\left({x}_{1}-2a,{y}_{1}-2b,{z}_{1}-2c\right)$, or $\left({x}_{1}-2.5a,{y}_{1}-2.5b,{z}_{1}-2.5c\right)$ etc. will also lie on the line.
Going on in this fashion we can say that all the points with coordinates of the form $\left({x}_{1}+\lambda a,{y}_{1}+\lambda b,{z}_{1}+\lambda c\right)$, where $\lambda$ is a parameter, lie on the line. As $\lambda$ moves from $-\mathrm{\infty }$ to $+\mathrm{\infty }$, we would cover all the points which form the line.
In fact, what we have found are the parametric equations of a line. The coordinates $\left(x,y,z\right)$ of a general point on the line can be written as
$\begin{array}{rl}x& ={x}_{1}+\lambda a\\ y& ={y}_{1}+\lambda b\\ z& ={z}_{1}+\lambda c\end{array}$
There is a neat way to eliminate the parameter $\lambda$. Rewrite the above equations as
$\begin{array}{rl}\frac{x-{x}_{1}}{a}& =\lambda \\ \\ \frac{y-{y}_{1}}{b}& =\lambda \\ \\ \frac{z-{z}_{1}}{c}& =\lambda \end{array}$
And now eliminating $\lambda$, we get the cartesian equation of a line as
$\frac{x-{x}_{1}}{a}=\frac{y-{y}_{1}}{b}=\frac{z-{z}_{1}}{c}$

### Case 2: Line passing through two given points

Now suppose that a line passes through two points with coordinates $\left({x}_{1},{y}_{1},{z}_{1}\right)$ and $\left({x}_{2},{y}_{2},{z}_{2}\right)$.
Recall that the direction ratios of such a line will be ${x}_{2}-{x}_{1},{y}_{2}-{y}_{1},{z}_{2}-{z}_{1}$. We can simply replace $a,b,c$ from the above case with ${x}_{2}-{x}_{1},{y}_{2}-{y}_{1},{z}_{2}-{z}_{1}$. The equation of the line becomes
$\frac{x-{x}_{1}}{{x}_{2}-{x}_{1}}=\frac{y-{y}_{1}}{{y}_{2}-{y}_{1}}=\frac{z-{z}_{1}}{{z}_{2}-{z}_{1}}$
Check your understanding 3
Find the cartesian equation of the line which passes through the points $\left(7,4,6\right)$ and $\left(9,1,8\right)$.

## Summary

The vector equation of a line is
$\stackrel{\to }{r}=\stackrel{\to }{a}+\lambda \stackrel{\to }{d}$, for a line passing through a point with position vector $\stackrel{\to }{a}$ and parallel to the vector $\stackrel{\to }{d}$, and
$\stackrel{\to }{r}=\stackrel{\to }{a}+\lambda \left(\stackrel{\to }{b}-\stackrel{\to }{a}\right)$, for a line passing through two points with position vectors $\stackrel{\to }{a}$ and $\stackrel{\to }{b}$.
The cartesian equation of a line is
$\frac{x-{x}_{1}}{a}=\frac{y-{y}_{1}}{b}=\frac{z-{z}_{1}}{c}$, for a line passing through a point with coordinates $\left({x}_{1},{y}_{1},{z}_{1}\right)$ and parallel to the vector $a\stackrel{^}{i}+b\stackrel{^}{j}+c\stackrel{^}{k}$, and
$\frac{x-{x}_{1}}{{x}_{2}-{x}_{1}}=\frac{y-{y}_{1}}{{y}_{2}-{y}_{1}}=\frac{z-{z}_{1}}{{z}_{2}-{z}_{1}}$, for a line passing through two points with coordinates $\left({x}_{1},{y}_{1},{z}_{1}\right)$ and $\left({x}_{2},{y}_{2},{z}_{2}\right)$.

## Want to join the conversation?

• So much text. Hard to read.