Careers360 Logo
Equation of a Line in Three Dimensions

Equation of a Line in Three Dimensions

Edited By Komal Miglani | Updated on Feb 14, 2025 11:46 PM IST

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 ( x,y,z ). In real life, we use equations for a line in space to calculate the speed, distance and time of a moving object.

This Story also Contains
  1. What is the Equation of a Line?
  2. Equation of line in 2D
  3. Equation of a line through a given point and parallel to a given vector in Vector Form
  4. Equation of a line through a given point and parallel to a given vector in Cartesian Form
  5. Equation of a line passing through two given points in vector form
  6. Solved Examples Based on Equations for a Line in 3D Space
Equation of a Line in Three Dimensions
Equation of a Line in Three Dimensions

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.

What is the Equation of a Line?

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:

  1. It passes through a given point and has given direction, or

  2. It passes through two given points.

Equation of line in 2D

1) Point Slope Form

Using the Point Slope Form we represent a line using the slope (m) and a point on the line (x1,y1).

yy1=m(xx1)

2) Slope Intercept Form

In Slope Intercept Form we represent a line using the slope (m) and the y intercept (b).

y=mx+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 (θ) the line makes with the positive x axis and the perpendicular distance (p) from the origin to the line.

xcosθ+ysinθ=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).

Equation of a line through a given point and parallel to a given vector in Vector Form

Let L be a line in space passing through point P(x0,y0,z0). Let b=ai^+bj^+ck^ be a vector parallel to L . Then, for any point on line Q(x,y,z), we know that vector PQ is parallel to vector b . Thus, there is a scalar, λ, such that PQ=λb, which gives,

PQ=λb~(xx0)i^+(yy0)j^+(zz0)k^=λ(ai^+bj^+ck^)

Using vector operations, we can rewrite,

(xi^+yj^+zk^)(x0i^+y0j^+z0k^)=λ(ai^+bj^+ck^)(xi^+yj^+zk^)=(x0i^+y0j^+z0k^)+λ(ai^+bj^+ck^)

Setting r=xi^+yj^+zk^ and r0=x0i^+y0j^+z0k^ we now have the vector equation of a line:

r=r0+λb


Equation of a line through a given point and parallel to a given vector in Cartesian Form

The Equation of a line through a given point and parallel to a given vector in Cartesian Form is

xx0a=yy0b=zz0c


Derivation

The vector equation of a line r=r0+λb shows that the following equations are simultaneously true:

x=x0+λa;y=y0+λb;z=z0+λ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 λ 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 λ assuming a,b, and c are non-zero, we get a different description of the same line:

xx0a=λ,yy0b=λ,zz0c=λ

|These are parametric equations of the line. Eliminating the parameter λ from the above equation, we get,

xx0a=yy0b=zz0c

This is the Cartesian equation of the line.

NOTE:
If I,m,n are the direction cosines of the line, the equation of the line is

xx0l=yy0m=zz0n

Equation of a line passing through two given points in vector form

Let p=x0i^+y0j^+z0k^ and q=x1i^+y1j^+z1k^
r=p+λ(qp)

Derivation

Let P(x0,y0,z0) and Q(x1,y1,z1) be the points on a line, and let p=x0i^+y0j^+z0k^ and q=x1i^+y1j^+z1k^

Let 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 PQ=(x1x0)i^+(y1y0)j^+(z1z0)k^ as the direction vector, the equation r=r0+λb gives

r=p+λ(PQ)r=p+λ(qp)


Equation of a line passing through two given points in Cartesian Form

We can also find parametric equations for the line segment r=p+λ(qp)

As the position vector of point R(x,y,z) is r=(xi^+yj^+zk^).

Recommended Video Based on Equations for a Line in 3D Space


Solved Examples Based on Equations for a Line in 3D Space

Example 1: Consider the lines L1 and L2 given by

L1:x12=y31=z22L2:x21=y22=z33

line L3 having direction ratios 1,1,2, intersects L1 and L2 at the points P and Q respectively. Then the length of the line segment PQ is
[JEE MAINS 2023]

Solution

D R's of PQ are =(2λμ1,λ2μ+1,2λ3μ1) given D.R's are =(1,1,2)

2λμ11=λ2μ+11=2λ3μ12λ=μ=3P=(7,6,8)Q=(5,8,12)PQ=26

Hence, the answer is 26

Example 2: Let the line L pass through the point (0,1,2), intersect the line x12=y23=z34 and be parallel to the plane 2x+y3z=4. Then the distance of the point P(1,9,2) from the line L is :
[JEE MAINS 2023]

Solution

PQ=(2λ+1,3λ+1,4λ+1)PQn=0(2λ+1)(2)+(3λ+1)(1)+(4λ+1)(3)=05λ=0λ=0Q=(1,2,3)eqn of line x01=y11=z21=μ distance of line from (1,9,2)(PQ)(1,1,1)=0[μ1,μ+10,μ][1,1,1]=0μ1+μ+10+μ=0μ=3Q=(3,2,1)PQ=16+49+9=74

Hence, the answer is 74

Example 3: Let a line having direction ratios 1,4,2 intersect the lines x73=y11=z+21 and x2=y73=z1 at the points A and B . Then (AB)2 is equal to [JEE MAINS 2022]

Solution

Direction ratio of AB:

3μ2λ+71=μ3λ64=μλ22

On solving μ=5

λ=3

(AB)2=(15+6+7)2+(5+96)2+(5+32)2=4+64+16=84

Hence, the answer is 84

Example 4: The equation of the line through the point (0,1,2) and perpendicular to the line x12=x+13=z12 is: [JEE MAINS 2022]

Solution


x12=y+13=z12=rP(x,y,z)=(2r+1,3r1,2r+1)

Since, QP(2i^+3j^2k^)

4r+2+9r6+4r+2=0r=217P(2117,1117,1317)PQ=21i^28j^21k^17

So, QP:x3=y14=z23
Hence, the answer is x3=y14=z23

Example 5 : The equation of the line passing through (4,3,1), parallel to the plane x+2yz5=0 and intersecting the line x+13=y32=z21 is :

[JEE Mains 2021]
Solution: The normal vector of the plane containing two intersecting lines is parallel to the vector

v1=|i^j^^k^301321|=2i^+6k^

The required line is parallel to the vector

(v2)=|i^j^k^121206|=3i^j^+k^

The required equation of the line is

x+43=y31=z11

Frequently Asked Questions (FAQs)

1. What are the conditions for determining the line uniquely?

A line is uniquely determined if It passes through a given point and has given direction, or it passes through two given points.

2. What is the Cartesian equation of a line through a given point and parallel to a given vector?

The Cartesian equation of a line is given by

xx0a=yy0b=zz0c

3. If I,m,n are the direction cosines of the line, then what is the equation of the line?

If I, m, n are the direction cosines of the line, the equation of the line is

xx0l=yy0m=zz0n

4. What is the equation of the line passing through two points?

The equation of the line passing through two points is given by

r=p+λ(qp)

5. What is the Cartesian equation of a line passing through two points A(x1,y1,z1) and B(x2,y2,z2)?

The equation of a line passing through two points A(x1,y1,z1) and B(x2,y2,z2) is given by

xx1x2x1=yyy2y1=zz1z2z1

Articles

Back to top