Porisma

Vectors: lines and perpendicular feet

← Back to lesson · Complete chapter reading and print view · Open reference notes separately

By the end, you can

  • Write a line using a point and direction
  • Find intersections and recognise skew lines
  • Use orthogonality to find a perpendicular foot

about 30 minutes for the lesson · practise at your own pace.

The central idea

A line has equation r=a+td\mathbf r=\mathbf a+t\mathbf d, with d≠0\mathbf d\ne\mathbf0. A point is on the line only if a single parameter satisfies every component. For the nearest point to P, require (p−a−td)⋅d=0(\mathbf p-\mathbf a-t\mathbf d)\cdot\mathbf d=0. Lines in space can be parallel, intersecting or skew.

Build a line from a displacement

Let P have position vector p and let PQ→=m\overrightarrow{PQ}=\mathbf m.

PointPosition on the linePosition vector
Qone displacement from Pp+m\mathbf p+\mathbf m
Ebeyond Q, PE=3PQPE=3PQp+3m\mathbf p+3\mathbf m
Fmidpoint of PQp+12m\mathbf p+\frac12\mathbf m
Gbeyond P away from Q, PG:PQ=2:1PG:PQ=2:1p−2m\mathbf p-2\mathbf m

The point order is G,P,F,Q,E. Thus any point R on the line has OR→=p+λm\overrightarrow{OR}=\mathbf p+\lambda\mathbf m for real λ. For distinct P,Q, m is nonzero. Negative λ moves opposite P→Q; 0<λ<10<\lambda<1 lies inside PQ; λ>1\lambda>1 lies beyond Q.

From a polygon mesh to a ray

The notes motivate vector geometry with film graphics such as Jurassic Park and Lord of the Rings. A modelled surface is built from connected flat polygons, often triangles, whose vertices are stored as coordinates. A wire mesh records how those pieces connect.

For shading, the notes describe following a ray backwards from the viewpoint to a surface facet and onward towards a light source. In their simplified picture, a facet reached by a light path is shaded brightly and one without such a path more darkly.

This is a motivation for line–plane geometry, not a complete lighting model. The two schematic illustrations below show the polygon mesh and the light–surface–eye path.

Describing the ray as a line and a facet as part of a plane turns the intersection into vector equations; the lines and planes chapters develop those descriptions. The printed source credit is retained as a further-reading pointer.

Derive the vector equation of a line

Let A be a fixed point with position vector a\mathbf a and let m≠0\mathbf m\ne\mathbf0 be parallel to the line. For a general point R with position vector r\mathbf r, vector addition gives r=a+AR→\mathbf r=\mathbf a+\overrightarrow{AR}. Since AR→\overrightarrow{AR} is parallel to m\mathbf m, write AR→=λm\overrightarrow{AR}=\lambda\mathbf m for a real scalar. Therefore r=a+λm\mathbf r=\mathbf a+\lambda\mathbf m, λ∈R\lambda\in\mathbb R.

The line is infinitely long. Each real parameter gives a unique point, and each point on this fixed representation has one parameter because the direction is nonzero. The symbol r varies over the position vectors of every point on the line; it is not one fixed vector.

The same geometric line can have different equations. Choose another point B on it with position vector b and any nonzero parallel direction n; then r=b+μn\mathbf r=\mathbf b+\mu\mathbf n also describes it. The base point, direction and parameter need not look identical. A parameter measures a displacement multiple, not a distance unless the direction is a unit vector.

Convert through the component equations

Write r=(x,y,z)\mathbf r=(x,y,z), a=(a1,a2,a3)\mathbf a=(a_1,a_2,a_3) and m=(m1,m2,m3)\mathbf m=(m_1,m_2,m_3). Equating components in r=a+λm\mathbf r=\mathbf a+\lambda\mathbf m gives

x=a1+λm1,y=a2+λm2,z=a3+λm3.x=a_1+\lambda m_1,\qquad y=a_2+\lambda m_2,\qquad z=a_3+\lambda m_3.

These are parametric equations: x,y,z are functions of the same parameter. When all three direction components are nonzero, solve each for it:

λ=x−a1m1=y−a2m2=z−a3m3.\lambda=\frac{x-a_1}{m_1}=\frac{y-a_2}{m_2}=\frac{z-a_3}{m_3}.

This is the symmetric Cartesian form. If a direction component is zero, retain its coordinate as a separate constant equation instead of dividing by zero. For example, if m3=0m_3=0 and m1,m2≠0m_1,m_2\ne0, use (x−a1)/m1=(y−a2)/m2(x-a_1)/m_1=(y-a_2)/m_2 together with z=a3z=a_3. If only one direction component is nonzero, the other two coordinates are constant.

Vector, parametric and Cartesian forms are equivalent representations. Choose the form that makes the next calculation convenient, and convert by equating components rather than guessing denominators.

Check whether a point lies on a line

For l:r=a+λml:\mathbf r=\mathbf a+\lambda\mathbf m, assume the point P is on the line and set p=a+λm\mathbf p=\mathbf a+\lambda\mathbf m. Compare all x,y,z components. A single λ must satisfy every equation; solve for it and check all remaining coordinates. When a direction component is zero, that equation checks a constant coordinate rather than determining λ. Example 22 shows both the vector and Cartesian tests.

Find the foot of a perpendicular

Let P be off the line and F its perpendicular foot.

Method 1: solve on the line. Since F lies on l, write OF→=a+λm\overrightarrow{OF}=\mathbf a+\lambda\mathbf m. Find PF→=OF→−OP→\overrightarrow{PF}=\overrightarrow{OF}-\overrightarrow{OP}. Perpendicularity gives PF→⋅m=0\overrightarrow{PF}\cdot\mathbf m=0. Solve for λ, then substitute into OF. This direction need not be a unit vector.

Method 2: use a projection vector. Choose A on l and let m^=m/∣m∣\widehat{\mathbf m}=\mathbf m/|\mathbf m|. Then AF→=(AP→⋅m^)m^\overrightarrow{AF}=(\overrightarrow{AP}\cdot\widehat{\mathbf m})\widehat{\mathbf m}. As AF→=OF→−OA→\overrightarrow{AF}=\overrightarrow{OF}-\overrightarrow{OA},

OF→=OA→+(AP→⋅m^)m^.\overrightarrow{OF}=\overrightarrow{OA}+(\overrightarrow{AP}\cdot\widehat{\mathbf m})\widehat{\mathbf m}.

Equivalently, f=a+[(p−a)⋅m/(m⋅m)]m\mathbf f=\mathbf a+[(\mathbf p-\mathbf a)\cdot\mathbf m/(\mathbf m\cdot\mathbf m)]\mathbf m, with m nonzero. A negative projection coefficient places F opposite the chosen direction from A. Example 23 follows both routes, finds the distance PF and reflects P using p′=2f−p\mathbf p'=2\mathbf f-\mathbf p.

Choose a route to perpendicular distance

Write h for the perpendicular distance and use a unit direction m^\widehat{\mathbf m}.

  1. Cross product: h=∣AP→×m^∣=∣AP→×m∣/∣m∣h=|\overrightarrow{AP}\times\widehat{\mathbf m}|=|\overrightarrow{AP}\times\mathbf m|/|\mathbf m|, with A any point on the line. The source refers back to its cross-product area construction in Section 8.4.3 of Vectors: Basic.
  2. Known foot: find F first, as in Example 23, then h=∣PF→∣h=|\overrightarrow{PF}|. This is convenient when the foot is already available.
  3. Projection and Pythagoras: find the projection length d=∣AP→⋅m^∣d=|\overrightarrow{AP}\cdot\widehat{\mathbf m}|, then h=∣AP→∣2−d2=∣AP→∣2−∣AP→⋅m^∣2h=\sqrt{|\overrightarrow{AP}|^2-d^2}=\sqrt{|\overrightarrow{AP}|^2-|\overrightarrow{AP}\cdot\widehat{\mathbf m}|^2}. This is convenient when the projection length is already available.

Source qualification: on printed page 59, the Student copy puts hats on the direction in the cross-product and projection formulas; the Teacher copy omits them. Those length formulas require a unit direction. We retain the Student normalisation and the explicit denominator versions above; the worked Example 24 uses (1,2,1)/6(1,2,1)/\sqrt6 in both copies. A dot product with an arbitrary direction alone is a scaled projection, not a projection length.

Classify the relationship between two lines

For two distinct lines the possibilities are distinct parallel, intersecting at one point, or skew (neither parallel nor intersecting).

Intersecting and distinct parallel lines are coplanar: they lie in a common plane.

Skew lines do not lie in one plane.

The printed list also mentions coincident lines despite introducing distinct lines; coincidence means two equations describe the same line and is an additional case when distinctness has not been established.

Use l1:r=a1+λm1l_1:\mathbf r=\mathbf a_1+\lambda\mathbf m_1 and l2:r=a2+μm2l_2:\mathbf r=\mathbf a_2+\mu\mathbf m_2, with both directions nonzero.

  1. Test whether m1=km2\mathbf m_1=k\mathbf m_2 for a nonzero real k. If so, directions are parallel. If needed, test whether a base point from one line lies on the other to distinguish coincident from distinct parallel lines.
  2. If directions are not parallel, equate a1+λm1=a2+μm2\mathbf a_1+\lambda\mathbf m_1=\mathbf a_2+\mu\mathbf m_2. In 3 D this is three linear equations in two unknowns. Use the source G.C. PlySmlt 2 simultaneous-equation method, or solve two independent component equations and check the third. An arbitrary pair might be dependent, so choose a pair that determines the two parameters.
  3. If one parameter pair satisfies all three equations, the lines intersect. For the unique solution λ=λ₀,μ=μ₀, OP→=a1+λ0m1=a2+μ0m2\overrightarrow{OP}=\mathbf a_1+\lambda_0\mathbf m_1=\mathbf a_2+\mu_0\mathbf m_2. Substitute into either line to find P.
  4. If the full system is inconsistent and directions are nonparallel, the lines are skew. Do not infer this just because two parameter values differ: λ and μ belong to different representations.

The cuboid question below tests all eight printed pairs, including face diagonals and space diagonals. A crossing in its flat projection is not sufficient evidence of a spatial intersection. Example 25 retains both the analytic checks and the calculator systems and outputs.

Find the smaller angle between lines

Let the nonzero direction vectors be m₁,m₂. First find their vector angle θ from m1⋅m2=∣m1∣∣m2∣cos⁡θ\mathbf m_1\cdot\mathbf m_2=|\mathbf m_1||\mathbf m_2|\cos\theta, so θ=cos⁡−1[(m1⋅m2)/(∣m1∣∣m2∣)]\theta=\cos^{-1}[(\mathbf m_1\cdot\mathbf m_2)/(|\mathbf m_1||\mathbf m_2|)]. The source refers back to its vector-angle formula in Section 7.4.1 of Vectors: Basic.

If θ is acute, the smaller line angle α is θ. If θ is obtuse, use α=π−θ\alpha=\pi-\theta (or 180∘−θ180^\circ-\theta). Equivalently,

α=cos⁡−1(∣m1⋅m2∣∣m1∣∣m2∣).\alpha=\cos^{-1}\left(\frac{|\mathbf m_1\cdot\mathbf m_2|}{|\mathbf m_1||\mathbf m_2|}\right).

The lines need not intersect: the formula compares directions and applies to skew lines too. The notes call α the acute angle; in the boundary cases, parallel directions give 0° and perpendicular directions give 90°, so in general it is the smaller nonnegative angle. Reversing one direction leaves the line unchanged while replacing θ by its supplement.

The notes invite you to explore angles in 3D. Use the chapter’s existing 3D scene to distinguish spatial lines from their flat projections.

Example 26 uses direction vectors only. Example 27(ii) asks an internal angle at A, so use AO and AB without forcing the result to be acute. The Teacher note on parallelogram labelling is integrated into the first step: follow O→A→B→C successively around the boundary (anticlockwise in its schematic); reversing the viewpoint changes the apparent orientation but not the vector identities.

A polygon mesh represents a surface

Expand diagram

Use the scrollbars or arrow keys to inspect details.

Authored schematic: connected triangular facets illustrate a polygon mesh whose vertices store surface coordinates.
Authored schematic: connected triangular facets illustrate a polygon mesh whose vertices store surface coordinates.
Authored schematic: connected triangular facets illustrate a polygon mesh whose vertices store surface coordinates.
Open original diagram (new tab)

A light–surface–eye ray path

Expand diagram

Use the scrollbars or arrow keys to inspect details.

Authored schematic: a light source, surface facet and viewpoint joined by a ray path. The calculation can follow the path backwards from the eye.
Authored schematic: a light source, surface facet and viewpoint joined by a ray path. The calculation can follow the path backwards from the eye.
Authored schematic: a light source, surface facet and viewpoint joined by a ray path. The calculation can follow the path backwards from the eye.
Open original diagram (new tab)

Method map: Build a line from a point and a direction

Separate the fixed position from the direction of travel along the line. A direction must be nonzero; the real parameter selects a point, with negative values allowed.

  1. Identify a point and a nonzero direction

    Choose one fixed point on the line and a direction parallel to it. If two distinct points are supplied, subtract their position vectors.

    a=OA→\mathbf a=\overrightarrow{OA}

    m≠0\mathbf m\ne\mathbf0

    Point and direction givenKeep their roles separate

    a\mathbf a locates A relative to O. The nonzero vector m\mathbf m gives the line direction; it need not be a unit vector.

    Two distinct points givenForm a displacement

    If A and B have position vectors a\mathbf a and b\mathbf b, use m=b−a\mathbf m=\mathbf b-\mathbf a. The reverse direction is equally valid. Identical points alone do not determine a line.

    A zero component is allowed. A direction vector with every component zero gives a single fixed point in the proposed equation, not a line.

  2. Add a parallel displacement

    Let R be any point on the line. Reach it by going from O to A, then from A to R.

    r=a+λm\mathbf r=\mathbf a+\lambda\mathbf m

    Vector additionFollow the two displacements

    The triangle law gives

    r=a+AR→.\mathbf r=\mathbf a+\overrightarrow{AR}.
    Parallel displacementUse a scalar multiple

    Because AR is parallel to the nonzero direction,

    AR→=λm.\overrightarrow{AR}=\lambda\mathbf m.

    Combining these statements gives the vector equation.

    The fixed vector a is not generally parallel to the line. It is AR, the displacement between two line points, that is parallel to m.

  3. Interpret the parameter and its range

    With a nonzero direction, each real parameter value gives one point, and every point on the unrestricted line has one parameter value for this representation.

    λ∈R\lambda\in\mathbb R

    Position and distanceKeep the sign for position

    Zero gives A; negative values move opposite to the chosen direction. The distance from A is

    d=∣λ∣ ∣m∣.d=|\lambda|\,|\mathbf m|.

    Only for a unit direction does ∣λ∣|\lambda| itself give that distance.

    Equivalent equationsThe same line can look different

    Choose another point on the line and any nonzero parallel direction. With a free real parameter, the equation still describes the same line, although parameter values change. Restrictions on the parameter must be considered separately.

    A restricted parameter range can describe only part of the line. Interpret a parameter as elapsed time only when the question explicitly defines that model and its units.

Try a worked example

Read a case, make a prediction, then reveal the reasoning. The examples keep their stated values.

The source exploration: points on both sides

Take p=OP→\mathbf p=\overrightarrow{OP} and m=PQ→\mathbf m=\overrightarrow{PQ}. The source places E at three times PQ from P, F halfway from P to Q, and G on the opposite side of P with PG twice PQ. Predict the parameter for each point before opening the reasoning.

Show reasoning
  1. 1. Reach Q and continue to E

    One copy of PQ reaches Q; three copies reach E on PQ produced.

    q=p+me=p+3m\begin{aligned}\mathbf q&=\mathbf p+\mathbf m\\\mathbf e&=\mathbf p+3\mathbf m\end{aligned}
  2. 2. Stop halfway at F

    The midpoint needs half the displacement from P to Q.

    f=p+12m\mathbf f=\mathbf p+\tfrac12\mathbf m
  3. 3. Reverse direction to G

    G is on the other side of P, so its displacement is a negative multiple. The parameters 1, 3, one-half and minus 2 all belong to the same unrestricted line.

    g=p−2m\mathbf g=\mathbf p-2\mathbf m
Continue with the lesson question

Two source points: one coordinate stays fixed

Use the source points A=(3,−4,7)A=(3,-4,7) and B=(5,−4,6)B=(5,-4,6). Predict which coordinate is constant and whether a zero direction component prevents a line.

Show reasoning
  1. 1. Subtract the position vectors

    AB is a nonzero direction even though its y component is zero.

    m=b−a=(2,0,−1)\begin{aligned}\mathbf m&=\mathbf b-\mathbf a\\&=(2,0,-1)\end{aligned}
  2. 2. Use A as the fixed point

    The parameter ranges over all real values. Zero gives A and one gives B.

    r=(3,−4,7)+λ(2,0,−1)\begin{aligned}\mathbf r&=(3,-4,7)\\&\quad+\lambda(2,0,-1)\end{aligned}
  3. 3. Read the fixed coordinate

    Keep the same parameter in all three coordinates. The constant coordinate is an equation, not a fraction with denominator zero; the linked question continues to Cartesian form.

    x=3+2λy=−4z=7−λ\begin{aligned}x&=3+2\lambda\\y&=-4\\z&=7-\lambda\end{aligned}
Continue with the lesson question

Same line, different parameter values

Authored comparison using the same source line: replace (2,0,−1)(2,0,-1) by (−4,0,2)(-4,0,2) and call the new parameter μ\mu. Both parameters range over all real values. Predict how the parameter for B changes.

Show reasoning
  1. 1. Recognise the nonzero scale factor

    The direction has been multiplied by minus 2. This reverses and rescales its displacement per parameter unit, while preserving the unrestricted line.

    r=(3,−4,7)+μ(−4,0,2)\begin{aligned}\mathbf r&=(3,-4,7)\\&\quad+\mu(-4,0,2)\end{aligned}
  2. 2. Match displacements

    The two equations reach the same point only when their parameters are related. The old value one for B becomes minus one-half.

    λ=−2μμB=−12\begin{aligned}\lambda&=-2\mu\\\mu_B&=-\tfrac12\end{aligned}
  3. 3. Separate the parameter from distance

    The original direction has length square-root 5. The distance from A to B is square-root 5 coordinate units, not the original parameter value one. A signed parameter is not automatically a distance or elapsed time.

    AB=22+02+(−1)2=5\begin{aligned}AB&=\sqrt{2^2+0^2+(-1)^2}\\&=\sqrt5\end{aligned}
Continue with the lesson question

Compare with the source vector construction

Expand diagram

Use the scrollbars or arrow keys to inspect details.

The source construction has origin O, a fixed point A on the line with OA=a, a general point R with OR=r and a nonzero direction m parallel to AR. The vector sum is r=a+AR=a+λm.
The source construction has origin O, a fixed point A on the line with OA=a, a general point R with OR=r and a nonzero direction m parallel to AR. The vector sum is r=a+AR=a+λm.
The source construction has origin O, a fixed point A on the line with OA=a, a general point R with OR=r and a nonzero direction m parallel to AR. The vector sum is r=a+AR=a+λm.
Open original diagram (new tab)

Method map: Two ways to find a foot on a line

Choose either method for the same foot F. A is a known point on the line, p is P's position vector, and m is a nonzero line direction. The foot must lie on the line and have a perpendicular displacement from P.

  • Put the foot on the line

    Use this route when a line parameter is convenient. Write a candidate foot on the line before imposing perpendicularity.

    r=a+λm\mathbf r=\mathbf a+\lambda\mathbf m

    a=OA→,m≠0\mathbf a=\overrightarrow{OA},\quad \mathbf m\ne\mathbf0

    Parameter routeSolve one scalar equation

    Put f=a+λm\mathbf f=\mathbf a+\lambda\mathbf m. Then

    (f−p)⋅m=0.(\mathbf f-\mathbf p)\cdot\mathbf m=0.

    Hence

    λ=(p−a)⋅mm⋅m.\lambda=\frac{(\mathbf p-\mathbf a)\cdot\mathbf m}{\mathbf m\cdot\mathbf m}.

    Substitute back into f=a+λm\mathbf f=\mathbf a+\lambda\mathbf m to find F.

    Check both line membership and perpendicularity. The parameter can be negative; its sign is not a distance.

  • Project from a known line point

    Use the vector projection of AP onto the line direction. Keep its sign when locating the foot.

    m^=m∣m∣\widehat{\mathbf m}=\dfrac{\mathbf m}{|\mathbf m|}

    AP→=p−a\overrightarrow{AP}=\mathbf p-\mathbf a

    Projection routeAdd the projection vector to OA

    First find

    AF→=(AP→⋅m^)m^.\overrightarrow{AF}=(\overrightarrow{AP}\cdot\widehat{\mathbf m})\widehat{\mathbf m}.

    Then f=a+AF→\mathbf f=\mathbf a+\overrightarrow{AF}. A negative component puts F opposite to the chosen direction from A. Taking an absolute value here would put F on the wrong side.

    Use a unit direction, or divide by m·m as in the parameter formula. If P is on the line, F=P and the distance is zero.

Try a worked example

Read a case, make a prediction, then reveal the reasoning. The examples keep their stated values.

The foot is behind the line point

For P=(1,1,−1)P=(1,1,-1) and r=(1,2,3)+λ(1,2,1)\mathbf r=(1,2,3)+\lambda(1,2,1), predict which side of A=(1,2,3)A=(1,2,3) contains the foot F. Compare the two methods on the same geometry.

Show reasoning
  1. 1. Put F on the line

    Use the same parameter in all three coordinates, then require the displacement from P to F to be perpendicular to the line direction.

    PF→=(λ,1+2λ,4+λ),0=λ+2(1+2λ)+(4+λ)=6λ+6,λ=−1,F=(0,0,2).\begin{aligned}\overrightarrow{PF}&=(\lambda,1+2\lambda,4+\lambda),\\0&=\lambda+2(1+2\lambda)\\&\quad+(4+\lambda)\\&=6\lambda+6,\\\lambda&=-1,\\F&=(0,0,2).\end{aligned}
  2. 2. Check by signed projection

    AP has dot product −6 with m, while m·m=6. Keep the negative sign: AF points opposite to m, so F is behind A. A schematic’s left-to-right order cannot override the coordinates.

    AP→=(0,−1,−4),AF→=−66(1,2,1),OF→=(1,2,3)−(1,2,1)=(0,0,2).\begin{aligned}\overrightarrow{AP}&=(0,-1,-4),\\\overrightarrow{AF}&=\frac{-6}{6}(1,2,1),\\\overrightarrow{OF}&=(1,2,3)-(1,2,1)\\&=(0,0,2).\end{aligned}
  3. 3. Verify both conditions

    F lies on the line at λ=−1 and PF has zero dot product with its nonzero direction. A negative parameter is allowed on an infinite line; it is not a negative distance.

    PF→⋅m=−1−2+3=0.\begin{aligned}\overrightarrow{PF}\cdot\mathbf m&=-1-2+3\\&=0.\end{aligned}
Continue with the lesson question

Illustration: P already lies on the line

Boundary-case illustration: keep r=(1,2,3)+λ(1,2,1)\mathbf r=(1,2,3)+\lambda(1,2,1) but choose P=(3,6,5)P=(3,6,5). Predict the foot and distance. Use this extra comparison to check the zero-distance boundary.

Show reasoning
  1. 1. Check membership

    At λ=2 the line already reaches P. Its foot is P itself.

    (1,2,3)+2(1,2,1)=(3,6,5).\begin{aligned}(1,2,3)&+2(1,2,1)\\&=(3,6,5).\end{aligned}
  2. 2. Accept the zero displacement

    The perpendicular-displacement equation still holds when PF=0. The point-to-line distance is zero; do not require a nonzero displacement to accept this boundary.

    F=P,PF→=0,h=0.\begin{aligned}F&=P,\\\overrightarrow{PF}&=\mathbf0,\\h&=0.\end{aligned}

Compare the geometric constructions

Expand diagram

Use the scrollbars or arrow keys to inspect details.

Two source constructions: F lies on l and PF is perpendicular to its direction m; alternatively AF is the vector projection of AP onto the line direction. A general schematic places A to the left of F.
Two source constructions: F lies on l and PF is perpendicular to its direction m; alternatively AF is the vector projection of AP onto the line direction. A general schematic places A to the left of F.
Two source constructions: F lies on l and PF is perpendicular to its direction m; alternatively AF is the vector projection of AP onto the line direction. A general schematic places A to the left of F.
Open original diagram (new tab)

Method map: Choose a point-to-line distance method

These are alternative routes to the same nonnegative perpendicular distance. Choose a known point A on the infinite line and a nonzero direction m. Reuse a foot or projection length when the question has already supplied it.

  • A verified foot is already available

    If F has already been found, reuse it. Confirm that F lies on the line and PF is perpendicular to its direction.

    f=OF→,p=OP→\mathbf f=\overrightarrow{OF},\quad \mathbf p=\overrightarrow{OP}

    Known footTake the displacement's magnitude

    h=∣f−p∣.h=|\mathbf f-\mathbf p|.

    A line parameter is not this length. When P lies on the line, F=P and h=0.

    Use the companion foot method if F has not been established. A point merely lying on the line is not necessarily the perpendicular foot.

  • A direction and line point are available

    Find AP and normalise the line direction. This route gives the height directly without first finding F.

    m^=m∣m∣,m≠0\widehat{\mathbf m}=\dfrac{\mathbf m}{|\mathbf m|},\quad\mathbf m\ne\mathbf0

    Cross productUse area divided by base
    h=∣AP→×m^∣=∣AP→×m∣∣m∣.\begin{aligned} h&=|\overrightarrow{AP}\times\widehat{\mathbf m}|\\ &=\frac{|\overrightarrow{AP}\times\mathbf m|}{|\mathbf m|}. \end{aligned}

    An unnormalised cross product gives an area, not the perpendicular distance.

    Reversing or rescaling a nonzero direction leaves the distance unchanged after normalisation.

  • A projection length is available

    Resolve AP along the line, then use Pythagoras for the perpendicular component. A signed component and a length are different quantities.

    s=AP→⋅m^s=\overrightarrow{AP}\cdot\widehat{\mathbf m}

    d=∣s∣d=|s|

    Projection and PythagorasSubtract squared lengths

    h=∣AP→∣2−d2.h=\sqrt{|\overrightarrow{AP}|^2-d^2}.

    The signed component s can be negative; d and h are nonnegative. Keep exact values until the final calculation.

    All three routes give distance to the infinite line. A foot outside a specified segment or ray requires a separate restriction check.

Try a worked example

Read a case, make a prediction, then reveal the reasoning. The examples keep their stated values.

Reuse a foot already found

The existing foot calculation gives F=(0,0,2)F=(0,0,2) for P=(1,1,−1)P=(1,1,-1). How can you deduce the shortest distance without another projection?

Show reasoning
  1. 1. Take the perpendicular displacement's magnitude

    The foot has already been verified. The requested distance is a nonnegative length, not the line parameter −1.

    PF→=(−1,−1,3),h=1+1+9=11.\begin{aligned}\overrightarrow{PF}&=(-1,-1,3),\\h&=\sqrt{1+1+9}\\&=\sqrt{11}.\end{aligned}
Continue with the lesson question

Use the cross product with the right scale

Use A=(1,2,3)A=(1,2,3), B=(2,4,4)B=(2,4,4) and P=(1,1,−1)P=(1,1,-1). Predict why ∣AP→×AB→∣|\overrightarrow{AP}\times\overrightarrow{AB}| alone is not the distance to the line AB.

Show reasoning
  1. 1. Find the displacements

    AB is a nonzero direction, but its length is √6 rather than 1.

    AB→=(1,2,1),AP→=(0,−1,−4),∣AB→∣=6.\begin{aligned}\overrightarrow{AB}&=(1,2,1),\\\overrightarrow{AP}&=(0,-1,-4),\\|\overrightarrow{AB}|&=\sqrt6.\end{aligned}
  2. 2. Expand the cross product

    Compute all three signed cross-product components before taking the magnitude. The middle component is negative.

    AP→×AB→=(7,−4,1),∣(7,−4,1)∣=66.\begin{gathered}\overrightarrow{AP}\times\overrightarrow{AB}\\=(7,-4,1),\\|(7,-4,1)|=\sqrt{66}.\end{gathered}
  3. 3. Divide by the direction's length

    The cross product’s magnitude is the parallelogram area. Dividing by the base length gives its perpendicular height.

    h=666=11.h=\frac{\sqrt{66}}{\sqrt6}=\sqrt{11}.
Continue with the lesson question

A negative component gives a positive length

For the same A=(1,2,3)A=(1,2,3), B=(2,4,4)B=(2,4,4) and P=(1,1,−1)P=(1,1,-1), compare signed projection with projection length. Must the perpendicular foot lie between A and B?

Show reasoning
  1. 1. Keep direction and length distinct

    The component is negative, so AF points opposite to AB. Its magnitude gives the projection length.

    s=(0,−1,−4)⋅(1,2,1)6=−6,d=∣s∣=6.\begin{aligned}s&=\frac{(0,-1,-4)\cdot(1,2,1)}{\sqrt6}\\&=-\sqrt6,\\d&=|s|=\sqrt6.\end{aligned}
  2. 2. Use the right triangle

    AP²=17 and d²=6. The remaining perpendicular length agrees with the cross-product result.

    h=17−6=11.h=\sqrt{17-6}=\sqrt{11}.
  3. 3. Check which object the question names

    F=(0,0,2) lies before A along AB, giving the order F,A,B. The source sketch is schematic. Distance to the infinite line permits this foot; distance to a segment would also need its endpoint constraints checked.

Continue with the lesson question

Compare the three geometric routes

Expand diagram

Use the scrollbars or arrow keys to inspect details.

Three source diagrams show a perpendicular height h: cross product of AP with a unit line direction, magnitude PF when the foot is known, or projection length d followed by Pythagoras. All unit directions are explicitly normalised.
Three source diagrams show a perpendicular height h: cross product of AP with a unit line direction, magnitude PF when the foot is known, or projection length d followed by Pythagoras. All unit directions are explicitly normalised.
Three source diagrams show a perpendicular height h: cross product of AP with a unit line direction, magnitude PF when the foot is known, or projection length d followed by Pythagoras. All unit directions are explicitly normalised.
Open original diagram (new tab)

Method map: Two checks to classify the lines

Compare nonzero direction vectors first. Parallel directions need a coincidence check; nonparallel directions need all three coordinate equations.

  1. Compare directions

    Start with two nonzero direction vectors. Are they scalar multiples?

    m1=km2(k≠0)\mathbf m_1=k\mathbf m_2\quad (k\ne0)

    Yes · parallel directionsCheck for coincidence

    Test whether a point on one line also lies on the other. A shared point means coincident lines; otherwise they are distinct parallel lines. If the lines are given as distinct, coincidence is excluded.

    No · nonparallel directionsContinue to the coordinate test

    Use independent parameters λ and μ for the two lines. Their directions alone cannot distinguish intersecting from skew lines.

  2. Check every coordinate

    For nonparallel directions, does the same pair (λ, μ) satisfy all three component equations?

    a1+λm1=a2+μm2\mathbf a_1+\lambda\mathbf m_1=\mathbf a_2+\mu\mathbf m_2

    Yes · consistent systemIntersecting lines

    The solution (λ0,μ0)(\lambda_0,\mu_0) gives the common point:

    p=a1+λ0m1\mathbf p=\mathbf a_1+\lambda_0\mathbf m_1

    p=a2+μ0m2\mathbf p=\mathbf a_2+\mu_0\mathbf m_2

    No · inconsistent systemSkew lines

    No point lies on both lines.

    Solve the complete system with G.C. PlySmlt2, or solve two independent equations and check the unused third equation. An arbitrary pair may be dependent.

Try a worked example

Read a case, make a prediction, then reveal the reasoning. The examples keep their stated values.

Case A · Parallel directions

Compare l1:r=(1,2,3)+λ(1,2,1)l_1:\mathbf r=(1,2,3)+\lambda(1,2,1) and l2:r=(1,3,4)+μ(2,4,2)l_2:\mathbf r=(1,3,4)+\mu(2,4,2). Are they distinct parallel lines or the same line?

Show reasoning
  1. 1. Compare nonzero directions

    (2,4,2)=2(1,2,1)(2,4,2)=2(1,2,1), so the directions are parallel. This alone does not rule out coincidence.

  2. 2. Test the base-point displacement

    The displacement (0,1,1) cannot be a scalar multiple of (1,2,1): its first coordinate would force the scalar to zero, contradicting its other coordinates. The lines are distinct parallel lines.

    (1,3,4)−(1,2,3)=(0,1,1)(1,3,4)-(1,2,3)=(0,1,1)
Continue with the lesson question

Case B · Nonparallel directions

Compare l1:r=(1,2,3)+λ(1,2,1)l_1:\mathbf r=(1,2,3)+\lambda(1,2,1) with l2:r=(0,1,5)+μ(1,3,4)l_2:\mathbf r=(0,1,5)+\mu(1,3,4). Predict intersecting or skew. Why must the parameters remain independent?

Show reasoning
  1. 1. Rule out parallel directions

    The two direction vectors are not scalar multiples. Use separate parameters λ and μ, since the same point need not have the same parameter on both lines.

  2. 2. Solve two independent coordinates

    Equate x and z. Their equations give μ=−1 and λ=−2.

    λ−μ=−1,λ−4μ=2\lambda-\mu=-1,\qquad\lambda-4\mu=2
  3. 3. Check the unused coordinate

    The y equation is also satisfied. Both lines give the point (−1,−2,1), so they intersect.

    2(−2)−3(−1)=−12(-2)-3(-1)=-1
Continue with the lesson question

Case C · Check the unused coordinate

Compare l1:r=(1,2,3)+λ(1,2,1)l_1:\mathbf r=(1,2,3)+\lambda(1,2,1) with l2:r=(0,1,2)+μ(1,3,4)l_2:\mathbf r=(0,1,2)+\mu(1,3,4). Its direction is unchanged from Case B. Can the relationship change?

Show reasoning
  1. 1. The directions are still nonparallel

    Directions alone cannot distinguish intersection from skew.

  2. 2. Use x and z to get a candidate

    These two independent equations give μ=0 and λ=−1.

    λ−μ=−1,λ−4μ=−1\lambda-\mu=-1,\qquad\lambda-4\mu=-1
  3. 3. Reject the candidate with y

    The y equation fails. No common point exists and parallel directions were already excluded, so the lines are skew.

    2(−1)−3(0)=−2≠−12(-1)-3(0)=-2\ne-1
Continue with the lesson question

Case D · Different equations, same line?

Extra illustration: compare l1:r=(1,2,3)+λ(1,2,1)l_1:\mathbf r=(1,2,3)+\lambda(1,2,1) with l2:r=(2,4,4)+μ(2,4,2)l_2:\mathbf r=(2,4,4)+\mu(2,4,2). The base point and direction both look different. Are the lines distinct?

Show reasoning
  1. 1. Check the base point

    The second base point lies on the first line at λ=1.

    (2,4,4)=(1,2,3)+(1,2,1)(2,4,4)=(1,2,3)+(1,2,1)
  2. 2. Compare complete parametrizations

    As μ runs through all real values, λ=1+2μ also runs through all real values. The lines are coincident, not distinct parallel lines.

    (2,4,4)+μ(2,4,2)=(1,2,3)+(1+2μ)(1,2,1)(2,4,4)+\mu(2,4,2)=(1,2,3)+(1+2\mu)(1,2,1)
Source two-line direction sketches and decision tree. Test parallel directions first. If nonparallel, solve three coordinate equations in two independent parameters using the calculator or two independent equations plus a third-coordinate check. A consistent solution gives an intersection; inconsistency gives skew lines. Coincident lines are separately qualified.
Open original diagram (new tab)

Method map: Choose the angle between two lines

Read which angle is asked for before using a dot product. Reversing a direction changes the directed-vector angle but preserves the smaller angle between the lines.

  1. Extract two nonzero directions

    Use the vectors multiplying the independent line parameters. The fixed position vectors locate the lines; they do not determine the angle.

    m1≠0\mathbf m_1\ne\mathbf0

    m2≠0\mathbf m_2\ne\mathbf0

    Intersecting or skewAn intersection is unnecessary

    Translate the direction vectors to a common starting point to compare them. Skew lines still have an angle between their directions; a nonzero angle alone does not prove the lines intersect.

    A zero direction does not define a line. A zero component is allowed. Keep separate parameters for the two line equations.

  2. Choose the requested angle

    For the smaller line angle, take the absolute value of the dot product. For an angle between specified directed vectors, retain its sign.

    c=m1⋅m2∣m1∣∣m2∣c=\dfrac{\mathbf m_1\cdot\mathbf m_2}{|\mathbf m_1||\mathbf m_2|}

    Smaller line angleRemove direction reversal
    α=cos⁡−1∣c∣.\alpha=\cos^{-1}|c|.

    This gives 0≤α≤π/20\le\alpha\le\pi/2. The source calls this the acute angle; the parallel and perpendicular boundaries are 00 and π/2\pi/2.

    Specified vector angleKeep the signed dot product
    θ=cos⁡−1c.\theta=\cos^{-1}c.

    This gives 0≤θ≤π0\le\theta\le\pi. For an internal angle ABC, use BA and BC, both directed from the vertex B. An absolute value could replace the required obtuse angle by its supplement.

    Inverse cosine is not a reciprocal. Set the calculator to the requested degree or radian mode, and retain full precision until the final answer.

  3. Check the angle and the geometry

    The same supporting lines can be represented using reversed or rescaled directions. Their smaller angle must stay unchanged. In radians use π − θ for the supplement; in degrees use 180° − θ.

    α=min⁡(θ,π−θ)\alpha=\min(\theta,\pi-\theta)

    Reversed directionThe vector angle may change

    Reversing one direction replaces cc by −c-c and θ\theta by π−θ\pi-\theta. The value ∣c∣|c|, and therefore the smaller line angle, stays the same.

    Boundary casesSeparate angle from line relationship

    A zero dot product gives a right angle between directions. Parallel directions give a zero smaller angle; the lines may be distinct or coincident. Check positions separately when classifying the lines.

    Use the smaller-angle rule only when that convention is requested. Do not force an internal polygon angle or a specified vector angle to be acute.

Try a worked example

Read a case, make a prediction, then reveal the reasoning. The examples keep their stated values.

Source Example 26: use the directions

The source directions are (1,2,1)(1,2,1) and (3,2,6)(3,2,6). Predict whether their directed-vector angle is already acute before calculating.

Show reasoning
  1. 1. Find the dot product and lengths

    The fixed line points do not enter the angle calculation. The positive dot product predicts an acute directed-vector angle.

    m1⋅m2=13∣m1∣=6∣m2∣=7\begin{aligned}\mathbf m_1\cdot\mathbf m_2&=13\\|\mathbf m_1|&=\sqrt6\\|\mathbf m_2|&=7\end{aligned}
  2. 2. Calculate the smaller angle

    The direction angle is already acute, so its supplement is unnecessary. Round only the final answer to one decimal place.

    α=cos⁡−1 ⁣(1376)=40.7∘(1 d.p.)\begin{aligned}\alpha&=\cos^{-1}\!\left(\frac{13}{7\sqrt6}\right)\\&=40.7^\circ\quad\text{(1 d.p.)}\end{aligned}
Continue with the lesson question

Reverse a direction, preserve the line angle

Authored comparison using Example 26: replace the second direction by (−3,−2,−6)(-3,-2,-6). Predict what changes and what stays the same. Both lines still use unrestricted real parameters.

Show reasoning
  1. 1. Keep the sign for the vector angle

    The dot product becomes minus 13. The directed-vector angle is now obtuse, although the supporting line is unchanged.

    cos⁡θ=−1376θ≈139.3∘\begin{aligned}\cos\theta&=-\frac{13}{7\sqrt6}\\\theta&\approx139.3^\circ\end{aligned}
  2. 2. Take the supplement for the line angle

    Use the unrounded angle in a calculation, or take the absolute dot product directly. Reversing or nonzero rescaling cannot change the smaller angle between these lines.

    α=180∘−θ=40.7∘(1 d.p.)\begin{aligned}\alpha&=180^\circ-\theta\\&=40.7^\circ\quad\text{(1 d.p.)}\end{aligned}
Continue with the lesson question

Source Example 27: an internal angle can be obtuse

The source asks for the internal angle OAB. Both AO→=(−3,−11,−11)\overrightarrow{AO}=(-3,-11,-11) and AB→=(2,−1,10)\overrightarrow{AB}=(2,-1,10) start at A. Predict why an absolute dot product would answer a different question.

Show reasoning
  1. 1. Use both vectors from the vertex

    The signed dot product is minus 105. Their lengths are square-root 251 and square-root 105, so the internal angle is obtuse.

    cos⁡∠OAB=−105251105\cos\angle OAB=\frac{-105}{\sqrt{251}\sqrt{105}}
  2. 2. Retain the obtuse answer

    The source rounds the internal angle to the nearest degree. Taking an absolute value would instead give about 50 degrees, the smaller angle between the supporting lines.

    ∠OAB=130∘(nearest degree)\begin{aligned}\angle OAB&=130^\circ\\&\text{(nearest degree)}\end{aligned}
Continue with the lesson question

Compare the source angle constructions

Expand diagram

Use the scrollbars or arrow keys to inspect details.

Two source constructions: when direction vectors form an acute angle theta, the line angle alpha equals theta; reversing one direction makes theta obtuse, so alpha=pi−theta. Taking the absolute dot product gives the smaller angle directly, even for skew lines. Parallel and perpendicular boundary cases give zero and 90 degrees.
Two source constructions: when direction vectors form an acute angle theta, the line angle alpha equals theta; reversing one direction makes theta obtuse, so alpha=pi−theta. Taking the absolute dot product gives the smaller angle directly, even for skew lines. Parallel and perpendicular boundary cases give zero and 90 degrees.
Two source constructions: when direction vectors form an acute angle theta, the line angle alpha equals theta; reversing one direction makes theta obtuse, so alpha=pi−theta. Taking the absolute dot product gives the smaller angle directly, even for skew lines. Parallel and perpendicular boundary cases give zero and 90 degrees.
Open original diagram (new tab)

Explore

Compare r=(1,2,0)+t(2,−1,2)\mathbf r=(1,2,0)+t(2,-1,2) with r=(1,2,0)+s(−4,2,−4)\mathbf r=(1,2,0)+s(-4,2,-4). Predict whether the geometric line changes, then match the points at t=0,1,2t=0,1,2 using values of ss. Compare the distances from the base point with the parameter magnitudes. Finally suppose each parameter is elapsed seconds from a common start: explain how the motions differ even though the supporting line is the same.

Related interactive example

Explore this related example, then return to the prediction task above.

Two lines that never meet

Switch parts of the scene on one at a time and read how each is found. Drag to turn the picture.

Open the interactive view to explore this geometry in 3D.

Open the full interactive problem →

Worked example

For l:r=(1,0,0)+t(1,1,0)l:\mathbf r=(1,0,0)+t(1,1,0) and P=(3,0,2)P=(3,0,2), write F=(1+t,t,0)F=(1+t,t,0). Requiring FP→⋅(1,1,0)=0\overrightarrow{FP}\cdot(1,1,0)=0 gives 2−2t=02-2t=0, so F=(2,1,0)F=(2,1,0). The distance is ∣(1,−1,2)∣=6|(1,-1,2)|=\sqrt6. Reflection in the line gives Q=2F−P=(1,2,−2)Q=2F-P=(1,2,-2). Substitution into the line and the zero dot product verify the foot; the midpoint of P and Q verifies the reflection.

A parameter labels points unless the model defines time. For a foot, check both line membership and perpendicularity; for a reflection, check the midpoint too.

Check your understanding

A light ray starts at (1,1,3)(1,1,3) and travels in direction (1,−1,−1)(1,-1,-1) towards the plane z=0z=0. Find its landing point and the distance travelled. Explain how you check that the supporting-line intersection belongs to the forward ray. If the direction is reversed, can that forward ray reach the plane?

Mastery learning objectives

At the end of this chapter, I should be able to:

Formulate a vector equation of a line

Use a point and direction vector, or two points on the line.

Convert between line equations

Convert a vector equation to a Cartesian equation, and vice versa.

Investigate a point and a line

Determine whether a given point lies on a given line.

Find a perpendicular foot

Find its position vector from a point to a line.

Find the shortest distance

Find the perpendicular distance from a point to a line.

Reflect a point in a line

Find the position vector of the reflected point.

Describe two distinct lines in space

Determine whether they are parallel, intersecting or skew.

Find an intersection

Find the position vector of the intersection of two lines.

Find an angle between lines

Use their nonzero directions and identify the requested angle.

Choose a practice question

Use a lecture example to review a method, then attempt its linked Discussion and Review questions before opening the working. Part references below follow the printed skill table.

SkillLecture examplesDiscussionReview follow-up
Line equations: vector, Cartesian and parametricExample 20, Example 21, 27(iii)1, 2, 7(i)–(iii), 8(a)3(i), 4(i), 7(i), (iv)
Whether a point lies on a lineExample 22, 27(iv)3(i)5(i), 9(i)
Foot of a perpendicular23(i), 27(v)4, 7(ii), first part, 10(iii)4(iii), 5(iii), 7(iii)
Perpendicular distance from a point to a line23(ii), Example 243(ii), 4 hence, first part—
Relationship between two linesExample 255, 6 explain, 9(i), 10(i)1 first part, 2(i), 10 second part
Angle between two linesExample 26, 27(ii), internal angle51 second part, 7(ii), 9(iv)
Basic vectors: magnitude——3(iii)
Basic vectors: equal vectors27(i)——
Basic vectors: ratio theorem23(iii)4 hence, second part, 7(ii), second part4(iv), 8(b)(i), 10 first part
Basic vectors: parallel or collinear—9(ii)—
Basic vectors: dot product—10(ii)6(i), 8(a), (b)(iii), 9(ii)
Basic vectors: cross product—8(b)—
Basic vectors: length of projection—6 find2(ii), 3(ii), 4(ii), 5(ii), 6(ii)
Basic vectors: triangle or parallelogram area—9(iii)3 last part, 5(iv), 6(iii), 8(b)(ii), 9(iii)

Read the angle reference carefully. The printed table includes Example 27(ii) under angles between lines, but that ask is the internal angle OAB (130°), not the acute angle between the supporting lines. Its method uses the signed dot product. Example 26 and the linked acute-angle questions use the smaller line angle.

Review 4 answer-list slip. The closing lecture answer list prints (−1,4,2)(-1,4,2) under 4(iv). Those are the foot N’s coordinates from 4(iii). The reflection asked in 4(iv) is OD→=2ON→−OC→=(3,−1,−1)\overrightarrow{OD}=2\overrightarrow{ON}-\overrightarrow{OC}=(3,-1,-1), as shown in the linked working. Keep N and D distinct.

Discussion 8 carries the printed reference [2017&2020/I/(modified)]. Its geometric interpretation must include the zero-direction cases. In Review 9, the closing answer list labels both the area and the final angle “(iii)”; the final angle belongs to ask (iv). Review 11’s printed “No” collision answer assumes the drone parameter is time; the linked solution explains the missing speed/time assumption.

Practice questions

Practice section 1 · Questions 1–6

Build a line by extending and splitting a displacement · Convert a line through two points without dividing by zero · +4 more

Practice section 2 · Questions 7–12

Find point-to-line distance with cross product and projection · Classify eight pairs of lines in a cuboid · +4 more

Practice section 3 · Questions 13–18

Write vector and Cartesian equations without dividing by zero · Recover a point and direction from Cartesian relations · +4 more

Practice section 4 · Questions 19–24

Locate a perpendicular foot and reflect a whole line · Interpret parametric lines and zero cross products · +4 more

Practice section 5 · Questions 25–30

Use a diagonal direction for a line and a parallelogram area · Find a perpendicular foot and reflect a point in a line · +4 more

Practice section 6 · Questions 31–33

Prove a rhombus using a perpendicular projection · Intersect extended lines by comparing independent coefficients · +1 more

More practice

Check every coordinate, state the parameter domain and interpret the result in the model. A supporting line, forward ray and time-dependent path can impose different conditions.

Ready to try this on your own?

For “Vectors: lines and perpendicular feet”, try a question without the working and explain your method. This records your confidence, saved in this browser only.

Ready to practise?Chapter practice