Lagnever AI Hinglish

How do you write the equation of a line in space and find the angle between two lines?

Answer in short

The line through the point a parallel to b is r = a + λb. Through (x₁, y₁, z₁) with direction ratios a, b, c it is (x − x₁)/a = (y − y₁)/b = (z − z₁)/c. The acute angle θ between two lines has cos θ = |b₁ · b₂|/(|b₁||b₂|).

Stuck on a question? Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2. Get it on Google Play

A line through a point, parallel to a vector

A line in space is fixed once you know one point on it and its direction. Let A have position vector a, and let b be a vector along the line. For any point P (position vector r) on the line, AP is parallel to b, so AP = λb for some real number λ. Since AP = r − a,

r = a + λb.

This is the vector equation of the line. Each value of λ gives one point: λ = 0 gives A itself, and λ = 1, 2, −1, … give points further along or behind. The numbers in b = aî + bĵ + ck̂ are direction ratios of the line (do not confuse b with its length |b|).

The line through A(1, 1, 2) parallel to b = î + 2ĵ + k̂; λ = 2 gives P(3, 5, 4)
Start at A, then move λ copies of b

From vector form to Cartesian form

Put r = xî + yĵ + zk̂, a = x₁î + y₁ĵ + z₁k̂ and b = aî + bĵ + ck̂ into r = a + λb and compare the coefficients of î, ĵ and k̂:

x = x₁ + λa, y = y₁ + λb, z = z₁ + λc.

These are the parametric equations. Each one gives λ; setting the three values equal removes λ:

(x − x₁)/a = (y − y₁)/b = (z − z₁)/c.

This is the Cartesian equation. If the direction cosines l, m, n are known, use them as the denominators.

Example. Through (5, 2, −4) parallel to 3î + 2ĵ − 8k̂: the vector form is r = (5î + 2ĵ − 4k̂) + λ(3î + 2ĵ − 8k̂), and the Cartesian form is (x − 5)/3 = (y − 2)/2 = (z + 4)/(−8).

Reading an equation back. Bring each fraction to the form (x − x₁)/a first. For (1 − x)/3 = (7y − 14)/(2p) = (z − 3)/2, write (x − 1)/(−3) = (y − 2)/(2p/7) = (z − 3)/2: the point is (1, 2, 3) and the direction ratios are −3, 2p/7, 2.

A line through two points

If the line passes through the points with position vectors a and b, then b − a points along it, so

r = a + λ(b − a).

In coordinates, through (x₁, y₁, z₁) and (x₂, y₂, z₂): (x − x₁)/(x₂ − x₁) = (y − y₁)/(y₂ − y₁) = (z − z₁)/(z₂ − z₁).

Example. Through (1, −1, 2) and (3, 1, 3): b − a = 2î + 2ĵ + k̂, so r = (î − ĵ + 2k̂) + λ(2î + 2ĵ + k̂).

The angle between two lines

Two lines in space need not meet, but their directions still make an angle. Take the lines through O parallel to them; the acute angle θ between these is the angle between the lines. For r = a₁ + λb₁ and r = a₂ + μb₂,

cos θ = |b₁ · b₂|/(|b₁||b₂|).

With direction ratios a₁, b₁, c₁ and a₂, b₂, c₂ this reads cos θ = |a₁a₂ + b₁b₂ + c₁c₂|/(√(a₁² + b₁² + c₁²) √(a₂² + b₂² + c₂²)), and with direction cosines simply cos θ = |l₁l₂ + m₁m₂ + n₁n₂|.

Directions b₁ = î + 2ĵ + 2k̂ and b₂ = 3î + 2ĵ + 6k̂ drawn from O; cos θ = 19/21
Only the directions matter, not where the lines are

Example. For b₁ = î + 2ĵ + 2k̂ and b₂ = 3î + 2ĵ + 6k̂: b₁ · b₂ = 3 + 4 + 12 = 19, |b₁| = 3 and |b₂| = 7, so cos θ = 19/21 and θ = cos⁻¹(19/21).

Two special cases.

  • Perpendicular (θ = 90°): a₁a₂ + b₁b₂ + c₁c₂ = 0. For example, the lines (x − 5)/7 = (y + 2)/(−5) = z/1 and x/1 = y/2 = z/3 give 7 − 10 + 3 = 0.
  • Parallel (θ = 0): a₁/a₂ = b₁/b₂ = c₁/c₂. For example, direction ratios −2, −4, −4 and 2, 4, 4.

Read next: shortest distance between two lines, direction cosines and direction ratios, the Chapter 11 notes and the NCERT solutions for Exercise 11.2.

Practice

  1. The line (x − 2)/3 = (y + 1)/4 = (z − 5)/(−2) passes through:

    1. (a) (3, 4, −2)
    2. (b) (2, −1, 5)
    3. (c) (−2, 1, −5)
    4. (d) (2, 1, 5)
    Show answer

    Answer: (b) (2, −1, 5)

  2. Direction ratios of the line r = (î − ĵ) + λ(2î + k̂) are:

    1. (a) 1, −1, 0
    2. (b) 2, 0, 1
    3. (c) 2, 1, 0
    4. (d) 3, −1, 1
    Show answer

    Answer: (b) 2, 0, 1

  3. The lines with direction ratios 2, 1, −2 and 1, 2, 2 are:

    1. (a) parallel
    2. (b) perpendicular
    3. (c) at 45°
    4. (d) at 60°
    Show answer

    Answer: (b) perpendicular

  4. Write the vector and Cartesian equations of the line through (1, −1, 2) and (3, 1, 3).

    Show answer

    Answer: b − a = 2î + 2ĵ + k̂, so r = (î − ĵ + 2k̂) + λ(2î + 2ĵ + k̂), and (x − 1)/2 = (y + 1)/2 = (z − 2)/1.

Questions students ask

Is the equation of a line in space unique?

No. Any point of the line can play the role of a, and any non-zero multiple of b can be the direction. r = (î + ĵ + 2k̂) + λ(î + 2ĵ + k̂) and r = (3î + 5ĵ + 4k̂) + μ(2î + 4ĵ + 2k̂) are the same line.

Why can a line in space not be written as a single equation like y = mx + c?

In space one linear equation in x, y, z describes a plane, not a line. A line needs two conditions, which is why the Cartesian form has two equal signs: (x − x₁)/a = (y − y₁)/b and (y − y₁)/b = (z − z₁)/c.

What if a direction ratio is 0, as in x/1 = y/0 = z/0?

A 0 in the denominator is a short way of saying that coordinate never changes. x/1 = y/0 = z/0 means y = 0 and z = 0 while x takes every value: the x-axis.

Stuck on a question?

Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2.

Get it on Google Play Open in browser

For parents: after the trial, the plan renews monthly by UPI or card autopay. You can cancel anytime in the app.