The equation of a line is an algebraic way to represent a line in terms of the coordinates of the points it joins. The equation of the straight line in 3D requires two points that are located in space. The point in three coordinates is expressed as ( $\mathrm{x}, \mathrm{y}, \mathrm{z}$ ). In real life, we use equations for a line in space to calculate the speed, distance and time of a moving object.
JEE Main 2025: Sample Papers | Mock Tests | PYQs | Study Plan 100 Days
JEE Main 2025: Maths Formulas | Study Materials
JEE Main 2025: Syllabus | Preparation Guide | High Scoring Topics
In this article, we will cover the concept of Equations for a Line in Space. This topic falls under the broader category of 3-dimensional geometry, which is an important chapter in Class 12 Mathematics. This is very important not only for board exams but also for the competitive exams, which even include the Joint Entrance Examination Main and other entrance exams: SRM Joint Engineering Entrance, BITSAT, WBJEE, and BCECE. A total of 11 questions have been asked on this topic in JEE Main from 2013 to 2023 including one in 2014, one in 2019, two in 2021, two in 2022, and five in 2023.
The equation of a line is an algebraic way to express a line in terms of the coordinates of the points it joins. The equation of a line will always be a linear equation.
A line is uniquely determined if:
It passes through a given point and has given direction, or
It passes through two given points.
Using the Point Slope Form we represent a line using the slope $(m)$ and a point on the line $\left(x_1, y_1\right)$.
$
y-y_1=m\left(x-x_1\right)
$
2) Slope Intercept Form
In Slope Intercept Form we represent a line using the slope $(\mathrm{m})$ and the $y$ intercept $(b)$.
$
y=m x+b
$
3) Intercept Form
Using the Intercept Form we represent a line where it intersects the x -axis at $(a, 0)$ and the $y$-axis at $(0, b)$.
$
x / a+y / b=1
$
4) Normal Form
Represents a line using the angle $(\theta)$ the line makes with the positive $x$ axis and the perpendicular distance (p) from the origin to the line.
$
x \cos \theta+y \sin \theta=p
$
Equation of Line in 3D
The equation of the straight line in 3D requires two points that are located in space. The point in three coordinates is expressed as ( $x, y, z)$.
Let $L$ be $a$ line in space passing through point $P\left(x_0, y_0, z_0\right)$. Let $\overrightarrow{\mathbf{b}}=a \hat{\mathbf{i}}+b \hat{\mathbf{j}}+c \hat{\mathbf{k}}$ be a vector parallel to $L$ . Then, for any point on line $\mathrm{Q}(\mathrm{x}, \mathrm{y}, \mathrm{z})$, we know that vector $P Q$ is parallel to vector $b$ . Thus, there is a scalar, $\lambda$, such that $\overrightarrow{P Q}=\lambda \overrightarrow{\mathbf{b}}$, which gives,
$
\begin{gathered}
\overrightarrow{P Q}=\lambda \tilde{\mathbf{b}} \\
\left(x-x_0\right) \hat{i}+\left(y-y_0\right) \hat{j}+\left(z-z_0\right) \hat{k}=\lambda(a \hat{i}+b \hat{j}+c \hat{k})
\end{gathered}
$
Using vector operations, we can rewrite,
$
\begin{aligned}
(x \hat{i}+y \hat{j}+z \hat{k})-\left(x_0 \hat{i}+y_0 \hat{j}+z_0 \hat{k}\right) & =\lambda(a \hat{i}+b \hat{j}+c \hat{k}) \\
(x \hat{i}+y \hat{j}+z \hat{k}) & =\left(x_0 \hat{i}+y_0 \hat{j}+z_0 \hat{k}\right)+\lambda(a \hat{i}+b \hat{j}+c \hat{k})
\end{aligned}
$
Setting $\overrightarrow{\mathbf{r}}=x \hat{i}+y \hat{j}+z \hat{k}$ and $\overrightarrow{\mathbf{r}}_0=x_0 \hat{i}+y_0 \hat{j}+z_0 \hat{k}$ we now have the vector equation of a line:
$
\overrightarrow{\mathbf{r}}=\overrightarrow{\mathbf{r}}_0+\lambda \overrightarrow{\mathbf{b}}
$
The Equation of a line through a given point and parallel to a given vector in Cartesian Form is
$
\frac{x-x_0}{a}=\frac{y-y_0}{b}=\frac{z-z_0}{c}
$
The vector equation of a line $\overrightarrow{\mathbf{r}}=\overrightarrow{\mathbf{r}}_0+\lambda \overrightarrow{\mathbf{b}}$ shows that the following equations are simultaneously true:
$
x=x_0+\lambda a ; y=y_0+\lambda b ; z=z_0+\lambda c
$
If we solve each of these equations for the component variables $x, y$, and $z$, we get a set of equations in which each variable is defined in terms of the parameter $\lambda$ and that, together, describe the line. This set of three equations forms a set of parametric equations of a line:
If we solve each of the equations for $\lambda$ assuming $\mathrm{a}, \mathrm{b}$, and $c$ are non-zero, we get a different description of the same line:
$
\frac{x-x_0}{a}=\lambda, \quad \frac{y-y_0}{b}=\lambda, \quad \frac{z-z_0}{c}=\lambda
$
|These are parametric equations of the line. Eliminating the parameter $\lambda$ from the above equation, we get,
$
\frac{x-x_0}{a}=\frac{y-y_0}{b}=\frac{z-z_0}{c}
$
This is the Cartesian equation of the line.
NOTE:
If $\mathrm{I}, \mathrm{m}, \mathrm{n}$ are the direction cosines of the line, the equation of the line is
$
\frac{x-x_0}{l}=\frac{y-y_0}{m}=\frac{z-z_0}{n}
$
Let $\overrightarrow{\mathbf{p}}=x_0 \hat{i}+y_0 \hat{j}+z_0 \hat{k} \text { and } \overrightarrow{\mathbf{q}}=x_1 \hat{i}+y_1 \hat{j}+z_1 \hat{k} \text {. }\\$
$\overrightarrow{\mathbf{r}}=\overrightarrow{\mathbf{p}}+\lambda(\overrightarrow{\mathbf{q}}-\overrightarrow{\mathbf{p}})$
Let $P\left(x_0, y_0, z_0\right)$ and $Q\left(x_1, y_1, z_1\right)$ be the points on a line, and let $\overrightarrow{\mathbf{p}}=x_0 \hat{i}+y_0 \hat{j}+z_0 \hat{k}$ and $\overrightarrow{\mathbf{q}}=x_1 \hat{i}+y_1 \hat{j}+z_1 \hat{k}$
Let $\overrightarrow{\mathbf{r}}$ be the position vector of an arbitrary point $R(x, y, z)$ lying on this line We want to find a vector equation for the line PQ.
Using P as our known point on the line, and $\overrightarrow{P Q}=\left(x_1-x_0\right) \hat{i}+\left(y_1-y_0\right) \hat{j}+\left(z_1-z_0\right) \hat{k}$ as the direction vector, the equation $\overrightarrow{\mathbf{r}}=\overrightarrow{\mathbf{r}}_0+\lambda \overrightarrow{\mathbf{b}}$ gives
$
\begin{aligned}
\overrightarrow{\mathbf{r}} & =\overrightarrow{\mathbf{p}}+\lambda(\overrightarrow{P Q}) \\
\overrightarrow{\mathbf{r}} & =\overrightarrow{\mathbf{p}}+\lambda(\overrightarrow{\mathbf{q}}-\overrightarrow{\mathbf{p}})
\end{aligned}
$
Equation of a line passing through two given points in Cartesian Form
We can also find parametric equations for the line segment $\overrightarrow{\mathbf{r}}=\overrightarrow{\mathbf{p}}+\lambda(\overrightarrow{\mathbf{q}}-\overrightarrow{\mathbf{p}})$
As the position vector of point $\mathrm{R}(\mathrm{x}, \mathrm{y}, \mathrm{z})$ is $\overrightarrow{\mathbf{r}}=(x \hat{i}+y \hat{j}+z \hat{k})$.
Recommended Video Based on Equations for a Line in 3D Space
Example 1: Consider the lines $L_1$ and $L_2$ given by
$
L_1: \frac{x-1}{2}=\frac{y-3}{1}=\frac{z-2}{2} L_2: \frac{x-2}{1}=\frac{y-2}{2}=\frac{z-3}{3}
$
line $L_3$ having direction ratios $1,-1,-2$, intersects $L_1$ and $L_2$ at the points $P$ and $Q$ respectively. Then the length of the line segment $P Q$ is
[JEE MAINS 2023]
Solution
D R's of $P Q$ are $=(2 \lambda-\mu-1, \lambda-2 \mu+1,2 \lambda-3 \mu-1)$ given D.R's are $=(1,-1,-2)$
$
\begin{aligned}
& \frac{2 \lambda-\mu-1}{1}=\frac{\lambda-2 \mu+1}{-1}=\frac{2 \lambda-3 \mu-1}{-2} \\
& \lambda=\mu=3 \\
& \mathrm{P}=(7,6,8) \\
& \mathrm{Q}=(5,8,12) \\
& \mathrm{PQ}=2 \sqrt{6}
\end{aligned}
$
Hence, the answer is $2 \sqrt{6}$
Example 2: Let the line $L$ pass through the point $(0,1,2)$, intersect the line $\frac{\mathrm{x}-1}{2}=\frac{\mathrm{y}-2}{3}=\frac{\mathrm{z}-3}{4}$ and be parallel to the plane $2 x+y-3 z=4$. Then the distance of the point $P(1,-9,2)$ from the line $L$ is :
[JEE MAINS 2023]
Solution
$\begin{aligned}
& \overrightarrow{\mathrm{PQ}}=(2 \lambda+1,3 \lambda+1,4 \lambda+1) \\
& \overrightarrow{\mathrm{PQ}} \cdot \overrightarrow{\mathrm{n}}=0 \quad \Rightarrow(2 \lambda+1) \cdot(2)+(3 \lambda+1)(1)+(4 \lambda+1)(-3)=0 \\
& \Rightarrow-5 \lambda=0 \\
& \Rightarrow \lambda=0 \\
& Q=(1,2,3) \\
& \mathrm{eq}^{\mathrm{n}} \text { of line } \\
& \frac{x-0}{1}=\frac{y-1}{1}=\frac{z-2}{1}=\mu \\
& \text { distance of line from }(1,-9,2) \\
& \left(P^{\prime} \mathrm{Q}\right) \cdot(1,1,1)=0 \\
& \Rightarrow[\mu-1, \mu+10, \mu] \cdot[1,1,1]=0 \\
& \Rightarrow \mu-1+\mu+10+\mu=0 \\
& \mu=-3 \\
& Q^{\prime}=(-3,-2,1) \\
& P^{\prime} Q^{\prime}=\sqrt{16+49+9}=\sqrt{74}
\end{aligned}$
Hence, the answer is $\sqrt{74}$
Example 3: Let a line having direction ratios $1,-4,2$ intersect the lines $\frac{\mathrm{x}-7}{3}=\frac{\mathrm{y}-1}{-1}=\frac{\mathrm{z}+2}{1}$ and $\frac{\mathrm{x}}{2}=\frac{\mathrm{y}-7}{3}=\frac{\mathrm{z}}{1}$ at the points A and B . Then $(\mathrm{AB})^2$ is equal to $\qquad$ [JEE MAINS 2022]
Solution
Direction ratio of AB:
$
\frac{3 \mu-2 \lambda+7}{1}=\frac{-\mu-3 \lambda-6}{-4}=\frac{\mu-\lambda-2}{2}
$
On solving $\mu=-5$
$
\lambda=-3
$
$
\begin{aligned}
\therefore(\mathrm{AB})^2 & =(-15+6+7)^2+(5+9-6)^2+(-5+3-2)^2 \\
& =4+64+16 \\
& =84
\end{aligned}
$
Hence, the answer is 84
Example 4: The equation of the line through the point $(0,1,2)$ and perpendicular to the line $\frac{x-1}{2}=\frac{x+1}{3}=\frac{z-1}{-2}$ is: [JEE MAINS 2022]
Solution
$\begin{aligned}
& \frac{x-1}{2}=\frac{y+1}{3}=\frac{z-1}{-2}=r \\
& \Rightarrow P(x, y, z)=(2 r+1,3 r-1,-2 r+1)
\end{aligned}$
Since, $\overrightarrow{Q P} \perp(2 \hat{i}+3 \hat{j}-2 \hat{k})$
$
\begin{aligned}
& \Rightarrow 4 r+2+9 r-6+4 r+2=0 \\
& \Rightarrow \mathrm{r}=\frac{2}{17} \\
& \Rightarrow \mathrm{P}\left(\frac{21}{17}, \frac{-11}{17}, \frac{13}{17}\right) \\
& \Rightarrow \overrightarrow{\mathrm{PQ}}=\frac{21 \hat{\mathrm{i}}-28 \hat{\mathrm{j}}-21 \hat{\mathrm{k}}}{17}
\end{aligned}
$
So, $\overrightarrow{\mathrm{QP}}: \frac{\mathrm{x}}{-3}=\frac{\mathrm{y}-1}{4}=\frac{\mathrm{z}-2}{3}$
Hence, the answer is $\frac{x}{-3}=\frac{y-1}{4}=\frac{z-2}{3}$
Example 5 : The equation of the line passing through $(-4,3,1)$, parallel to the plane $x+2 y-z-5=0$ and intersecting the line $\frac{x+1}{-3}=\frac{y-3}{2}=\frac{z-2}{-1}$ is :
[JEE Mains 2021]
Solution: The normal vector of the plane containing two intersecting lines is parallel to the vector
$
\overrightarrow{v_1}=\left|\begin{array}{ccc}
\hat{i} & \hat{\hat{j}} & \hat{k} \\
3 & 0 & 1 \\
-3 & 2 & -1
\end{array}\right|=-2 \hat{i}+6 \hat{k}
$
$\therefore$ The required line is parallel to the vector
$
\left(\overrightarrow{v_2}\right)=\left|\begin{array}{ccc}
\hat{i} & \hat{j} & \hat{k} \\
1 & 2 & -1 \\
-2 & 0 & 6
\end{array}\right|=3 \hat{i}-\hat{j}+\hat{k}
$
$\therefore$ The required equation of the line is
$
\frac{x+4}{3}=\frac{y-3}{-1}=\frac{z-1}{1}
$
Summary
The equation of a line in 3 dimensions provides various forms to describe the geometric properties and characteristics of the line, whether in vector form or in the form of parametric equations. It tells us about the relationship between coordinates and direction ratios. Understanding equations of the line helps us to analyze and solve complex problems.
A line is uniquely determined if It passes through a given point and has given direction, or it passes through two given points.
The Cartesian equation of a line is given by
$
\frac{x-x_0}{a}=\frac{y-y_0}{b}=\frac{z-z_0}{c}
$
If I, m, n are the direction cosines of the line, the equation of the line is
$
\frac{x-x_0}{l}=\frac{y-y_0}{m}=\frac{z-z_0}{n}
$
The equation of the line passing through two points is given by
$
\overrightarrow{\mathbf{r}}=\overrightarrow{\mathbf{p}}+\lambda(\overrightarrow{\mathbf{q}}-\overrightarrow{\mathbf{p}})
$
The equation of a line passing through two points $A\left(x_1, y_1, z_1\right)$ and $B\left(x_2, y_2, z_2\right)$ is given by
$
\frac{x-x_1}{x_2-x_1}=\frac{y-y}{y_2-y_1}=\frac{z-z_1}{z_2-z_1}
$
15 Oct'24 04:52 PM
15 Oct'24 04:39 PM
15 Oct'24 04:36 PM
15 Oct'24 04:34 PM
15 Oct'24 04:25 PM
15 Oct'24 04:18 PM
15 Oct'24 04:12 PM
15 Oct'24 02:07 PM