A line is fixed by a point A and a direction. In r=a+tb the vector a is the position of A, b is the direction vector and the parameter t is any real number: every t gives one point, and t=0 gives A. The same form works in the plane and in space.
Example
r=(21)+t(3−1).t=1 gives (5,0), t=2 gives (8,−1) and t=−2 gives (−4,3).
Rule
The line through two points
Through A and B the direction is AB, end minus start, so r=OA+tAB. Then t=0 gives A, t=1 gives B, t=21 gives the midpoint and t>1 lies beyond B.
Example
A(1,2,−1) and B(4,0,5) give AB=(3−26), of length 7.t=21 gives (25,1,2), the midpoint; t=2 gives (7,−2,11), beyond B.
Rule
Is the point on the line?
Put the coordinates of P into a+tb and solve each coordinate for t. If every coordinate gives the same t, P is on the line; if two values differ, it is not. A coordinate where b has a 0 cannot change and must agree by itself.
Example
Line r=(21)+t(3−1).(8,−1) → x gives t=2 and y gives t=2: it is on the line.(4,3) → x gives t=32 but y gives t=−2: it is not.
Tip
One line, many equations
The equation of a line is not unique: any point of the line may be the starting point and any non-zero multiple of b the direction. Two equations give the same line when the directions are parallel and one point of the first lies on the second.
Example
(21)+t(3−1) and (50)+s(−62): the direction is −2 times the first, and the point of t=1 is the new start.So it is one line; its point for t=−1, (−1,2), has s=1.
Rule
The parametric form
Written coordinate by coordinate, the line is x=x0+lt, y=y0+mt and in space z=z0+nt, with (l;m;n) the direction. The number before t tells how fast that coordinate changes, the number alone is its value at t=0.
Example
r=(12−1)+t(3−26) is x=1+3t, y=2−2t, z=−1+6t.At t=2 → x=7, y=−2, z=11, the point (7,−2,11).
Rule
Eliminate t: the equation of the line
Solve one coordinate for t and put it into the other: in the plane this gives ax+by=c. The other way round, a direction of ax+by=c is (b;−a), and a point is found by choosing x or y.
Example
(31)+t(2−1) → t=2x−3, so y=1−2x−3 and x+2y=5.Back → 2x−3y=6 has the point (3,0) and the direction (32), so r=(3,0)+t(32).
Rule
The Cartesian form in space
In space the Cartesian form is a chain of equal fractions, lx−x0=my−y0=nz−z0: each fraction is t. If a direction number is 0, that coordinate never changes and stands alone, like y=y0.
Example
(12−1)+t(3−26) → 3x−1=−2y−2=6z+1.Direction (2,0,1) through (1,4,3) → 2x−1=z−3 and y=4.
Watch out!
The normal is not the direction
From ax+by=c the numbers (a;b) form the normal vector, at a right angle to the line, not along it. The direction is (b;−a): swap the numbers and change one sign. Check with the scalar product, which must be 0.
Example
2x−3y=6 has the normal (2−3) and the direction (32).2⋅3+(−3)⋅2=0, so they are perpendicular; taking the normal as the direction draws the perpendicular line.
Definition
Two lines: four cases
Two lines are coincident (the same line), parallel (same direction, no common point), intersecting (one common point) or skew (not parallel and no common point, only in space). Test the directions first: they are parallel when one is a multiple of the other.
Example
L1 → (1,2,3)+λ(2−11).Direction (−42−2)=−2(2−11) through (0,0,0) → AC=(−1,−2,−3) is no multiple of (2−11), so parallel.Direction (4−22)=2(2−11) through (3,1,4) → AC=(2−11), so coincident.
Rule
The common point of two lines
For a+λb and c+μd use two different parameters. Equate the coordinates, solve two equations for λ and μ, then test the third. If it holds the lines meet; put λ into the first line for the point.
Example
(1,2,3)+λ(2−11) and (1,−1,6)+μ(11−1).x → 1+2λ=1+μ, y → 2−λ=−1+μ → λ=1, μ=2.z → 3+1=6−2 holds, so they meet at (3,1,4).
Watch out!
Skew lines and the vertical gap
If the third equation fails the lines are skew: they do not meet and are not parallel. The two points with the same x and y lie one above the other; the difference in z is a vertical gap. It is not the distance between the lines.
Example
Start the second line at (1,−1,8) instead: again λ=1 and μ=2, but z gives 3+1=4 against 8−2=6.So the lines are skew, with a vertical gap 6−4=2, measured straight up.
Rule
The angle between two lines
The angle between two lines is the acute angle between their directions, found with cosθ=∣b∣∣d∣∣b⋅d∣. The absolute value picks the acute angle: a negative scalar product gives an obtuse angle between the vectors, and the lines make its supplement. Skew lines have an angle too.
Example
b=(2−11) and d=(122) → b⋅d=2, ∣b∣=6, ∣d∣=3, so cosθ=362=96 and θ=74.2°.With (−1−2−2) the vectors make 105.8°, the lines still 74.2°.
Rule
A missing value p
A letter p in a line is a condition. For lines to meet, solve two equations for λ and μ and put them into the third: that equation gives p. For parallel use d=kb; for perpendicular b⋅d=0, a quadratic in p when p is in both directions.
Example
L1 as before and L2 → (1,−1,p)+μ(11−1). Again λ=1 and μ=2; the third equation 3+1=p−2 gives p=6.For p=5 or p=7 the lines are skew.
Tip
Lines through the corners of a solid
Lines through two corners of a solid are lines with two known points: put O at the origin and write the corners as points. In a cuboid the four space diagonals meet at the centre; two edges or diagonals that do not meet and are not parallel are skew.
Example
Cuboid 4×3×2 → OF and AG meet at the centre (2,23,1) and make an acute angle of 84.1°.OA (along x) and CG (up from (0,3,0)) do not meet and are not parallel: skew.
Rule
The foot and the mirror image
The foot N of the perpendicular from P to a+tb has t0=b⋅bAP⋅b. Then PN⋅b=0, ∣PN∣ is the distance from P to the line and the mirror image is P′=2N−P.
Example
P(5,1) and the line (01)+t(21) → AP=(50), t0=510=2, N=(4,3).∣PN∣=5≈2.24 and P′=2N−P=(3,5).
Rule
Points at a given distance
The points Q of the line at distance d from P: put Q=a+tb into ∣PQ∣2=d2. This is a quadratic in t: two points if d>∣PN∣, one (the foot) if d=∣PN∣, none if d<∣PN∣.
Example
Same P and line, d=3 → Q=(2t;1+t) gives (2t−5)2+t2=9, so 5t2−20t+16=0.t=2±525, about 1.106 and 2.894: two points, as 3>5.
Rule
A right angle at Q
A right angle at Q means QP⋅QR=0. With Q on the line this is a quadratic in t (two, one or no points), and the points lie on the circle with diameter PR. Equal distances QP=QR give a linear equation, so Q is on the perpendicular bisector.
Example
P(5,1), R(−3,7) and Q=(2t;1+t) → (5−2t)(−3−2t)+(−t)(6−t)=0, so 5t2−10t−15=0 and t=−1 or t=3.Q(−2,0) and Q(6,4) lie on the circle with centre (1,4) and radius 5.
Definition
Constant velocity
A point that starts at r0 and moves with the constant velocity v is at r=r0+tv at time t: a line with t as the time. The speed is the length ∣v∣, the distance travelled is speed times time and the acceleration is zero.
Example
A ship leaves O with v=(43) km/h: the speed is 16+9=5 km/h.After 2 h it is at (8,6), having sailed 5⋅2=10 km.
Rule
When and where?
To find when the point gets somewhere, solve for t. A coordinate such as x=k gives one t. A target point T is reached only if every coordinate gives the same t. A given distance from the start is reached when ∣v∣t equals it.
Example
Start (2,3), v=(43). x=14 gives 2+4t=14, t=3, at (14,12).T(10,9) gives t=2 from both coordinates: reached. U(10,10) gives t=2 from x but t=37 from y: never reached.
Watch out!
Two moving points: meet or only cross?
Crossing paths are not a collision. Find where the two lines cross, with a separate parameter for each point. The points meet only if both parameters are equal there: they must be at the crossing at the same time.
Example
Ship 1 → (0,0)+t(43), ship 2 → (20,−7)+t(−24). The paths cross at (12,9): ship 1 is there at t=3, ship 2 at t=4. They miss.Starting at (18,−3) instead, both are there at t=3: a collision.
Rule
The closest approach
The relative position d(t)=r1−r2=d0+tw is again a line in t. Its length is smallest at t∗=−w⋅wd0⋅w, where d(t∗) is at a right angle to w; use it only if t∗≥0.
Example
The same ships → d0=(−207), w=(6−1), so t∗=37127≈3.43 h and dmin2=37484.The closest approach is dmin=3722≈3.62 km, so they pass each other safely.
Tip
Aircraft: crossing, meeting or passing over
The paths of two aircraft can cross in the plan view and still be apart. Find the time each is above the crossing, then compare the heights. Equal times and equal heights is a meeting; equal times and different heights is a pass-over with a vertical separation.
Example
F1 → (0,0,7)+t(64−1), F2 → (18,−4,3)+t(−361) (km, min). Both are above (12,8) at t=2, at heights 7−2=5 and 3+2=5: they meet.If F2 starts at height 4, the heights are 5 and 6: a pass-over, 1 km apart.
Tip
A laser ray from a mast
A ray from the top of a mast is a line in space. It reaches the floor where z=0; the angle φ with the floor has sinφ=∣d∣∣dz∣. After a bounce dz changes sign and the ray goes on; a wall is where x reaches its value.
Example
Mast 3 m, ray (0,0,3)+t(21−1) → 3−t=0 gives t=3, the floor at (6,3,0). Also sinφ=61, so φ≈24.1°.After the bounce (211): the wall x=10 is reached when 6+2s=10, s=2, at (10,5,2).
Tip
A pipe and a cable under the ground
A pipe and a cable are two lines with z<0. They touch only if they meet. When they cross in the plan view, at the same x and y, the difference of their depths there is the vertical gap, and they are skew.
Example
Pipe (0,−4,−2)+λ(110), cable (4,−3,−5)+μ(010) → x gives λ=4, then y → −4+4=−3+μ, so μ=3.The depths at that spot are 2 m and 5 m: they do not touch, the vertical gap is 3 m.
Tip
Which course needs what
Cambridge A level (Paper 3) asks for the vector equation of a line, parallel, intersecting or skew lines with their intersection, the angle and the foot of the perpendicular; the shortest distance between skew lines is not required. IB HL (both courses) has the line in 2D and 3D with kinematics; AA adds the four cases and the angle. Wiskunde B vwo has the vectorvoorstelling, parametervoorstelling and vergelijking of a line in the plane; wiskunde D vwo names no line. The UK A level has no vector line (Further Mathematics). AP Precalculus has straight-line motion in parametric form in an optional topic, not examined. IB SL, IGCSE and MEB: none.
Example
A question for Cambridge or IB HL: do (1,2,3)+λ(2−11) and (1,−1,6)+μ(11−1) meet? Yes, at (3,1,4).A UK A level question stays out of vector lines: the length of (3,4,12) is 9+16+144=13.
Exercises
A line goes through A(3,−2) with direction (14). Write a vector equation and find the point for t=3. Easy
Show solution
Point plus t times the direction.
r=(3,−2)+t(14).
Put in t=3 → 3+1⋅3=6 and −2+4⋅3=10.
r=(3,−2)+t(14), and t=3 gives (6,10).
Check → t=0 gives A back.
Write a vector equation of the line through A(2,−1,4) and B(5,3,−2) and find its midpoint M. Easy
Show solution
The direction is end minus start, AB=(34−6).
r=(2,−1,4)+t(34−6).
The midpoint is t=21, or half the sum → 22+5=27, 2−1+3=1, 24−2=1.
r=(2,−1,4)+t(34−6) and M=(27,1,1).
Check → t=1 gives (2+3,−1+4,4−6)=(5,3,−2)=B.
Is P(7,1) on the line r=(12)+t(3−1)? Easy
Show solution
Solve each coordinate for t.
x → 1+3t=7, so t=2.
y → 2−t=1, so t=1.
The values differ, so P is not on the line.
No → x asks t=2 and y asks t=1.
Check → at t=2 the line is at (7,0), one below P.
A line has the equation r=(4−1)+t(23). Write the parametric equations and the Cartesian equation y=mx+c. Easy
Show solution
Coordinate by coordinate → x=4+2t and y=−1+3t.
From x → t=2x−4.
Into y → y=−1+23(x−4)=23x−7.
x=4+2t, y=−1+3t and y=23x−7.
Check → t=1 gives (6,2) and 23⋅6−7=2.
Give a vector along the line 3x+2y=12. Easy
Show solution
For ax+by=c the normal is (a;b)=(3,2).
The direction is (b;−a): swap the numbers and change one sign → (2,−3).
Not (3,2): that is the normal.
(2,−3), or any non-zero multiple of it.
Check → 3⋅2+2⋅(−3)=0, so it is perpendicular to the normal.
A boat starts at (1,2) and moves with the constant velocity (34) km/h. Find its speed and its position after 2 h. Easy
Show solution
The speed is the length of the velocity → 32+42=5 km/h.
The position is r=(1,2)+t(34) at t=2 → 1+3⋅2=7 and 2+4⋅2=10.
The speed is 5 km/h; after 2 h the boat is at (7,10).
Check → the distance sailed is 5⋅2=10 km, and ∣(6,8)∣=10.
Write a vector equation of the line 4x+3y=12. Medium
Show solution
A point → y=0 gives x=3, so (3,0).
The direction is (b;−a)=(3,−4).
r=(3,0)+t(3,−4).
r=(3,0)+t(3,−4) (any point and any multiple of the direction will do).
Check → t=2 gives (9,−8) and 4⋅9+3⋅(−8)=12.
Show that the lines (2,1,0)+λ(1−12) and (1,−2,0)+μ(314) meet, and find the point. Medium
Show solution
The directions are no multiples, so not parallel.
x → 2+λ=1+3μ and y → 1−λ=−2+μ.
Add the two → 3=−1+4μ, so μ=1 and λ=2.
z → 0+2⋅2=4 and 0+4⋅1=4, equal; so the point is on the first line at λ=2.
They meet at (4,−1,4), for λ=2 and μ=1.
Check → the second line at μ=1 is (1+3,−2+1,0+4)=(4,−1,4).
Find the acute angle between the lines with directions (340) and (043). Medium
Show solution
Scalar product → 3⋅0+4⋅4+0⋅3=16.
Lengths → ∣b∣=9+16=5 and ∣d∣=16+9=5.
cosθ=2516, so θ≈50.2°.
θ≈50.2°.
Check → the scalar product is positive and below 5⋅5, so the angle is acute.
Take L1 → (1,0,2)+λ(111) and L2 → (1,1,p)+μ(21−1). For which p do they meet? Medium
Show solution
x → 1+λ=1+2μ and y → λ=1+μ.
Then λ=2μ and 2μ=1+μ, so μ=1 and λ=2.
z → 2+λ=p−μ, so 2+2=p−1.
So p=5.
p=5, and then the lines meet at (3,2,4). For every other p they are skew.
Check → L1 at λ=2 is (3,2,4), and L2 at μ=1 is (1+2,1+1,5−1)=(3,2,4).
Find the foot N of the perpendicular from P(7,1) to the line (1,2)+t(21), the distance from P to the line and the mirror image of P. Medium
Show solution
AP=(6−1) and b⋅b=5, so t0=56⋅2+(−1)⋅1=511 and N=(527,521).
PN=(−58,516), with ∣PN∣2=564, so ∣PN∣=585.
Mirror image → 2N−P=(519,537).
N=(527,521), ∣PN∣=585≈3.58 and P′=(519,537).
Check → PN⋅b=−58⋅2+516⋅1=0.
A boat starts at (−3,4) and moves with (2−1) km/h. When is x=9, and does it ever reach T(5,2)? Medium
Show solution
x=−3+2t=9, so t=6 h; then y=4−6=−2, at (9,−2).
For T → x gives −3+2t=5, so t=4.
y gives 4−t=2, so t=2.
The values differ, so T is never reached.
x=9 after 6 h, at (9,−2). The boat never reaches T: its path misses it.
Check → at t=4 the boat is at (5,0), and at t=2 at (1,2): neither is T.
Show that the lines (0,0,0)+λ(121) and (2,0,3)+μ(01−1) are skew, and find the vertical gap over their common plan point. Hard
Show solution
The directions are no multiples, so not parallel.
x → λ=2. y → 2λ=μ, so μ=4.
z → λ=2 for the first line, 3−μ=−1 for the second.
2=−1, so the lines do not meet: skew.
The lines are skew, with a vertical gap 2−(−1)=3 over the point (2,4).
Check → no λ, μ satisfy all three equations; the gap is a vertical distance, not the distance between the lines.
The vectors (p,2,1) and (p−4,1,1) are the directions of two lines. Find p so that the lines are perpendicular. Hard
Show solution
Perpendicular means the scalar product is 0.
p(p−4)+2⋅1+1⋅1=0.
p2−4p+3=0, so (p−1)(p−3)=0.
p=1 or p=3.
Check → p=1 → 1⋅(−3)+2+1=0. p=3 → 3⋅(−1)+2+1=0.
Ship 1 starts at (0,0) with (53) and ship 2 at (5,15) with (2−1) (km, km/h). Find their closest approach. Hard
Show solution
Relative position d(t)=r1−r2=(−5−15)+t(34).
d0⋅w=−75 and w⋅w=25, so t∗=2575=3.
d(3)=(4−3), with length 16+9=5.
t∗≥0, so it counts.
After 3 h the ships are closest, 5 km apart.
Check → ship 1 is at (15,9) and ship 2 at (11,12) → 16+9=5, and d(3)⋅w=4⋅3+(−3)⋅4=0.
Find the points of the line (1,0,2)+t(122) that are at distance 5 from P(0,4,3), and the foot N of the perpendicular from P. Hard
Show solution
AP=(−141), b⋅b=9 and AP⋅b=9, so t0=1 and N=(2,2,4) with ∣PN∣=3.
As 5>3 there are two points: ∣Q−P∣2=25 with Q−P=(1+t;2t−4;2t−1).
(1+t)2+(2t−4)2+(2t−1)2=9t2−18t+18=25, so 9t2−18t−7=0.
t=1818±24, so t=37 or t=−31.
N=(2,2,4); the points are (310,314,320) (for t=37) and (32,−32,34) (for t=−31).
Check → both points are at distance 5 → (32)2+(−314)2+(−35)2=94+196+25=25.
The line y=x is r=t(1,1). Find the points Q of the line with a right angle at Q in the triangle PQR, where P(7,1) and R(1,5). Hard
Show solution
Q=(t;t), QP=(7−t;1−t) and QR=(1−t;5−t).
QP⋅QR=(7−t)(1−t)+(1−t)(5−t)=0.
Factor (1−t) → (1−t)(12−2t)=0, so t=1 or t=6.
Q(1,1) and Q(6,6).
Check → both lie on the circle with diameter PR: centre (4,3), and (1−4)2+(1−3)2=13=(6−4)2+(6−3)2.
A laser ray leaves the top (0,0,4) of a mast with direction (3,2,−2). Find the floor point, the angle with the floor and, after a bounce with direction (3,2,2), the point on the wall x=15. Hard
Show solution
Floor where z=0 → 4−2t=0, so t=2 at (6,4,0); sinφ=172, so φ≈29.0°.
After the bounce → (6,4,0)+s(3,2,2), and the wall x=15 gives 6+3s=15, so s=3, and y=10, z=6.
The floor at (6,4,0), the angle 29.0° and the wall at (15,10,6).
Check → ∣(3,2,−2)∣=∣(3,2,2)∣=17.
Interactive applications for this topic
Free applications open with a free student account. Teachers can use all applications in a live lesson.