Activity: The Distance Formula (Star Trek)

Static Fields 2023 (6 years)
A short improvisational role-playing skit based on the Star Trek series in which students explore the definition and notation for position vectors, the importance of choosing an origin, and the geometric nature of the distance formula. \[\vert\vec{r}-\vec{r}^\prime\vert=\sqrt{(x-x^\prime)^2+(y-y^\prime)^2-(z-z^\prime)^2}\]
What students learn
  • Position vectors are needed to locate an object in space relative to an origin;
  • The distance between two objects, determined by the formula \(\vert\vec{r}-\vec{r^{\prime}}\vert\) is independent of origin and coordinates;
  • A coordinate dependent expression for the distance formula \(\vert\vec{r}-\vec{r^{\prime}}\vert=\sqrt{(x-x^{\prime})^2 + (y-y^{\prime})^2 }\) is equivalent to the Pythagorean Theorem.

Instructor's Guide

Students' Task

In this improvisational skit, Kirk and Spock, (played by two students) are at different locations on a hostile planet and the Enterprise crew (the rest of the class) must devise a way to describe the distance between them in order to "beam" them to safety. Students use the distance formula \(\vert\vec{r}-\vec{r^{\prime}}\vert\) to find the distance between Captain Kirk and Mr. Spock. The role of position vectors and the origin in the calculation of coordinate and origin independent distance is revealed.


We do this activity by having students act out a "Star Trek" skit. Other scenarios are, of course, possible. If you want to use the Star Trek scenario, reassure students who might not know about Star Trek series that all they need to know is that Kirk, Spock, and Scotty are officers on a starship. The starship has the ability to "beam" people around, i.e. move them from anywhere to anywhere via advanced technology called a transporter that requires lots of energy. This is the way the story goes:

Ask for volunteers to play the roles of Captain Kirk and Mr. Spock. The instructor takes the role of Scotty. (Stand on the table to indicate the you are orbiting in a spaceship.) Everyone else is a "red shirt" who wants to be promoted to a shirt of another color. The "red shirts" are the one-time characters who can be killed off without long-term consequences to the television series. To be promoted to a shirt of another color, students will have to impress Scotty with their calculational ability so that he will recommend them.

Kirk and Spock are in separate places in a city on the surface of a new planet. Kirk is under attack by aliens. But the ship is also under attack by aliens. The transporter is damaged and cannot be used to beam anyone far enough to beam them on board the spaceship, so Scotty must beam Spock to Kirk to rescue him. The main computer is down, so Scotty must set the transporter controls by hand. How can he figure out how far Spock is from Kirk so he can set the power levels on the transporter correctly?

Kirk and Spock have communicators so that they can talk to Scotty. Central question: How do they let Scotty know where they are? Fortunately, they can both look outside windows and see the same large red building (draw this on the board). Laser range finders and compasses on their communicators will let them know the distance and direction to the red building. With this information, the red shirts must calculate the distance.

Various red shirts volunteer to come to the board. Each volunteer draws/elaborates diagrams relevant to the scenario and/or calculates the next step in finding the distance between Kirk and Spock. Make sure to let many red shirts have an opportunity to participate. (Some institutions run the distance calculation as a small group activity so that more students can participate.)

Student Conversations

The main purpose here is to help students gain a geometric understanding of the geomertry of the distance formula: \(|\vec{r} - \vec{r^{\prime}}|\).

In order to say where something is, you must first say where it is with respect to a known something else--an origin, in this case the red building. This is the purpose of the position vector \(\vec{r}\).

The position vector \(\vec{r}_K\) represents Kirk's position and \(\vec{r}_S\) represents Spock's position. We find it pedagogically useful to discuss and use mneumonic supscripts (\(K\) and \(S\)) on the vectors.

From the distances and directions, the red shirts should rewrite the position vectors \(\vec{r}_K\) and \(\vec{r}_S\) in an appropriate coordinate system using the formula \(\vec{r}=x\hat{x}+y\hat{y}\). Add a \(z\hat{z}\) if you want.

Emphasize that \(\vec{r} - \vec{r^{\prime}}\) is a vector. Review vector addition/subtraction: the components are given by: \begin{align} \vec{r} - \vec{r^{\prime}}&=(x\hat{x}+y\hat{y})-(x'\hat{x}+y'\hat{y})\\ &=(x-x')\hat{x}+(y-y')\hat{y} \end{align}

Emphasize that \(|\vec{r} - \vec{r^{\prime}}|\) is a scalar, the length of the vector \(\vec{r} - \vec{r^{\prime}}\). You find the magnitude of any vector by taking the square root of the dot product of the vector with itself, i.e. \(v=\vert \vec{v}\vert=\sqrt{\vec{v}\cdot\vec{v}}\).

Some students will want to avoid the complexities of using \(|\vec{r} - \vec{r^{\prime}}|\) by putting one point at the origin, thus effectively setting \(\vec{r^{\prime}}\) to zero. Point out that, while this is an excellent strategy when there are just two points in the problem, but fails if there are more.

MANY students will want to use the Pythagorean theorem. Emphasize that this is absolutely correct and then make them do it the vector way as well, so that they see that a PROOF of the Pythagorean theorem is the vector calculation they are doing.


It's important to emphasize that ideally, one just stretches a tape measure between two objects to find the distance between them. When this is not possible, especially when you are trying to find a distance in an equation, it is necessary to go through all these steps: find the coordinates of each point with respect to some agreed upon origin (in this case, the large red building). A coordinate independent representation for the distance, common in many advanced physics texts, is \(|\vec{r} - \vec{r^{\prime}}|\), written in terms of the position vectors of the two points with respect to a common origin. Write the position vectors in an appropriate coordinate system, subtract, take the dot product and the square root. Students should understand the relationship between vector addition, the magnitude of a vector, the dot product, and the Pythagorean theorem.

It may interest some advanced students that while \(|\vec{r} - \vec{r^{\prime}}|\) is independent of coordinates and origin, \(\vec{r}\) is independent of coordinates, but not independent of origin.

Find a coordinate independent expression for the distance between two points and then evaluate it in rectangular coordinates.

  • assignment The puddle

    assignment Homework

    The puddle
    differentials Static Fields 2023 (5 years) The depth of a puddle in millimeters is given by \[h=\frac{1}{10} \bigl(1+\sin(\pi xy)\bigr)\] Your path through the puddle is given by \[x=3t \qquad y=4t\] and your current position is \(x=3\), \(y=4\), with \(x\) and \(y\) also in millimeters, and \(t\) in seconds.
    1. At your current position, how fast is the depth of water through which you are walking changing per unit time?
    2. At your current position, how fast is the depth of water through which you are walking changing per unit distance?
    3. FOOD FOR THOUGHT (optional)
      There is a walkway over the puddle at \(x=10\). At your current position, how fast is the depth of water through which you are walking changing per unit distance towards the walkway.
  • assignment Distance Formula in Curvilinear Coordinates

    assignment Homework

    Distance Formula in Curvilinear Coordinates

    Ring Cycle Sequence

    Static Fields 2023 (6 years)

    The distance \(\left\vert\vec r -\vec r\,{}'\right\vert\) between the point \(\vec r\) and the point \(\vec r'\) is a coordinate-independent, physical and geometric quantity. But, in practice, you will need to know how to express this quantity in different coordinate systems.

    1. Find the distance \(\left\vert\vec r -\vec r\,{}'\right\vert\) between the point \(\vec r\) and the point \(\vec r'\) in rectangular coordinates.
    2. Show that this same distance written in cylindrical coordinates is: \begin{equation} \left|\vec r -\vec r\,{}'\right| =\sqrt{s^2+s\,{}'^2-2ss\,{}'\cos(\phi-\phi\,{}') +(z-z\,{}')^2} \end{equation}
    3. Show that this same distance written in spherical coordinates is: \begin{equation} \left\vert\vec r -\vec r\,{}'\right\vert =\sqrt{r'^2+r\,{}^2-2rr\,{}' \left[\sin\theta\sin\theta\,{}'\cos(\phi-\phi\,{}') +\cos\theta\cos\theta\,{}'\right]} \end{equation}
    4. Now assume that \(\vec r\,{}'\) and \(\vec r\) are in the \(x\)-\(y\) plane. Simplify the previous two formulas.

  • assignment Rubber Sheet

    assignment Homework

    Rubber Sheet
    Energy and Entropy 2021 (2 years)

    Consider a hanging rectangular rubber sheet. We will consider there to be two ways to get energy into or out of this sheet: you can either stretch it vertically or horizontally. The distance of vertical stretch we will call \(y\), and the distance of horizontal stretch we will call \(x\).

    If I pull the bottom down by a small distance \(\Delta y\), with no horizontal force, what is the resulting change in width \(\Delta x\)? Express your answer in terms of partial derivatives of the potential energy \(U(x,y)\).

  • assignment Total Current, Circular Cross Section

    assignment Homework

    Total Current, Circular Cross Section

    Integration Sequence

    Static Fields 2023 (5 years)

    A current \(I\) flows down a cylindrical wire of radius \(R\).

    1. If it is uniformly distributed over the surface, give a formula for the surface current density \(\vec K\).
    2. If it is distributed in such a way that the volume current density, \(|\vec J|\), is inversely proportional to the distance from the axis, give a formula for \(\vec J\).

  • computer Visualizing Combinations of Spherical Harmonics

    computer Mathematica Activity

    30 min.

    Visualizing Combinations of Spherical Harmonics
    Central Forces 2023 (3 years) Students observe three different plots of linear combinations of spherical combinations with probability density represented by color on the sphere, distance from the origin (polar plot), and distance from the surface of the sphere.
  • group Charged Sphere

    group Small Group Activity

    30 min.

    Charged Sphere

    E&M Introductory Physics Electric Potential Electric Field

    Students use a plastic surface representing the potential due to a charged sphere to explore the electrostatic potential, equipotential lines, and the relationship between potential and electric field.
  • groups Pineapples and Pumpkins

    groups Whole Class Activity

    10 min.

    Pineapples and Pumpkins
    Static Fields 2023 (6 years)

    Integration Sequence

    There are two versions of this activity:

    As a whole class activity, the instructor cuts a pumpkin in order to produce a small volume element \(d\tau\), interspersing their work with a sequence of small whiteboard questions. This version of the activity is described here.

    As a small group activity, students are given pineapple rounds and pumpkin wedges to explore area volume elements in cylindrical and spherical coordinate systems. In this version of the activity, the fruit is distribued to the students with appropriate children's pumpkin cutting equipment, as part of activities Vector Differential--Curvilinear, Scalar Surface and Volume Elements, or Vector Surface and Volume Elements.

  • assignment Central Force Definition

    assignment Homework

    Central Force Definition
    Central Forces 2023 (3 years)

    Which of the following forces can be central forces? which cannot? If the force CAN be a central force, explain the circumstances that would allow it to be a central force.

    1. The force on a test mass \(m\) in a gravitational field \(\vec{g~}\), i.e. \(m\vec g\)
    2. The force on a test charge \(q\) in an electric field \(\vec E\), i.e. \(q\vec E\)
    3. The force on a test charge \(q\) moving at velocity \(\vec{v~}\) in a magnetic field \(\vec B\), i.e. \(q\vec v \times \vec B\)

  • group Electric Potential of Two Charged Plates

    group Small Group Activity

    30 min.

    Electric Potential of Two Charged Plates
    Students examine a plastic "surface" graph of the electric potential due to two charged plates (near the center of the plates) and explore the properties of the electric potential.
  • assignment Linear Quadrupole (w/o series)

    assignment Homework

    Linear Quadrupole (w/o series)
    Static Fields 2023 (4 years) Consider a collection of three charges arranged in a line along the \(z\)-axis: charges \(+Q\) at \(z=\pm D\) and charge \(-2Q\) at \(z=0\).
    1. Find the electrostatic potential at a point \(\vec{r}\) on the \(x\)-axis at a distance \(x\) from the center of the quadrupole.

    2. A series of charges arranged in this way is called a linear quadrupole. Why?

Author Information
Corinne Manogue
Learning Outcomes