11.1 Coordinates, Direction Cosines and Lines in Space
Three numbers fix a point in space and three more fix a direction. With the distance and section formulas, the direction cosines $l,m,n$ with $l^2+m^2+n^2=1$, and the symmetric form $\frac{x-x_1}{a}=\frac{y-y_1}{b}=\frac{z-z_1}{c}$ you can locate, measure and describe any straight line in space.
A delivery drone takes off from a warehouse roof and flies in a straight line to a balcony on the far side of a city block. Its navigation chip does not think in "left" and "right" on a map: it uses three numbers for every position โ east, north and height. From the two end positions it must work out how long the flight is, which way to point, where it will be when 40% of the trip is done, and the moment it will cross a given height. A map, with two coordinates, cannot answer the last question at all. Space needs a third coordinate, and with three coordinates every one of these questions becomes a short calculation.
This section builds the tools for those calculations: coordinates of a point in space and the eight octants, the distance formula, the section formula (with centroids), the direction cosines and direction ratios that describe which way a line runs, and the equations of a straight line in space. Section 11.2 then uses them to measure angles between lines and the shortest distance between lines that never meet. In JEE Main this chapter gives one or two questions in almost every paper โ typically the ratio in which a coordinate plane cuts a segment, the direction cosines of a line, a point on a line at a given distance, or (from Section 11.2) a shortest distance.
Coordinates of a Point in Space
Fix a point $O$ (the origin) and three mutually perpendicular number lines through it, the $x$-, $y$- and $z$-axes, arranged right-handed: if the fingers of your right hand curl from the positive $x$-axis towards the positive $y$-axis, your thumb points along the positive $z$-axis. Each pair of axes spans a coordinate plane: the $XY$-plane ($z=0$), the $YZ$-plane ($x=0$) and the $ZX$-plane ($y=0$).
The coordinates $(x,y,z)$ of a point $P$ are its signed perpendicular distances from the $YZ$-, $ZX$- and $XY$-planes respectively. The three coordinate planes divide space into eight octants, named by the signs of the coordinates.
| octant | I | II | III | IV | V | VI | VII | VIII |
|---|---|---|---|---|---|---|---|---|
| signs of $(x,y,z)$ | $+\,+\,+$ | $-\,+\,+$ | $-\,-\,+$ | $+\,-\,+$ | $+\,+\,-$ | $-\,+\,-$ | $-\,-\,-$ | $+\,-\,-$ |
A point with a zero coordinate lies in no octant: $(4,0,-2)$ is on the $ZX$-plane, $(0,0,7)$ is on the $z$-axis. A useful picture: the point $P(x,y,z)$ is the far corner of a rectangular box whose opposite corner is $O$ and whose edges, of lengths $|x|$, $|y|$, $|z|$, run along the axes. The feet of the perpendiculars from $P$ to the axes are $(x,0,0)$, $(0,y,0)$, $(0,0,z)$, and to the coordinate planes $(x,y,0)$, $(0,y,z)$, $(x,0,z)$.
The distance between $P(x_1,y_1,z_1)$ and $Q(x_2,y_2,z_2)$ is
$$PQ=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}.$$In particular $OP=\sqrt{x^2+y^2+z^2}$ for $P(x,y,z)$; the distance of $P$ from the $x$-axis is $\sqrt{y^2+z^2}$ (similarly $\sqrt{z^2+x^2}$ from the $y$-axis, $\sqrt{x^2+y^2}$ from the $z$-axis), and its distance from the $YZ$-plane is $|x|$ (similarly $|y|$, $|z|$).
Proof. Let $R=(x_2,y_2,z_1)$, the point at the height of $P$ directly below or above $Q$. $P$ and $R$ lie in the horizontal plane $z=z_1$, so by the plane distance formula $PR^2=(x_2-x_1)^2+(y_2-y_1)^2$. The segment $RQ$ is vertical, of length $|z_2-z_1|$, and is perpendicular to every line in that horizontal plane, in particular to $PR$. Pythagoras in the right triangle $PRQ$ gives $PQ^2=PR^2+RQ^2$, which is the formula. For the distance from the $x$-axis: the foot of the perpendicular from $P(x,y,z)$ is $(x,0,0)$, and the distance formula gives $\sqrt{0+y^2+z^2}$. $\blacksquare$ In short: the distance from an axis uses the other two coordinates; the distance from a coordinate plane is one coordinate.
A condition on the distances of a moving point is called a locus condition, exactly as in coordinate geometry of the plane. In space the answer is usually a surface, not a curve.
The distance of the point $P(2,-3,6)$ from the $y$-axis is
The Section Formula and Centroids
Where is the point $40\%$ of the way from $P$ to $Q$? Where does the segment $PQ$ pierce the $XY$-plane? Both questions ask for a point that divides a segment in a given ratio.
Let $P(x_1,y_1,z_1)$ and $Q(x_2,y_2,z_2)$, and let $m,n\gt0$. The point $R$ dividing $PQ$ internally in the ratio $m:n$ (so $R$ is between $P$ and $Q$ and $PR:RQ=m:n$) is
$$R=\left(\frac{mx_2+nx_1}{m+n},\ \frac{my_2+ny_1}{m+n},\ \frac{mz_2+nz_1}{m+n}\right).$$The point dividing $PQ$ externally in the ratio $m:n$ ($m\ne n$; $R$ on line $PQ$ outside the segment, $PR:RQ=m:n$) is obtained by replacing $n$ by $-n$: $\left(\dfrac{mx_2-nx_1}{m-n},\dots\right)$. The midpoint is $\left(\tfrac{x_1+x_2}2,\tfrac{y_1+y_2}2,\tfrac{z_1+z_2}2\right)$. In ratio form, the point dividing $PQ$ in the ratio $k:1$ is $\left(\dfrac{kx_2+x_1}{k+1},\dfrac{ky_2+y_1}{k+1},\dfrac{kz_2+z_1}{k+1}\right)$, internal for $k\gt0$ and external for $k\lt0$ ($k\ne-1$).
Proof. Draw the planes through $P$, $R$ and $Q$ perpendicular to the $x$-axis: they are $x=x_1$, $x=x_R$, $x=x_2$. Parallel planes cut any two lines in proportional pieces, so the segment $PQ$ and the $x$-axis are divided in the same ratio: $\dfrac{x_R-x_1}{x_2-x_R}=\dfrac mn$. Solving, $n x_R-nx_1=mx_2-mx_R$, so $x_R=\dfrac{mx_2+nx_1}{m+n}$. The $y$- and $z$-coordinates are found in the same way with planes perpendicular to the other axes. For external division $R$ is outside the segment, so the signed ratio is $-\tfrac mn$ and $n$ becomes $-n$. $\blacksquare$
The centroid of the triangle with vertices $(x_i,y_i,z_i)$, $i=1,2,3$, is $\left(\tfrac{x_1+x_2+x_3}3,\tfrac{y_1+y_2+y_3}3,\tfrac{z_1+z_2+z_3}3\right)$. The four segments joining the vertices of a tetrahedron $ABCD$ to the centroids of the opposite faces meet at one point, its centroid, which divides each of them in the ratio $3:1$ and is the average of the four vertices: $\left(\tfrac{x_1+x_2+x_3+x_4}4,\dots\right)$.
Proof. The centroid $G$ of triangle $ABC$ divides the median from $A$ to the midpoint $M=\tfrac{B+C}2$ in the ratio $2:1$; by Theorem 11.2 (coordinate by coordinate) $G=\dfrac{2M+A}{3}=\dfrac{A+B+C}3$. For the tetrahedron, let $G_A=\tfrac{B+C+D}3$ be the centroid of the face opposite $A$. The point dividing $AG_A$ in the ratio $3:1$ is $\dfrac{3G_A+A}{4}=\dfrac{A+B+C+D}4$. This expression is the same for all four vertices, so all four segments pass through it. $\blacksquare$ (Here "$A+B$" means adding coordinates, a shorthand we use for brevity.)
The section formula also tests collinearity: three points are collinear exactly when one of them divides the segment joining the other two in some ratio โ and by Theorem 11.5 below, exactly when the direction ratios of $AB$ and $AC$ are proportional.
The $ZX$-plane divides the segment joining $(1,-2,3)$ and $(4,6,-5)$ in the ratio
Direction Cosines and Direction Ratios
In the plane, one number โ the slope, or the angle with the $x$-axis โ tells you which way a line runs. In space a single angle is not enough: a line making $60^\circ$ with the $x$-axis could be any line on a whole cone around that axis. We use three angles, one with each axis.
Let a line be given a direction, and let $\alpha$, $\beta$, $\gamma$ be the angles ($0\le\alpha,\beta,\gamma\le\pi$) that this direction makes with the positive $x$-, $y$- and $z$-axes (if the line does not pass through $O$, use the parallel line through $O$ with the same direction). These are its direction angles, and
$$l=\cos\alpha,\qquad m=\cos\beta,\qquad n=\cos\gamma$$are its direction cosines (DCs). Reversing the direction replaces each angle $\theta$ by $\pi-\theta$, so the DCs become $-l,-m,-n$: an undirected line has two sets of DCs, $\pm(l,m,n)$. Parallel lines have the same DCs.
If $P(x,y,z)$ lies on the directed line through $O$ with DCs $l,m,n$, on the positive side of $O$ and at distance $r=OP$ from it, then
$$x=lr,\qquad y=mr,\qquad z=nr,\qquad\text{and}\qquad l^2+m^2+n^2=1.$$Equivalently $\cos^2\alpha+\cos^2\beta+\cos^2\gamma=1$, so also $\sin^2\alpha+\sin^2\beta+\sin^2\gamma=2$ and $\cos2\alpha+\cos2\beta+\cos2\gamma=-1$.
Proof. Let $A=(x,0,0)$ be the foot of the perpendicular from $P$ to the $x$-axis. Triangle $OAP$ has a right angle at $A$ and the angle $\alpha$ at $O$, so the signed length $OA$ is $r\cos\alpha$; that is, $x=lr$. (If $\alpha$ is obtuse, $A$ lies on the negative $x$-axis and $\cos\alpha\lt0$ โ the sign takes care of itself.) The same argument with the $y$- and $z$-axes gives $y=mr$, $z=nr$. Then $r^2=x^2+y^2+z^2=r^2(l^2+m^2+n^2)$, and dividing by $r^2$ gives $l^2+m^2+n^2=1$. The other two identities follow from $\sin^2=1-\cos^2$ and $\cos2\theta=2\cos^2\theta-1$. $\blacksquare$
So a set of DCs is nothing but the coordinates of the point at distance $1$ along the line from $O$. In practice we rarely know the angles; we know some multiple of $(l,m,n)$, for instance the differences of coordinates of two points of the line.
Three numbers $a,b,c$, not all zero, are direction ratios (DRs) of a line with DCs $l,m,n$ if they are proportional to them: $a=kl$, $b=km$, $c=kn$ for some $k\ne0$. A line has infinitely many sets of DRs (all multiples of one set), but only two sets of DCs.
(a) If a line has DRs $a,b,c$, its DCs are
$$l=\frac{\pm a}{\sqrt{a^2+b^2+c^2}},\quad m=\frac{\pm b}{\sqrt{a^2+b^2+c^2}},\quad n=\frac{\pm c}{\sqrt{a^2+b^2+c^2}},$$with the same sign taken throughout. (b) The line through $P(x_1,y_1,z_1)$ and $Q(x_2,y_2,z_2)$ has DRs $x_2-x_1,\ y_2-y_1,\ z_2-z_1$, and the direction from $P$ to $Q$ has DCs $\dfrac{x_2-x_1}{PQ},\ \dfrac{y_2-y_1}{PQ},\ \dfrac{z_2-z_1}{PQ}$.
Proof. (a) From $a=kl$, $b=km$, $c=kn$: $a^2+b^2+c^2=k^2(l^2+m^2+n^2)=k^2$, so $k=\pm\sqrt{a^2+b^2+c^2}$ and $l=\tfrac ak$ and so on. (b) Slide the segment $PQ$ (without turning it) so that $P$ moves to $O$; then $Q$ moves to $R(x_2-x_1,\,y_2-y_1,\,z_2-z_1)$, and $OR$ has the same direction as $PQ$ and length $PQ$. By Theorem 11.4 the DCs of $OR$ are the coordinates of $R$ divided by $OR=PQ$. $\blacksquare$ The differences $x_2-x_1$, $y_2-y_1$, $z_2-z_1$ are also called the projections of $PQ$ on the axes.
Let $P=(2,3,6)$. Before using the viewer, predict the angle that $OP$ makes with the positive $z$-axis.
Which of the following can be the direction cosines of a line?
Equations of a Line in Space
A line in space is fixed by one of its points and its direction. A point $P(x,y,z)$ is on the line through $A(x_1,y_1,z_1)$ with DRs $a,b,c$ exactly when the segment $AP$ has that direction, i.e. when the DRs $x-x_1$, $y-y_1$, $z-z_1$ of $AP$ are proportional to $a,b,c$.
The line through $A(x_1,y_1,z_1)$ with DRs $a,b,c$ has the symmetric (Cartesian) form
$$\frac{x-x_1}{a}=\frac{y-y_1}{b}=\frac{z-z_1}{c}$$and the parametric form $x=x_1+a\lambda$, $y=y_1+b\lambda$, $z=z_1+c\lambda$ ($\lambda\in\mathbb{R}$); $(x_1+a\lambda,\ y_1+b\lambda,\ z_1+c\lambda)$ is the general point of the line. The line through two points $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$ is $\dfrac{x-x_1}{x_2-x_1}=\dfrac{y-y_1}{y_2-y_1}=\dfrac{z-z_1}{z_2-z_1}$. If $(a,b,c)=(l,m,n)$ are DCs, then $|\lambda|$ is the distance from $A$: the two points at distance $r$ from $A$ on the line are $(x_1\pm lr,\ y_1\pm mr,\ z_1\pm nr)$.
Proof. $AP$ has the direction $(a,b,c)$ exactly when $(x-x_1,y-y_1,z-z_1)=\lambda(a,b,c)$ for some $\lambda$ โ that is the parametric form, and eliminating $\lambda$ gives the symmetric form. With DCs, $AP=\sqrt{\lambda^2(l^2+m^2+n^2)}=|\lambda|$ by Theorem 11.4. $\blacksquare$ A zero in a denominator is a convention, not a division: $\dfrac{x-2}{3}=\dfrac{y+1}{0}=\dfrac{z-4}{-2}$ means $y=-1$ (the general point $(2+3\lambda,\,-1,\,4-2\lambda)$ never changes its $y$), so the line lies in the plane $y=-1$. In vector language (Chapter 12) the parametric form reads $\vec r=\vec a+\lambda\vec b$, where $\vec a$ is the position vector of $A$ and $\vec b=a\hat i+b\hat j+c\hat k$; we will not need vectors in this chapter.
- Make the coefficient of $x$, $y$ and $z$ in each numerator equal to $+1$ by dividing numerator and denominator: $\dfrac{2x-1}{3}=\dfrac{x-\tfrac12}{\tfrac32}$ and $\dfrac{4-y}{2}=\dfrac{y-4}{-2}$.
- Read the point from the numerators and the DRs from the denominators: $\dfrac{2x-1}3=\dfrac{4-y}2=\dfrac{z+1}1$ passes through $\left(\tfrac12,4,-1\right)$ with DRs $\tfrac32,-2,1$, or (times $2$) $3,-4,2$.
- A line written as $px=qy=rz$ (all three equal to $t$) has general point $\left(\tfrac tp,\tfrac tq,\tfrac tr\right)$: it passes through $O$ with DRs $\tfrac1p,\tfrac1q,\tfrac1r$.
- Before using any formula, write the line as "point $+\lambda\cdot$direction". Every later question โ a point at a given distance, a crossing with a coordinate plane, a foot of a perpendicular โ is then a question about $\lambda$.
Take $P(5,-2,5)$ and $Q(-3,6,1)$ from Example 7, and let a point $X$ travel along line $PQ$ starting at $P$. Where does $X$ reach the $XY$-plane?
1. Axis or plane? The distance of $(x,y,z)$ from the $x$-axis is $\sqrt{y^2+z^2}$; from the $YZ$-plane it is $|x|$. Mixing the two is the most common slip of this chapter.
2. One equation in space is a surface. $x^2+y^2=25$ is a cylinder, and $x=2z$ is a plane. A circle or a line in space needs two equations (for example $x^2+y^2=25,\ z=0$).
3. DCs versus DRs. Direction cosines satisfy $l^2+m^2+n^2=1$; direction ratios need not. "DCs proportional to $2,-1,2$" means divide by $3$. Two sets of DCs, $\pm(l,m,n)$, describe the same line; a stated direction (or "makes an acute angle with the $z$-axis") picks one.
4. Non-standard forms. In $\dfrac{2x-1}{3}=\dfrac{4-y}{2}=\dfrac{z}{1}$ the DRs are $\tfrac32,-2,1$, not $3,2,1$: the coefficient of $x$ must be $1$, and $4-y$ flips the sign. A zero denominator means that coordinate is constant.
5. Internal or external? A coordinate plane divides $PQ$ internally when the relevant coordinates of $P$ and $Q$ have opposite signs, externally when they have the same sign. The ratio $k:1$ is measured from the first point.
The line $\dfrac{1-x}{2}=\dfrac{y+3}{1}=\dfrac{2z-1}{4}$ has direction ratios
Exercises
- 1 Name the octant (or the plane) containing each point: $(-3,1,-2)$, $(2,-5,-1)$, $(-1,-1,4)$, $(4,0,-2)$.
- 2 Find the distance between $(2,-1,3)$ and $(-4,1,0)$.
- 3 For $P(4,-3,12)$ find its distances from the origin, from each axis and from the $XY$-plane.
- 4 Show that $A(1,0,2)$, $B(3,4,5)$, $C(6,5,3)$, $D(4,1,0)$ are the vertices of a parallelogram $ABCD$, but not of a rectangle.
- 5 The distance between $(x,2,-1)$ and $(3,-4,1)$ is $7$. Find the possible values of $x$ and their sum.
- 6 Find the point on the $y$-axis equidistant from $A(3,1,2)$ and $B(5,5,2)$.
- 7 Find the equation of the locus of a point whose distance from the $x$-axis equals its distance from the $YZ$-plane.
- 8 Show that $A(2,3,5)$, $B(-1,3,2)$, $C(3,5,-2)$ form a right-angled triangle and find its area.
- 1 Find the points dividing the join of $A(-1,3,4)$ and $B(5,-3,1)$ internally and externally in the ratio $1:2$.
- 2 In what ratio does the $YZ$-plane divide the join of $(-2,4,7)$ and $(3,-5,8)$? Find the point of division.
- 3 Find the two points that trisect the join of $(1,-2,3)$ and $(4,7,-6)$.
- 4 Show that $A(3,-2,4)$, $B(1,1,1)$, $C(-3,7,-5)$ are collinear and find the ratio in which $B$ divides $AC$.
- 5 The centroid of the triangle with vertices $(a,1,3)$, $(-2,b,-5)$, $(4,7,c)$ is the origin. Find $a+b+c$.
- 6 Find the centroid of the tetrahedron with vertices $(1,2,3)$, $(2,-1,4)$, $(4,5,-1)$, $(-3,6,2)$.
- 7 In triangle $ABC$ with $A(0,0,0)$, $B(2,1,2)$, $C(4,-4,-2)$, the bisector of angle $A$ meets $BC$ at $D$. Using $BD:DC=AB:AC$, find $D$.
- 8 The point $(p,2,q)$ lies on the line through $A(1,-1,2)$ and $B(3,3,6)$. Find $p+q$.
- 1 Find the DCs of a line with DRs $6,-2,3$.
- 2 Find the DCs of the line through $(-2,4,-5)$ and $(1,2,3)$.
- 3 A line makes angles $\alpha,\beta,\gamma$ with the axes. Find $\sin^2\alpha+\sin^2\beta+\sin^2\gamma$ and $\cos2\alpha+\cos2\beta+\cos2\gamma$.
- 4 A line makes $60^\circ$ with the positive $x$-axis and $45^\circ$ with the positive $z$-axis. Find its angle with the positive $y$-axis.
- 5 A line makes equal angles $\theta$ with the positive $x$- and $y$-axes and $45^\circ$ with the positive $z$-axis. Find $\theta$.
- 6 Using direction ratios, show that $A(2,3,-4)$, $B(1,-2,3)$, $C(3,8,-11)$ are collinear.
- 7 The projections of a segment on the $x$-, $y$- and $z$-axes are $2$, $-3$ and $6$. Find its length and its DCs.
- 8 Which of these triples can be the direction angles of a line? (a) $45^\circ,60^\circ,120^\circ$ (b) $30^\circ,45^\circ,60^\circ$ (c) $90^\circ,135^\circ,45^\circ$.
- 1 Write the symmetric and parametric equations of the line through $(-2,4,-5)$ with DRs $3,5,-6$.
- 2 Find the equations of the line through $(3,-2,-5)$ and $(3,-2,6)$. To which axis is it parallel?
- 3 Find a point on, and the DCs of, the line $\dfrac{2x-3}{4}=\dfrac{1-y}{2}=\dfrac{3z+1}{6}$.
- 4 Which of the points $(7,-3,8)$ and $(4,-2,6)$ lie on the line $\dfrac{x-1}{3}=\dfrac{y+1}{-1}=\dfrac{z-2}{3}$?
- 5 Find the points on $\dfrac{x+2}{2}=\dfrac{y+1}{-1}=\dfrac{z-3}{2}$ at distance $6$ from $(-2,-1,3)$.
- 6 Find where the line through $(2,-3,1)$ and $(3,-4,-5)$ meets the $ZX$-plane, and the ratio in which the $ZX$-plane divides the join of these points.
- 7 Find the line through $(1,2,3)$ parallel to the line $6x=3y=-2z$.
- 8 A drone flies in a straight line at constant speed $7$ m/s from $A(0,0,10)$ to $B(60,30,30)$ (coordinates in metres, $z$ = height). Find the flight time, the DCs of its direction, its position after $4$ s, and the moment it is at height $22$ m.
E1. JEE Main ยท MCQ The $YZ$-plane divides the segment joining $A(-2,5,1)$ and $B(4,-1,7)$ in the ratio $k:1$ at the point $R$. Then (A) $k=\tfrac12$, $R=(0,3,3)$ (B) $k=2$, $R=(0,1,5)$ (C) $k=-\tfrac12$, $R=(0,11,-5)$ (D) $k=\tfrac12$, $R=(0,2,4)$
E2. JEE Main ยท Numerical A line makes an angle of $60^\circ$ with the positive $x$-axis, $45^\circ$ with the positive $y$-axis and an acute angle $\gamma$ with the positive $z$-axis. Find $\gamma$ in degrees. Give the answer to the nearest integer.
E3. JEE Main ยท MCQ In the triangle with vertices $A(2,-1,4)$, $B(1,3,-2)$ and $C(5,-3,6)$, the length of the median through $A$ is (A) $\tfrac{2\sqrt6}3$ (B) $\sqrt6$ (C) $\tfrac{3\sqrt6}2$ (D) $2\sqrt6$
E4. JEE Main ยท Numerical The points $A(2,-1,3)$, $B(5,1,-1)$ and $C(\alpha,\beta,11)$ are collinear. Find $\alpha^2+\beta^2$. Give the answer to the nearest integer.
E5. JEE Main ยท MCQ A line has direction ratios $2,-1,2$ and makes an obtuse angle with the positive $z$-axis. Its direction cosines are (A) $\left(\tfrac23,-\tfrac13,\tfrac23\right)$ (B) $\left(\tfrac29,-\tfrac19,\tfrac29\right)$ (C) $\left(-\tfrac23,\tfrac13,-\tfrac23\right)$ (D) $\left(-\tfrac23,-\tfrac13,-\tfrac23\right)$
E6. JEE Main ยท MCQ The locus of a point whose distance from the $z$-axis is twice its distance from the $XY$-plane is (A) $x^2+y^2=2z$ (B) $x^2+y^2=2z^2$ (C) $x^2+y^2=3z^2$ (D) $x^2+y^2=4z^2$
Research question. Warehouse robots, hospital equipment tags and football-tracking systems locate objects indoors, where satellite signals are weak, by measuring their distances from a few fixed radio beacons. How many beacons are needed to fix a point in space, and how do measurement errors move the answer?
Why it matters. Each measured distance $d_i$ to a beacon $B_i$ says that the tag lies on a sphere, $(x-x_i)^2+(y-y_i)^2+(z-z_i)^2=d_i^2$ โ the distance formula of Theorem 11.1. Subtracting two such equations cancels $x^2+y^2+z^2$ and leaves a first-degree equation, exactly as in Example 2(a). Ultra-wideband positioning, used in factories and sports arenas, works this way with errors of a few centimetres.
What to do.
- Put beacons at $B_0(0,0,0)$, $B_1(10,0,0)$, $B_2(0,8,0)$ and $B_3(0,0,4)$ (metres, the corners of a room). Choose a secret tag position, say $T(3,5,1.5)$, and compute the four distances $d_0,\dots,d_3$.
- Subtract the sphere equation of $B_0$ from that of $B_1$, $B_2$, $B_3$ in turn. Show that you get $x=\dfrac{d_0^2-d_1^2+100}{20}$ and similar formulas for $y$ and $z$, and check that they return $T$.
- Now round each distance to the nearest $0.1$ m (a realistic sensor) and recompute $T$. How far (Theorem 11.1) is the computed point from the true one? Repeat for a tag near the far corner of the room.
- Explain why three beacons alone leave two possible positions (two spheres meet in a circle, a third sphere cuts that circle in two points), and why the beacons must not all lie in one plane.
Tools: A calculator or spreadsheet; optionally a few lines of Python to repeat step 3 many times with random errors.
Hand in: Your formulas from step 2, a table of computed positions and errors for at least three tag positions, and a short paragraph on where in the room the system is most accurate.
Going further. Real systems use more than four beacons and choose the point that fits all the spheres best (least squares). How would you measure "fits best"? What happens if one beacon is blocked by a metal shelf and reports a distance that is too long?
๐งช Self-check quiz
Q1. The point $(-3,0,5)$ lies
Q2. The distance between $(1,1,1)$ and $(3,3,2)$ is
Q3. The direction cosines of the direction from $O$ to $(1,-2,2)$ are
Q4. The centroid of the tetrahedron with vertices $(0,0,0)$, $(4,0,0)$, $(0,4,0)$, $(0,0,4)$ is
Q5. The line $\dfrac{x-2}{3}=\dfrac{y+1}{0}=\dfrac{z-4}{-2}$