• Written By Syed_C
  • Last Modified 25-01-2023

Equation of a Line in Space: Vector and Cartesian Form

img-icon

Equation of a Line in Space: Vector is a quantity that has both direction and magnitude. Position vectors denote the position or location of a point in the three-dimensional Cartesian system with respect to a reference origin.

The equation of the line is defined \(y=m x+c\), where \(c\) is the \(y\)-intercept and \(m\) is the slope. It is known that we can uniquely determine a line if:

  • It passes through a particular point in a specific direction
  • It passes through two unique points

Here, we shall study the equation of a line in vector form and Cartesian form in detail.

Line Passing Through a Point and Parallel to a Vector

Equation of a Line in Vector Form

Equation of a line in vector form

Let us consider a line that passes through a point \(A\), and this line is parallel to \(\vec{b}\). So, the given line \(L\) passes through \(A\), whose position vector is given by \(\vec{a}\).

Now let us consider any arbitrary point \(P\) on the given line, where the position vector the point \(P\) is given by \(\vec{r}\).

Since \(\overrightarrow{A P}\) parallel to the vector, so we write \(\overrightarrow{A P}=\lambda \vec{b}\), where \(\lambda\) is some scalar quantity

But also, we know that, \(\overrightarrow{A P}\) can be written as \(\overrightarrow{A P}=\overrightarrow{O P}-\overrightarrow{O A}\)

\(\Rightarrow \lambda \vec{b}=\vec{r}-\vec{a}\)

\(\Rightarrow \vec{r}=\vec{a}+\lambda \vec{b}\)

This is the vector equation of the line.

Example: Find the vector equation of the line which passes through the point \(A(1,2,3)\) and is parallel to the vector \(\hat{3 i}+2 \hat{j}-2 \hat{k}\).

Ans: It is given that, the line passes \(A(1,2,3)\). Therefore, its position vector through \(A\) is \(\vec{a}=\hat{i}+2 \hat{j}+3 \hat{k}\) and also the vector parallel to the line is \(\vec{b}=3 \hat{i}+2 \hat{j}-2 \hat{k}\)
The vector equation of the line which passes through the point \(A\) and parallel the vector \(\vec{b}\) is given by \(\vec{r}=\vec{a}+\lambda \vec{b}\), where \(\lambda\) is some scalar.

Therefore, the required vector equation of the line is

\(\vec{r}=\hat{i}+2 \hat{j}+3 \hat{k}+\lambda(3 \hat{i}+2 \hat{j}-2 \hat{k})\)

Equation of a Line in Cartesian Form

Let the coordinates of the point \(A\) through which lines pass through is \(\left( {{x_1},\,{y_1},\,{z_1}} \right),\) and the direction ratios of the line are \(a, b\), and \(c\).

So, we write the equation as

\(\vec{r}=x \hat{i}+y \hat{j}+z \hat{k}\)

\(\vec{a}=x_{1} \hat{i}+y_{1} \hat{j}+z_{1} \hat{k}\)

\(\vec{b}=a \hat{i}+b \hat{j}+c \hat{k}\)

Now, substitute the above vectors in the vector equation of a line, 

\(x \hat{i}+y \hat{j}+z \hat{k}=x_{1} \hat{i}+y_{1} \hat{j}+z_{1} \hat{k}+\lambda(a \hat{i}+b \hat{j}+c \hat{k})\)

\(\Rightarrow x \hat{i}+y \hat{j}+z \hat{k}=x_{1} \hat{i}+y_{1} \hat{j}+z_{1} \hat{k}+\lambda a \hat{i}+\lambda b \hat{j}+\lambda c \hat{k}\)

\( \Rightarrow x\hat i + y\hat j + z\hat k = \left( {{x_1} + \lambda a} \right)\hat i + \left( {{y_1} + \lambda b} \right)\hat j + \left( {{z_1} + \lambda c} \right)\hat k\)

Comparing the coefficients of \(\hat{i}, \hat{j}\), and \(\hat{k}\)

\(x=\left(x_{1}+\lambda a\right)\)

\(y=\left(y_{1}+\lambda b\right)\)

\(z=\left(z_{1}+\lambda c\right)\)

Solving for \(\lambda\), gives us the line equation in Cartesian form.

Therefore, the equation of the line in Cartesian form is

\(\frac{x-x_{1}}{a}=\frac{y-y_{1}}{b}=\frac{z-z_{1}}{c}\)

Example: Find the Cartesian equation of the line that passes through the point \(A(1,2,1)\) and whose direction ratios are given by \(4,5,-1\).

Ans: As we know, the Cartesian equation of a straight line in space which passes through a fixed point \(\left(x_{1}, y_{1}, z_{1}\right)\) and whose direction ratios are \(a, b, c\) is given by

\(\frac{x-x_{1}}{a}=\frac{y-y_{1}}{b}=\frac{z-z_{1}}{c}\)

Therefore, the equation of the line in Cartesian form is \(\frac{x-1}{4}=\frac{y-2}{5}=\frac{z-1}{-1}\)

Line Passing Through Two Points

Equation of a Line in Vector Form

Equation of Line in Vector Form

Let \(\vec{a}\) and \(\vec{b}\) be the position vectors of the two points \(A\left( {{x_1},\,{y_1},\,{z_1}} \right)\) and \(B\left( {{x_2},\,{y_2},\,{z_2}} \right)\) respectively that lie on a line.

Let \(\vec{r}\) be a position vector of any arbitrary point \(P(x, y, z)\), then \(P\) is a point on the line if and only if \(\overrightarrow{A P}=(\vec{r}-\vec{a})\) and \(\overrightarrow{A B}=(\vec{b}-\vec{a})\) are collinear vectors.

Therefore, \(P\) is on the line if and only if \(\left(\vec{r}-\vec{a}\right)=\lambda(\vec{b}-\vec{a})\), where \(\lambda\) is some scalar quantity.

This can be written as, \(\vec{r}-\vec{a}=\lambda \vec{b}-\lambda \vec{a}\)

\(\Rightarrow \vec{r}=\lambda \vec{b}-\lambda \vec{a}+\vec{a}\)

\(\Rightarrow \vec{r}=\vec{a}+\lambda(\vec{b}-\vec{a})\)

So, the Vector equation of the line is \(\vec{r}=\vec{a}+\lambda(\vec{b}-\vec{a})\), where \(\lambda\) is a scalar.

Example: Find the vector equation of the line passing through two points \(A(3,4,-6)\) and \(B(5,-2,7)\).

Ans: Given: \(A(3,4,-6)\) and \(B(5,-2,7)\)

Let \(\vec{a}\) and \(\vec{b}\) be the position vectors of the two points \(A\left(x_{1}, y_{1}, z_{1}\right)\) and \(B\left(x_{2}, y_{2}, z_{2}\right)\) respectively that lying on the line.

Thus, \(\vec{a}=3 \hat{i}+4 \hat{j}-6 \hat{k}\) and \(\vec{b}=5 \hat{i}-2 \hat{j}+7 \hat{k}\)

As we know, the vector equation of the line passing through the two points is \(\overrightarrow r = \overrightarrow a + \lambda \left( {\overrightarrow b – \overrightarrow a } \right)\) where \(\lambda\) is some scalar quantity

Therefore, \(\vec{r}=3 \hat{i}+4 \hat{j}-6 \hat{k}+\lambda[(5 \hat{i}-2 \hat{j}+7 \hat{k})-(3 \hat{i}+4 \hat{j}-6 \hat{k})]\)

\(\Rightarrow \vec{r}=3 \hat{i}+4 \hat{j}-6 \hat{k}+\lambda[(5 \hat{i}-2 \hat{j}+7 \hat{k})-(3 \hat{i}+4 \hat{j}-6 \hat{k})]\)

\(\therefore \vec{r}=3 \hat{i}+4 \hat{j}-6 \hat{k}+\lambda(2 \hat{i}-6 \hat{j}+13 \hat{k})\)

Equation of a Line in Cartesian Form

Let \(\vec{a}\) and \(\vec{b}\) be the position vectors of the two points \(\left( {{x_1},\,{y_1},\,{z_1}} \right)\) and \(B\left( {{x_2},\,{y_2},\,{z_2}} \right)\) respectively that lie on a line and let \(\vec{r}\) be a position vector of any arbitrary point \(P(x, y, z)\), therefore,

\(\vec{r}=x \hat{i}+y \hat{j}+z \hat{k}\)

\(\vec{a}=x_{1} \hat{i}+y_{1} \hat{j}+z_{1} \hat{k}\)

\(\vec{b}=x_{2} \hat{i}+y_{2} \hat{j}+z_{2} \hat{k}\)

Now, substituting the above vectors in the vector equation of a line, we have,

\(x \hat{i}+y \hat{j}+z \hat{k}=x_{1} \hat{i}+y_{1} \hat{j}+z_{1} \hat{k}+\lambda\left[\left(x_{2}-x_{1}\right) \hat{i}+\left(y_{2}-y_{1}\right) \hat{j}+\left(z_{2}-z_{1}\right) \hat{k}\right]\)

\(\Rightarrow x \hat{i}+y \hat{j}+z \hat{k}=x_{1} \hat{i}+y_{1} \hat{j}+z_{1} \hat{k}+\lambda\left(x_{2}-x_{1}\right) \hat{i}+\lambda\left(y_{2}-y_{1}\right) \hat{j}+\lambda\left(z_{2}-z_{1}\right) \hat{k}\)

\(\Rightarrow x \hat{i}+y \hat{j}+z \hat{k}=\left(x_{1}+\lambda\left(x_{2}-x_{1}\right)\right) \hat{i}+\left(y_{1}+\lambda\left(y_{2}-y_{1}\right)\right) \hat{j}+\left(z_{1}+\lambda\left(z_{2}-z_{1}\right)\right) \hat{k}\)

Comparing the coefficients of \(\hat{i}, \hat{j}, \hat{k}\), then we get

\(x=x_{1}+\lambda\left(x_{2}-x_{1}\right)\)

\(y=y_{1}+\lambda\left(y_{2}-y_{1}\right)\)

\(z=z_{1}+\lambda\left(z_{2}-z_{1}\right)\)

Solving for \(\lambda\) in each equation gives us the line equation in Cartesian form, i.e. eliminate \(\lambda\).

Therefore, the equation of the line passing through two points in Cartesian form is

\(\frac{x-x_{1}}{x_{2}-x_{1}}=\frac{y-y_{1}}{y_{2}-y_{1}}=\frac{z-z_{1}}{z_{2}-z_{1}}\)

Example: Find the Cartesian equation of the line passing through \(A(-2,1,0)\) and \(B(3,4,-1)\)

Ans: Given: \(A(-2,1,0)\) and \(B(3,4,-1)\)

As we know, the Cartesian equation of the line passing through two points \(A\left(x_{1}, y_{1}, z_{1}\right) \& B\left(x_{2}, y_{2}, z_{2}\right)\) is

\(\frac{\left(x-x_{1}\right)}{\left(x_{2}-x_{1}\right)}=\frac{\left(y-y_{1}\right)}{\left(y_{2}-y_{1}\right)}=\frac{\left(z-z_{1}\right)}{\left(z_{2}-z_{1}\right)}=k\)

Therefore, the Cartesian equation of the line passing through \(A(-2,1,0)\) and \(B(3,4,-1)\) is

\(\frac{(x-3)}{(3+2)}=\frac{(y-4)}{(4-1)}=\frac{(z+1)}{(-1+0)}=k\)

\(\Rightarrow \frac{x-3}{5}=\frac{y-4}{3}=\frac{z+1}{-1}=k\)

Solved Examples – Vector and Cartesian Equations of a Line

Q.1. Find the vector and the Cartesian equations of the line that passes through the points \((3,-2,-5)\) and \((3,-2,6)\).
Ans: Let the line passing through the points \(P(3,-2,-5)\) and \(Q(3,-2,6)\) be \(P Q\)
Position vector of \(P(3,-2,-5)\) is \(\vec{a}=3 \hat{i}-2 \hat{j}-5 \hat{k}\)
Direction ratios of \(P Q\) are given by,
\((3-3)=0\)
\((-2+2)=0\)
\((6+5)=11\)
Thus, vector parallel to the line \(PQ\) is,
\(\vec{b}=0 \hat{i}-0 \hat{j}+11 \hat{k}=11 \hat{k}\)
Equation of the line \(PQ\) in Vector form is
\(\vec{r}=\vec{a}+\lambda \vec{b}\)
Therefore, the vector equation of the line \(PQ\) is 
\(\vec{r}=(3 \hat{i}-2 \hat{j}-5 \hat{k})+11 \lambda \hat{k}\)
Cartesian equation of the line passing through two points \(A\left( {{x_1},\,{y_1},\,{z_1}} \right)\,\& \,B\left( {{x_2},\,{y_2},\,{z_2}} \right)\) is given by,
\(\frac{\left(x-x_{1}\right)}{\left(x_{2}-x_{1}\right)}=\frac{\left(y-y_{1}\right)}{\left(y_{2}-y_{1}\right)}=\frac{\left(z-z_{1}\right)}{\left(z_{2}-z_{1}\right)}\)
Thus, the equation of the line \(PQ\) in Cartesian form is
\(\frac{(x-3)}{(3-3)}=\frac{(y+2)}{(-2+2)}=\frac{(z+5)}{(6+5)}\)
\(\Rightarrow \frac{(x-3)}{0}=\frac{(y+2)}{0}=\frac{(z+5)}{11}\)

Q.2. Find the vector and the Cartesian equations of the line that passes through the origin and \((5,−2,3)\).
Ans:
Let the line passing through the points \(P(0,0,0)\) and \(Q(5,-2,3)\) be \(P Q\)
Position vector of \(P(0,0,0)\) is \(\vec{a}=0 \hat{i}+0 \hat{j}+0 \hat{k}\)
Direction ratios of \(P Q\) are given by
\((5-0)=5\)
\((-2-0)=-2\)
\((3-0)=3\)
Hence, the vector parallel to the line \(P Q\) is \(\vec{b}=5 \hat{i}-2 \hat{j}+3 \hat{k}\)
The equation of the line \(P Q\) in Vector form is
\(\vec{r}=\vec{a}+\lambda \vec{b} \text {, where } \lambda \in R\)
Therefore, the Vector equation of the line \(P Q\) is
\(\vec{r}=0+\lambda(5 \hat{i}-2 \hat{j}+3 \hat{k})\)
\(\Rightarrow \vec{r}=\lambda(5 \hat{i}-2 \hat{j}+3 \hat{k})\)
Cartesian equation of the line passing through two points \(A\left(x_{1}, y_{1}, z_{1}\right) \& B\left(x_{2}, y_{2}, z_{2}\right)\) is
\(\frac{\left(x-x_{1}\right)}{\left(x_{2}-x_{1}\right)}=\frac{\left(y-y_{1}\right)}{\left(y_{2}-y_{1}\right)}=\frac{\left(z-z_{1}\right)}{\left(z_{2}-z_{1}\right)}\)
Hence, the equation of the line \(PQ\) in Cartesian form is
\(\frac{(x-0)}{(5-0)}=\frac{(y-0)}{(-2-0)}=\frac{(z-0)}{(3-0)}\)
\(\Rightarrow \frac{x}{5}=\frac{y}{-2}=\frac{z}{3}\)

Q.3. The Cartesian equation of a line is \(\frac{(x-5)}{3}=\frac{(y+4)}{7}=\frac{(z-6)}{2}\). Write its vector form.
Ans:
Given: Cartesian equation of the line \(=\frac{(x-5)}{3}=\frac{(y+4)}{7}=\frac{(z-6)}{2}\)
Clearly, the given line passes through the point \((5,-4,6)\).
Positon vector of this point is \(\vec{a}=5 \hat{i}-4 \hat{j}+6 \hat{k}\)
Direction ratios of the given line are \(3,7\), and \(2\).
This means that the line is in the direction vector \(\vec{b}=3 \hat{i}+7 \hat{j}+2 \hat{k}\)
As we know, a line through position vector \(\vec{a}\) and in the direction of the vector \(\vec{b}\) is given by the equation,
\(\vec{r}=\vec{a}+\lambda \vec{b}\), where \(\lambda \in R\)
Therefore, the required equation of the line in vector form is,
\(\vec{r}=(5 \hat{i}-4 \hat{j}+6 \hat{k})+\lambda(3 \hat{i}+7 \hat{j}+2 \hat{k})\)

Q.4. Find the Vector equation and Cartesian equation of the line passing through the point \((5,2,-4)\) and parallel to the vector \(3 \hat{i}+2 \hat{j}-8 \hat{k}\).
Ans:
As we know, a line through position vector \(\vec{a}\) and in the direction of the vector \(\vec{b}\) is given by the equation is
\(\vec{r}=\vec{a}+\lambda \vec{b}\), where \(\lambda \in R\)
Given:
\(\vec{a}=5 \hat{i}+2 \hat{j}-4 \hat{k}\)
\(\vec{b}=3 \hat{i}+2 \hat{j}-8 \hat{k}\)
Thus, the vector equation of the line is 
\(\vec{r}=5 \hat{i}+2 \hat{j}-4 \hat{k}+\lambda(3 \hat{i}+2 \hat{j}-8 \hat{k})\)
Let \(\vec{r}\) be the position vector of any arbitrary point \(P(x, y, z)\) lying on the line.
\(\therefore x \hat{i}+y \hat{j}+z \hat{k}=5 \hat{i}+2 \hat{j}-4 \hat{k}+\lambda(3 \hat{i}+2 \hat{j}-8 \hat{k})\)
\(\Rightarrow x \hat{i}+y \hat{j}+z \hat{k}=(5+3 \lambda) \hat{i}+(2+2 \lambda) \hat{j}+(-4-8 \lambda) \hat{k}\)
On comparing coefficients of \(\hat{i}, \hat{j}, \hat{k}\), we get \(x=(5+3 \lambda)\)
\(y=(2+2 \lambda)\)
\(z=(-4-8 \lambda)\)
So, eliminating \(\lambda\), we get:
\(\frac{x-5}{3}=\frac{y-2}{2}=\frac{z+4}{-8}\)

Q.5. Find the Cartesian equation of a line which passes through the point \((-2,4,-5)\) and parallel to the line given by \(\frac{x+3}{3}=\frac{y-4}{5}=\frac{z+8}{6}\).
Ans:
Given line: \(\frac{x+3}{3}=\frac{y-4}{5}=\frac{z+8}{6}\)
\(\Rightarrow \frac{x-(-3)}{3}=\frac{y-4}{5}=\frac{z-(-8)}{6}\)
As we know, when two-lines are parallel, they have the same directional ratios.
Therefore, the Cartesian equation of the line passes through the point \((-2,4,-5)\) with direction ratios \(3,5,6\) is
\(\frac{x+2}{3}=\frac{y-4}{-5}=\frac{z+5}{6}\)

Summary

Equation of a line is defined \(y=m x+b\), where \(b\) is the \(y\)-intercept and \(m\) is the slope. We can uniquely determine a line if it passes through a fixed point in a specific direction and it passes through two unique points. The equation of the line which passes through a fixed point and a direction can be determined in ways, i.e. Vector form and Cartesian form. Similarly, the equation of the line that passes through two points can be defined in both Vector and Cartesian forms.

Frequently Asked Questions (FAQs)

Q1. What is a line in space?
Ans: The equation of a line is defined \(y=m x+c\), where \(c\) is the \(y\)-intercept and \(m\) is the slope. We can uniquely determine a line if:
(i) It passes through a fixed point in a specific direction
(ii) It passes through two unique points

Q2. What are the different forms of a line in 3D?
Ans: In three-dimensional geometry, lines (straight lines) are usually represented in the two forms
(i) Vector form
(ii) Symmetric form or Cartesian form

Q3. What is the formula for a line?
Ans: The list of formulas are given below in a tabular format;

Condition Vector formCartesian Form
One point and a directionThe vector equation of the line which passes through the point A and parallel the vector \(\vec{b}\) is given by \(\vec{r}=\vec{a}+\lambda \vec{b}\), where \(\lambda \) is some scalarThe Cartesian equation of a straight line in space which passes through a fixed point \(\left(x_{1}, y_{1}, z_{1}\right)\) and whose direction ratios are \(a,b,c\) is given by \(\frac{x-x_{1}}{a}=\frac{y-y_{1}}{b}=\frac{z-z_{1}}{c}\)
Two pointsThe vector equation of the line passing through the two points is \(\overrightarrow r = \overrightarrow a + \lambda \left( {\overrightarrow b – \overrightarrow a } \right),\) where \(\lambda\) is some scalar quantityThe Cartesian equation of the line passing through two points \(A\left(x_{1}, y_{1}, z_{1}\right) \& B\left(x_{2}, y_{2}, z_{2}\right)\) is \(\frac{\left(x-x_{1}\right)}{\left(x_{2}-x_{1}\right)}=\frac{\left(y-y_{1}\right)}{\left(y_{2}-y_{1}\right)}=\frac{\left(z-z_{1}\right)}{\left(z_{2}-z_{1}\right)}\)

Q4. How do you find the equation of a line with two points in space?
Ans: The vector equation of the line passing through the two points is
\(\vec{r}=\vec{a}+\lambda(\vec{b}-\vec{a})\), where \(\lambda\) is some scalar quantity.
The Cartesian equation of the line passing through two points
\(A\left( {{x_1},\,{y_1},\,{z_1}} \right)\& \,B\left( {{x_2},\,{y_2},\,{z_2}} \right)\) is \(\frac{\left(x-x_{1}\right)}{\left(x_{2}-x_{1}\right)}=\frac{\left(y-y_{1}\right)}{\left(y_{2}-y_{1}\right)}=\frac{\left(z-z_{1}\right)}{\left(z_{2}-z_{1}\right)}\)

Q5. Can a line be 3-dimensional?
Ans: Lines in \(3D\) have equations similar to lines in \(2\) dimensions and can be found when two points on the line are given. Alternatively, it can also be found using one point and one direction vector.

We hope you find all the information about the Equation of a Line in Space: Vector Form and Cartesian Form in Three Dimension in this article. If you have any further queries, drop us a comment below. We will get back to you. Till then, stay tuned to Embibe for all updates on Equation of a Line in Space, exam preparation tips and the latest academic articles!

Reduce Silly Mistakes; Take Mock Tests related to Equation of Line