Skip to main content

Vectors — Diagnostic Tests

Unit Tests

Tests edge cases, boundary conditions, and common misconceptions for vectors.

UT-1: Skew Lines — Classification and Shortest Distance

Question:

Two lines are given by:

L1:{r}=(120)+λ(211)L_1: \mathbf{'\{'}r{'\}'} = \begin{pmatrix} 1 \\ 2 \\ 0 \end{pmatrix} + \lambda \begin{pmatrix} 2 \\ 1 \\ -1 \end{pmatrix}

L2:{r}=(314)+μ(112)L_2: \mathbf{'\{'}r{'\}'} = \begin{pmatrix} 3 \\ 1 \\ 4 \end{pmatrix} + \mu \begin{pmatrix} 1 \\ -1 \\ 2 \end{pmatrix}

(a) Determine whether L1L_1 and L2L_2 are parallel, intersecting, or skew.

(b) If skew, find the shortest distance between them.

(c) A student claims: "Since the direction vectors are not scalar multiples, the lines must intersect." Explain why this reasoning is wrong.

[Difficulty: hard. Tests classification of lines in 3D and computation of shortest distance between skew lines.]

Solution:

(a) The direction vectors are {d}1=(211)\mathbf{'\{'}d{'\}'}_1 = \begin{pmatrix} 2 \\ 1 \\ -1 \end{pmatrix} and {d}2=(112)\mathbf{'\{'}d{'\}'}_2 = \begin{pmatrix} 1 \\ -1 \\ 2 \end{pmatrix}.

These are not scalar multiples, so the lines are not parallel.

To check for intersection, set the position vectors equal:

1+2λ=3+μ    2λμ=2(i)1 + 2\lambda = 3 + \mu \implies 2\lambda - \mu = 2 \quad \text{(i)}

2+λ=1μ    λ+μ=1(ii)2 + \lambda = 1 - \mu \implies \lambda + \mu = -1 \quad \text{(ii)}

0λ=4+2μ    λ2μ=4(iii)0 - \lambda = 4 + 2\mu \implies -\lambda - 2\mu = 4 \quad \text{(iii)}

From (i) and (ii): adding gives 3λ=13\lambda = 1, so λ=13\lambda = \frac{1}{3}, then μ=43\mu = -\frac{4}{3}.

Check (iii): 132 ⁣(43)=13+83=734-\frac{1}{3} - 2\!\left(-\frac{4}{3}\right) = -\frac{1}{3} + \frac{8}{3} = \frac{7}{3} \neq 4.

The system is inconsistent, so the lines do not intersect. They are skew.

(b) The shortest distance between skew lines is:

d=({a}2{a}1)({d}1×{d}2){d}1×{d}2d = \frac{\left|(\mathbf{'\{'}a{'\}'}_2 - \mathbf{'\{'}a{'\}'}_1) \cdot (\mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2)\right|}{\lvert \mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2 \rvert}

{a}2{a}1=(314)(120)=(214)\mathbf{'\{'}a{'\}'}_2 - \mathbf{'\{'}a{'\}'}_1 = \begin{pmatrix} 3 \\ 1 \\ 4 \end{pmatrix} - \begin{pmatrix} 1 \\ 2 \\ 0 \end{pmatrix} = \begin{pmatrix} 2 \\ -1 \\ 4 \end{pmatrix}

{d}1×{d}2={i}{j}{k}211112=(153)\mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2 = \begin{vmatrix} \mathbf{'\{'}i{'\}'} & \mathbf{'\{'}j{'\}'} & \mathbf{'\{'}k{'\}'} \\ 2 & 1 & -1 \\ 1 & -1 & 2 \end{vmatrix} = \begin{pmatrix} 1 \\ -5 \\ -3 \end{pmatrix}

{d}1×{d}2=1+25+9=35\lvert \mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2 \rvert = \sqrt{1 + 25 + 9} = \sqrt{35}

({a}2{a}1)({d}1×{d}2)=2(1)+(1)(5)+4(3)=2+512=5(\mathbf{'\{'}a{'\}'}_2 - \mathbf{'\{'}a{'\}'}_1) \cdot (\mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2) = 2(1) + (-1)(-5) + 4(-3) = 2 + 5 - 12 = -5

d=535=53535=357d = \frac{5}{\sqrt{35}} = \frac{5\sqrt{35}}{35} = \frac{\sqrt{35}}{7}

(c) The student's error is that in three dimensions, two lines that are not parallel can still fail to intersect. In 2D, non-parallel lines always intersect, but in 3D they can be skew — they pass at different "heights" and never meet. The student has incorrectly generalised the 2D result.


UT-2: Point-to-Plane Distance from Three Points

Question:

Three points are given: A(1,0,2)A(1, 0, 2), B(3,1,1)B(3, 1, -1), and C(2,2,3)C(2, 2, 3).

(a) Find the Cartesian equation of the plane Π\Pi passing through AA, BB, and CC.

(b) Find the perpendicular distance from the origin to Π\Pi.

(c) A student computes AB×AC\overrightarrow{AB} \times \overrightarrow{AC} and gets (333)\begin{pmatrix} 3 \\ 3 \\ 3 \end{pmatrix}, concluding the plane equation is x+y+z=3x + y + z = 3. Identify the error.

[Difficulty: hard. Tests plane from three points, normal vector computation, and point-to-plane distance.]

Solution:

(a)

AB=(213),AC=(121)\overrightarrow{AB} = \begin{pmatrix} 2 \\ 1 \\ -3 \end{pmatrix}, \quad \overrightarrow{AC} = \begin{pmatrix} 1 \\ 2 \\ 1 \end{pmatrix}

{n}=AB×AC={i}{j}{k}213121\mathbf{'\{'}n{'\}'} = \overrightarrow{AB} \times \overrightarrow{AC} = \begin{vmatrix} \mathbf{'\{'}i{'\}'} & \mathbf{'\{'}j{'\}'} & \mathbf{'\{'}k{'\}'} \\ 2 & 1 & -3 \\ 1 & 2 & 1 \end{vmatrix}

={i}(1+6){j}(2+3)+{k}(41)=(753)= \mathbf{'\{'}i{'\}'}(1 + 6) - \mathbf{'\{'}j{'\}'}(2 + 3) + \mathbf{'\{'}k{'\}'}(4 - 1) = \begin{pmatrix} 7 \\ -5 \\ 3 \end{pmatrix}

Using point A(1,0,2)A(1, 0, 2):

7(x1)5(y0)+3(z2)=07(x - 1) - 5(y - 0) + 3(z - 2) = 0

7x75y+3z6=07x - 7 - 5y + 3z - 6 = 0

7x5y+3z=137x - 5y + 3z = 13

(b) The distance from the origin (0,0,0)(0, 0, 0) to the plane 7x5y+3z=137x - 5y + 3z = 13 is:

d=7(0)5(0)+3(0)1349+25+9=1383d = \frac{|7(0) - 5(0) + 3(0) - 13|}{\sqrt{49 + 25 + 9}} = \frac{13}{\sqrt{83}}

(c) The student's cross product computation is wrong. The correct cross product is (753)\begin{pmatrix} 7 \\ -5 \\ 3 \end{pmatrix}, not (333)\begin{pmatrix} 3 \\ 3 \\ 3 \end{pmatrix}. Specifically:

  • The xx-component: 1×1(3)×2=1+6=71 \times 1 - (-3) \times 2 = 1 + 6 = 7, not 33.
  • The yy-component: (2×1(3)×1)=(2+3)=5-(2 \times 1 - (-3) \times 1) = -(2 + 3) = -5, not 33.
  • The zz-component: 2×21×1=41=32 \times 2 - 1 \times 1 = 4 - 1 = 3, which coincidentally matches.

Integration Tests

Tests synthesis of vectors with other topics.

IT-1: Volume of a Tetrahedron — Scalar Triple Product

Question:

Four points are given: O(0,0,0)O(0, 0, 0), A(2,1,0)A(2, 1, 0), B(1,3,2)B(1, 3, 2), and C(0,1,4)C(0, 1, 4).

(a) Find the volume of tetrahedron OABCOABC.

(b) Show that the four points are coplanar if and only if the scalar triple product [OA,OB,OC]=0[\overrightarrow{OA}, \overrightarrow{OB}, \overrightarrow{OC}] = 0.

[Difficulty: hard. Combines scalar triple product with geometric interpretation.]

Solution:

(a) The volume of a tetrahedron with vertices OO, AA, BB, CC is:

V=16[OA,OB,OC]V = \frac{1}{6}\lvert [\overrightarrow{OA}, \overrightarrow{OB}, \overrightarrow{OC}] \rvert

OA=(210),OB=(132),OC=(014)\overrightarrow{OA} = \begin{pmatrix} 2 \\ 1 \\ 0 \end{pmatrix}, \quad \overrightarrow{OB} = \begin{pmatrix} 1 \\ 3 \\ 2 \end{pmatrix}, \quad \overrightarrow{OC} = \begin{pmatrix} 0 \\ 1 \\ 4 \end{pmatrix}

[OA,OB,OC]=OA(OB×OC)[\overrightarrow{OA}, \overrightarrow{OB}, \overrightarrow{OC}] = \overrightarrow{OA} \cdot (\overrightarrow{OB} \times \overrightarrow{OC})

OB×OC={i}{j}{k}132014=(1041)\overrightarrow{OB} \times \overrightarrow{OC} = \begin{vmatrix} \mathbf{'\{'}i{'\}'} & \mathbf{'\{'}j{'\}'} & \mathbf{'\{'}k{'\}'} \\ 1 & 3 & 2 \\ 0 & 1 & 4 \end{vmatrix} = \begin{pmatrix} 10 \\ -4 \\ 1 \end{pmatrix}

[OA,OB,OC]=2(10)+1(4)+0(1)=204=16[\overrightarrow{OA}, \overrightarrow{OB}, \overrightarrow{OC}] = 2(10) + 1(-4) + 0(1) = 20 - 4 = 16

V=166=83V = \frac{16}{6} = \frac{8}{3}

(b) The scalar triple product [{a},{b},{c}]={a}({b}×{c})[\mathbf{'\{'}a{'\}'}, \mathbf{'\{'}b{'\}'}, \mathbf{'\{'}c{'\}'}] = \mathbf{'\{'}a{'\}'} \cdot (\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'}) equals the volume of the parallelepiped spanned by {a}\mathbf{'\{'}a{'\}'}, {b}\mathbf{'\{'}b{'\}'}, and {c}\mathbf{'\{'}c{'\}'}.

If the four points are coplanar, the three vectors OA\overrightarrow{OA}, OB\overrightarrow{OB}, OC\overrightarrow{OC} all lie in the same plane, meaning the parallelepiped they span has zero volume (it is flat). Therefore [OA,OB,OC]=0[\overrightarrow{OA}, \overrightarrow{OB}, \overrightarrow{OC}] = 0.

Conversely, if the scalar triple product is zero, then {a}({b}×{c})=0\mathbf{'\{'}a{'\}'} \cdot (\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'}) = 0, which means {a}\mathbf{'\{'}a{'\}'} is perpendicular to {b}×{c}\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'}. Since {b}×{c}\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'} is perpendicular to the plane containing {b}\mathbf{'\{'}b{'\}'} and {c}\mathbf{'\{'}c{'\}'}, it follows that {a}\mathbf{'\{'}a{'\}'} lies in the same plane as {b}\mathbf{'\{'}b{'\}'} and {c}\mathbf{'\{'}c{'\}'}. Hence the four points are coplanar.


IT-2: Reflection of a Point in a Plane

Question:

The plane Π\Pi has equation 2xy+2z=52x - y + 2z = 5. The point PP has coordinates (1,3,1)(1, 3, -1).

(a) Find the coordinates of the reflection PP' of PP in the plane Π\Pi.

(b) Find the equation of the line PPPP' and verify that the midpoint of PPPP' lies on Π\Pi.

[Difficulty: hard. Combines line-plane intersection with vector geometry.]

Solution:

(a) The normal to Π\Pi is {n}=(212)\mathbf{'\{'}n{'\}'} = \begin{pmatrix} 2 \\ -1 \\ 2 \end{pmatrix}.

The line through PP perpendicular to Π\Pi is:

{r}=(131)+t(212)\mathbf{'\{'}r{'\}'} = \begin{pmatrix} 1 \\ 3 \\ -1 \end{pmatrix} + t\begin{pmatrix} 2 \\ -1 \\ 2 \end{pmatrix}

Find the foot of the perpendicular (intersection with Π\Pi):

2(1+2t)(3t)+2(1+2t)=52(1 + 2t) - (3 - t) + 2(-1 + 2t) = 5

2+4t3+t2+4t=52 + 4t - 3 + t - 2 + 4t = 5

9t3=5    9t=8    t=899t - 3 = 5 \implies 9t = 8 \implies t = \frac{8}{9}

Foot of perpendicular:

M=(1+1693891+169)=(25919979)M = \begin{pmatrix} 1 + \frac{16}{9} \\ 3 - \frac{8}{9} \\ -1 + \frac{16}{9} \end{pmatrix} = \begin{pmatrix} \frac{25}{9} \\ \frac{19}{9} \\ \frac{7}{9} \end{pmatrix}

The reflection PP' is such that MM is the midpoint of PPPP':

M=P+P2    P=2MP=2(25919979)(131)=(419119239)M = \frac{P + P'}{2} \implies P' = 2M - P = 2\begin{pmatrix} \frac{25}{9} \\ \frac{19}{9} \\ \frac{7}{9} \end{pmatrix} - \begin{pmatrix} 1 \\ 3 \\ -1 \end{pmatrix} = \begin{pmatrix} \frac{41}{9} \\ \frac{11}{9} \\ \frac{23}{9} \end{pmatrix}

(b) The line PPPP' passes through P(1,3,1)P(1, 3, -1) and P ⁣(419,119,239)P'\!\left(\frac{41}{9}, \frac{11}{9}, \frac{23}{9}\right):

Direction: (41911193239+1)=(329169329)=169(212)\begin{pmatrix} \frac{41}{9} - 1 \\ \frac{11}{9} - 3 \\ \frac{23}{9} + 1 \end{pmatrix} = \begin{pmatrix} \frac{32}{9} \\ -\frac{16}{9} \\ \frac{32}{9} \end{pmatrix} = \frac{16}{9}\begin{pmatrix} 2 \\ -1 \\ 2 \end{pmatrix}

This is parallel to {n}=(212)\mathbf{'\{'}n{'\}'} = \begin{pmatrix} 2 \\ -1 \\ 2 \end{pmatrix}, confirming PPPP' is perpendicular to Π\Pi.

Verify midpoint: 12 ⁣[(131)+(419119239)]=(25919979)\frac{1}{2}\!\left[\begin{pmatrix} 1 \\ 3 \\ -1 \end{pmatrix} + \begin{pmatrix} \frac{41}{9} \\ \frac{11}{9} \\ \frac{23}{9} \end{pmatrix}\right] = \begin{pmatrix} \frac{25}{9} \\ \frac{19}{9} \\ \frac{7}{9} \end{pmatrix}.

Check on Π\Pi: 2 ⁣(259)199+2 ⁣(79)=5019+149=459=52\!\left(\frac{25}{9}\right) - \frac{19}{9} + 2\!\left(\frac{7}{9}\right) = \frac{50 - 19 + 14}{9} = \frac{45}{9} = 5. Confirmed.