Equations of a line in space · Mathematics Class 11–12 | StemPy Lab
Course 15.1·Lesson 2 of 3
Equations of a line in space
A line in space is fixed by one point on it and its direction. In vector form it is r=a+λb
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
write a line through a point and parallel to a vector, in vector and in Cartesian form;
write the line through two points;
move between the two forms and test whether a point lies on a line.
A line in space
A kite string pulled tight is a straight line. Hold one end at a point A and let the string point along a direction b. Every point P of the string is reached by walking from A some multiple of b. In symbols, with a the position vector of A and r the position vector of P:
r=a+λb.
The number λ (lambda) is the parameter. Each real value of λ gives one point of the line. A-Level and IB write r=a+λd, or r=a+tb. They are all the same equation.
A three-dimensional picture of a straight blue line through a point A. A green arrow from the origin to A is labelled a. A red arrow along the line is labelled b, the direction. A second point P on the line is marked, with a purple arrow from the origin to P labelled r. A short brown arrow from A to P is labelled lambda b.
The Cartesian form
Put a=x1i^+y1j^+z1k^ and b=ai^+bj^+ck^. Then x=x1+λa, y=y1+λb and z=z1+λc. Solve each for λ and set them equal:
ax−x1=by−y1=cz−z1.
This is the symmetric form of the line. The denominators a, b, c are direction ratios. If they are replaced by the direction cosines l, m, n, the common value is the actual distance from A along the line.
When a denominator is 0, the matching numerator is 0 as well. For example 3x−1=0y+2=−2z−4 means that y=−2 all along the line, and 3x−1=−2z−4. The fraction with 0 underneath is only a way of writing "y does not change".
The line through two points
If the line passes through A(x1,y1,z1) and B(x2,y2,z2), its direction is AB, and
Here b is the position vector of B. Notice the letter b now means a point, and not a direction. Say which one you mean when you write.
A worked example
A line passes through A(1,2,3) and is parallel to b=2i^−j^+4k^.
Vector form.r=(i^+2j^+3k^)+λ(2i^−j^+4k^).
Cartesian form.2x−1=−1y−2=4z−3.
Does (7,−1,15) lie on it? Each fraction gives 27−1=3, −1−1−2=3 and 415−3=3. They agree, so yes, with λ=3.
Does (3,1,8) lie on it? The fractions are 1, 1 and 45. They disagree, so no.
A line through two points. Take A(2,−1,4) and B(5,3,−8). The direction ratios are (3,4,−12), the length is 13, and the line is
3x−2=4y+1=−12z−4.
From Cartesian to vector form. The line 2x−3=3y+1=6z−5 passes through (3,−1,5) and has direction ratios (2,3,6). So r=(3i^−j^+5k^)+λ(2i^+3j^+6k^). Read the signs carefully: y+1 means y1=−1.
Practise with new numbers
Try it in Python
The program lists points of the line of the worked example for several values of λ. It then tests whether (7,−1,15) lies on the line.
Common mistakes
Wrong sign of the point. In 3y+1 the coordinate is y1=−1. Move the number across before you read it.
Using the point as the direction. The denominators are direction ratios, not the coordinates of the point.
Testing only two coordinates. All three fractions must agree.
Forgetting the parameter. Different values of λ give different points, and one value gives one point.
Remember these
Vector form: r=a+λb. The line passes through a and is parallel to b.
Cartesian form: ax−x1=by−y1=cz−z1.
Through two points: use the differences of the coordinates as direction ratios.
A zero denominator means that coordinate stays fixed along the line.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Write the vector equation of the line through (1,0,−2) parallel to 3i^+j^−4k^.
Write 3x+2=2y−1=−1z−4 in vector form.
Find the line through (1,1,1) and (3,2,−1) in Cartesian form.
Does (4,3,−4) lie on the line of question 3?
What does 0x−5=2y+1=2z−3 say about x?
References
OpenStax, Calculus Volume 3, Chapter 2, section on equations of lines and planes in space (vector, parametric and symmetric equations of a line).
NCERT, Mathematics Part II for Class XII, Chapter 11, section on the equation of a line in space.
Enroll free in Lines in Space: Direction Cosines, Equations and Angles
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.