# What is the equation of relative motion for two objects moving in straight lines?

If two objects, A and B, are moving in the same direction along straight lines in a plane, they might be diverging, converging or moving in parallel.

If we wish to describe B's motion with respect to A, what is the equation of motion?

For example, imagine that A is moving at 10 knots along the line described by the parametric equation:

x = 30t
y = 20t


and B is moving at 9 knots along the line described by the parametric equation:

x = 35t
y = 10 - 15t


what is the motion of B with respect to A? In other words, if we hold A to always be at the origin, what would be the parametric equation (and/or non-parametric equation) for B's motion?

I guess the shape will be a parabola or hyperbola, but am not sure how to compute it.

• You must be careful in that the two $t$s in each of your two parametric equations are not the same and they are related to a time $T$. What you do know is that $x_{\rm A} = 30\,t_{\rm A},\; \; y_{\rm A} = 30\,t_{\rm A}$ and $x_{\rm A}^2 + y_{\rm A}^2 = (10)^2T^2$ where I have assumed at time $T=0$ object $A$ is at position $(0,0)$ and there is a similar set of relationships for object $B$. Commented Nov 16, 2017 at 10:18
• @Farcher Right, I imagine that the ratio between the t's is the same as that of the speed of the vessels. Commented Nov 16, 2017 at 12:49
• You need to check whether that is the case or not. Commented Nov 16, 2017 at 12:54
• Fixing the origin doesn't determine the equation (or the shape) of the trajectory. I can keep $A$ as the origin and make the equation of trajectory look like whatever I want depending on the coordinates I choose to employ.
– user87745
Commented Dec 23, 2017 at 11:15
• @AmbroseSwasey-What makes you think the shape will be a parabola or hyperbola? Commented Dec 24, 2017 at 13:10

If you know the parametric equation for the two objects then it is super easy to describe one's motion with respect to the other, as long as the parametric equation correctly describes the speed of the object. In your case, A travels along the line

x = 30t
y = 20t.


However, this line actually describes an object which has a speed of 30 knots (if t is measured in hours) in the x-direction and a speed of 20 knots in the y direction. This gives a total speed of $$\sqrt(30^2+20^2)=36 \text{ knots}$$ which is not what you want, because you said object A is moving at 10 knots. To correctly find the parametric equation for A, we are looking for something of the form

x = 3mt
y = 2mt


and we have to find m, so that $$\sqrt((3m)^2+(2m)^2)=10\text{ knots.}$$

This gives $m=\frac{10}{\sqrt{13}}=2.77$, which means that the parametric equation for A which correctly describes its speed is:

x = 8.32t
y = 5.55t.


Similarly for B, we are looking for something of the form

x = 35nt
y = 10n-15nt


and we have to find n, such that $$\sqrt((35n)^2+(15n)^2)=9\text{ knots.}$$

This gives $m=\frac{9}{5\sqrt{58}}=0.236$, which means that the parametric equation for B which correctly describes its speed is:

x = 8.27t
y = 2.36-3.55t.


The hard work is now done and in order to find the relative positions all we have to do is subtract the coordinates. In other words, the motion of B with respect to A (if we hold A to always be at the origin) will be $\vec{r}_B-\vec{r}_A$:

x = 8.27t - 8.32t = -0.05t
y = 2.36-3.55t - 5.55t = 2.36 - 2.00t


note that I have only kept 3 significant figures when doing calculations, but nothing stops you from keeping the square roots and maintaining infinite accuracy if that is desirable. Likewise, the motion of A with respect to B (if we hold B to always be at the origin) will be $\vec{r}_A-\vec{r}_B$:

x = 8.32t - 8.27t = 0.05t
y = 5.55t -(2.36-3.55t) = -2.36 + 2.00t


The final thing to note is that the motion of B with respect to A in this example is a straight line, not a parabola or hyperbola. This was expected from a physics point of view for two reasons: 1) B's speed in the original frame was constant which means that the net force on it is zero. 2) A's speed is constant so A is an inertial observer. Therefore when A looks at B, they see an object with no net force on it so from Newton's laws they would expect it to travel on a straight line, which it does!

Even if one of the two objects where accelerating the motion of B with respect to A will always be $\vec{r}_B-\vec{r}_A$, but in that case the parametric equation will not be linear in t. If that happens, it is conceivable that the answer might be a parabola or hyperbola.

Hope this helps.

As pointed out by other writers, the relative distance of B to A is given by $\vec{r'}=\vec{r_B} - \vec{r_A}$. So it is necessary to calculate the positions of both objects for a given time. The unit vector for the direction of the first object is $\vec{e_1} = \frac{3}{\sqrt{13}}\hat{i} + \frac{2}{\sqrt{13}}\hat{j}$ . We know the direction, to describe the movement completely, we need an initial position as well, which we can pick as any point on the trajectory. Let's pick $(0,0)$ arbitrarily. So the position by time becomes $$\vec{r_A} = 10t\vec{e_1}=10t(\frac{3}{\sqrt{13}}\hat{i} + \frac{2}{\sqrt{13}}\hat{j})$$ The units are in knots. The time is typically given in second, however this t is different from your trajectory parameter t.

We can do the same for the second trajectory. The unit vector along the path is $\vec{e_2} = \frac{7}{\sqrt{58}}\hat{i} - \frac{3}{\sqrt{58}}\hat{j}$. In other words, this is the direction you need to go if you start on any point on the trajectory you described and you want to stay on the trajectory. Now we can pick a starting point, which we pick as $(0,10)$. So the position by time will be

$$\vec{r_B} = 10\hat{j} + 9t\vec{e_2}=10\hat{j} + 9t(\frac{7}{\sqrt{58}}\hat{i} - \frac{3}{\sqrt{58}}\hat{j})$$

Now all you need to do is subtract one from another.

$$\vec{r'}=\vec{r_B} - \vec{r_A}\\ =10\hat{j} + 9t(\frac{7}{\sqrt{58}}\hat{i} - \frac{3}{\sqrt{58}}\hat{j})-10t(\frac{3}{\sqrt{13}}\hat{i} + \frac{2}{\sqrt{13}}\hat{j})$$

Sorting out the vector components, we get

$$\vec{r'}=(\frac{63}{\sqrt{58}}-\frac{30}{\sqrt{13}})t\hat{i} + (10-(\frac{27}{\sqrt{58}}+\frac{20}{\sqrt{13}})t)\hat{j}$$ Bear in mind that this is the A's point of view, which happens to have the same unit vectors ($\hat{i}$ and $\hat{j}$). From the last equation I wrote you can see that B, according to A, moves in a line characterized by the vector $(\frac{63}{\sqrt{58}}-\frac{30}{\sqrt{13}})\hat{i} -(\frac{27}{\sqrt{58}}+\frac{20}{\sqrt{13}})\hat{j}$ which can be turned into a unit vector too if desired. The exact equation of the relative position may change as we picked the initial positions arbitrarily. However, the direction of motion doesn't change.

Let the equations of the rectilinear motions of vessels $\:\rm A,B\:$ be respectively \begin{align} x_{_{\rm A}} & =c_{_{\rm A}}\!\!\cdot t \!+\! g_{_{\rm A}} \tag{01.1}\\ y_{_{\rm A}} & =d_{_{\rm A}}\!\!\cdot t \!+\! h_{_{\rm A}} \tag{01.2} \end{align} \begin{align} x_{_{\rm B}} & =c_{_{\rm B}}\!\!\cdot t\!+\!g_{_{\rm B}} \tag{02.1}\\ y_{_{\rm B}} & =d_{_{\rm B}}\!\!\cdot t\!+\!h_{_{\rm B}} \tag{02.2} \end{align} where $\:c_{_{\rm K}},d_{_{\rm K}},g_{_{\rm K}},h_{_{\rm K}}, _{_{(\rm K=A,B)}}\:$ are constants and $\:t\:$ the time, a common parameter. The two motions are uniform with speeds \begin{align} \upsilon_{_{\rm A}} & =\sqrt{\left(\dfrac{\mathrm dx_{_{\rm A}}}{\mathrm dt}\right)^{\!\!2}\!+\!\left(\dfrac{\mathrm dy_{_{\rm A}}}{\mathrm dt}\right)^{\!\!2}}\!=\!\sqrt{c^{2}_{_{\rm A}}\!+\!d^{2}_{_{\rm A}}} \tag{03a}\\ \upsilon_{_{\rm B}} & =\sqrt{\left(\dfrac{\mathrm dx_{_{\rm B}}}{\mathrm dt}\right)^{\!\!2}\!+\!\left(\dfrac{\mathrm dy_{_{\rm B}}}{\mathrm dt}\right)^{\!\!2}}\!=\!\sqrt{c^{2}_{_{\rm B}}\!+\!d^{2}_{_{\rm B}}} \tag{03b} \end{align}

Then the equations of motion of vessel $\:\rm B\:$ with respect to $\:\rm A\:$ are \begin{align} x_{_{\rm BA}} & =x_{_{\rm B}}\!-\!x_{_{\rm A}} =\left(c_{_{\rm B}}\!-\!c_{_{\rm A}}\right)\cdot t\!+\!\left(g_{_{\rm B}}\!-\!g_{_{\rm A}}\right)=c_{_{\rm BA}}\!\!\cdot t\!+\!g_{_{\rm BA}} \tag{04.1}\\ y_{_{\rm BA}} & =y_{_{\rm B}}\!-\!y_{_{\rm A}} =\left(d_{_{\rm B}}\!-\!d_{_{\rm A}}\right)\cdot t\!+\!\left(h_{_{\rm B}}\!-\!h_{_{\rm A}}\right)=d_{_{\rm BA}}\!\!\cdot t\!+\!h_{_{\rm BA}} \tag{04.2} \end{align} So $\:\rm B\:$ is moving with respect to $\:\rm A\:$ rectilinearly and uniformly with speed $$\upsilon_{_{\rm BA}} =\sqrt{\left(c_{_{\rm B}}\!-\!c_{_{\rm A}}\right)^{2}\!+\!\left(d_{_{\rm B}}\!-\!d_{_{\rm A}}\right)^{2}} \tag{05}$$

Now, suppose that the equations of the rectilinear motions of vessels $\:\rm A,B\:$ are respectively \begin{align} x_{_{\rm A}} & =c_{_{\rm A}}\!\!\cdot t_{_{\rm A}}\!\!\left(\rm T\right)\!+\!g_{_{\rm A}} \tag{06.1}\\ y_{_{\rm A}} & =d_{_{\rm A}}\!\!\cdot t_{_{\rm A}}\!\!\left(\rm T\right)\!+\!h_{_{\rm A}} \tag{06.2} \end{align} \begin{align} x_{_{\rm B}} & =c_{_{\rm B}}\!\!\cdot t_{_{\rm B}}\!\!\left(\rm T\right)\!+\!g_{_{\rm B}} \tag{07.1}\\ y_{_{\rm B}} & =d_{_{\rm B}}\!\!\cdot t_{_{\rm B}}\!\!\left(\rm T\right)\!+\!h_{_{\rm B}} \tag{07.2} \end{align} where $\:c_{_{\rm K}},d_{_{\rm K}},g_{_{\rm K}},h_{_{\rm K}}, _{_{(\rm K=A,B)}}\:$ are constants and the parameters $\:t_{_{\rm A}},t_{_{\rm B}}\:$are increasing functions of the time $\:\rm T$. For the speeds we have respectively \begin{align} \upsilon^{2}_{_{\rm A}} & =\left(\dfrac{\mathrm dx_{_{\rm A}}}{\rm dT}\right)^{\!\!2}\!+\!\left(\dfrac{\mathrm dy_{_{\rm A}}}{\rm dT}\right)^{\!\!2}\!=\!\left(c^{2}_{_{\rm A}}\!+\!d^{2}_{_{\rm A}} \right)\left(\dfrac{\mathrm dt_{_{\rm A}}}{\rm dT}\right)^{\!\!2} \Longrightarrow \upsilon_{_{\rm A}} \!=\!\sqrt{c^{2}_{_{\rm A}}\!+\!d^{2}_{_{\rm A}}} \left(\dfrac{\mathrm dt_{_{\rm A}}}{\rm dT}\right) \tag{08a}\\ \upsilon^{2}_{_{\rm B}} & =\left(\dfrac{\mathrm dx_{_{\rm B}}}{\rm dT}\right)^{\!\!2}\!+\!\left(\dfrac{\mathrm dy_{_{\rm B}}}{\rm dT}\right)^{\!\!2}\!=\!\left(c^{2}_{_{\rm B}}\!+\!d^{2}_{_{\rm B}} \right)\left(\dfrac{\mathrm dt_{_{\rm B}}}{\rm dT}\right)^{\!\!2}\Longrightarrow \upsilon_{_{\rm B}} \!=\!\sqrt{c^{2}_{_{\rm B}}\!+\!d^{2}_{_{\rm B}}} \left(\dfrac{\mathrm dt_{_{\rm B}}}{\rm dT}\right) \tag{08b} \end{align} If these two speeds must be constants then
\begin{align} \dfrac{\mathrm dt_{_{\rm A}}}{\rm dT} & =\text{constant}=\lambda_{_{\rm A}}\Longrightarrow t_{_{\rm A}}\!\left(\rm T\right)=\lambda_{_{\rm A}}\cdot \rm T + \mu_{_{\rm A}} \tag{09.1}\\ \dfrac{\mathrm dt_{_{\rm B}}}{\rm dT} & =\text{constant}=\lambda_{_{\rm B}}\Longrightarrow t_{_{\rm B}}\!\left(\rm T\right)=\lambda_{_{\rm B}}\cdot \rm T + \mu_{_{\rm B}} \tag{09.2} \end{align} Inserting these expressions in (06) and (07) we have a configuration identical to (01), (02).

But the case you "imagine that the ratio between the t's is the same as that of the speed of the vessels" (in one of your comments) destroys the uniform speed of at least one of the vessels, since from equations (08)

$$\dfrac{t_{_{\rm A}}}{t_{_{\rm B}}}=\dfrac{\upsilon_{_{\rm A}}}{\upsilon_{_{\rm B}}}\Longrightarrow \dfrac{t_{_{\rm A}}}{t_{_{\rm B}}}=\dfrac{\sqrt{c^{2}_{_{\rm A}}\!+\!d^{2}_{_{\rm A}}}}{\sqrt{c^{2}_{_{\rm B}}\!+\!d^{2}_{_{\rm B}}}}\dfrac{\mathrm dt_{_{\rm A}}}{\mathrm dt_{_{\rm B}}} \tag{10}$$ so $$\dfrac{\mathrm dt_{_{\rm B}}}{t_{_{\rm B}}}=\dfrac{\sqrt{c^{2}_{_{\rm A}}\!+\!d^{2}_{_{\rm A}}}}{\sqrt{c^{2}_{_{\rm B}}\!+\!d^{2}_{_{\rm B}}}}\dfrac{\mathrm dt_{_{\rm A}}}{t_{_{\rm A}}} \tag{11}$$ with solution the following explicit relation between the $\:t\:$ parameters $$t_{_{\rm B}}=f\cdot t^{\,\rho}_{_{\rm A}}\,, \quad \rho\equiv\dfrac{\sqrt{c^{2}_{_{\rm A}}\!+\!d^{2}_{_{\rm A}}}}{\sqrt{c^{2}_{_{\rm B}}\!+\!d^{2}_{_{\rm B}}}}\,, \quad f=\text{arbitrary constant} \tag{12}$$ Let keep the rectilinear motion of vessel $\:\rm A\:$ uniform, see equations (06), setting $\:t_{_{\rm A}}\:$ a linear function of the time $\:\rm T\:$, the most simple being $\:t_{_{\rm A}}=\rm T$. The equations of motions (06) and (07), having in mind equation (12) setting for convenience $\:f=1\:$, are \begin{align} x_{_{\rm A}} & =c_{_{\rm A}}\!\!\cdot \mathrm T\!+\!g_{_{\rm A}} \tag{13.1}\\ y_{_{\rm A}} & =d_{_{\rm A}}\!\!\cdot \mathrm T\!+\!h_{_{\rm A}} \tag{13.2} \end{align} \begin{align} x_{_{\rm B}} & =c_{_{\rm B}}\!\!\cdot \mathrm T^{\rho}\!+\!g_{_{\rm B}} \tag{14.1}\\ y_{_{\rm B}} & =d_{_{\rm B}}\!\!\cdot \mathrm T^{\rho}\!+\!h_{_{\rm B}} \tag{14.2} \end{align} and the equations of motion of vessel $\:\rm B\:$ with respect to $\:\rm A\:$ are \begin{align} x_{_{\rm BA}} & =x_{_{\rm B}}\!-\!x_{_{\rm A}} =c_{_{\rm B}}\!\!\cdot \mathrm T^{\rho}\!-\!c_{_{\rm A}}\!\!\cdot \mathrm T\!+\! g_{_{\rm B}}\!-\!g_{_{\rm A}} \tag{15.1}\\ y_{_{\rm BA}} & =y_{_{\rm B}}\!-\!y_{_{\rm A}} = \,d_{_{\rm B}}\!\!\cdot \mathrm T^{\rho}\!-\!d_{_{\rm A}}\!\!\cdot \mathrm T\!+\! h_{_{\rm B}}\!-\!h_{_{\rm A}} \tag{15.2} \end{align} that is a curvilinear motion in general.

For special cases of the exponential constant $\:\rho\:$, for example $\:\rho=2\:$, the curve (15) may be like a parabola or hyperbola.

Numerical Example

For the example in question \begin{align} x_{_{\rm A}} & \!=\!30\,t \hphantom{++10} \tag{Ex-01.1}\\ y_{_{\rm A}} & \!=\!20\,t \tag{Ex-01.2} \end{align} \begin{align} x_{_{\rm B}} & \!=\!35\,t \tag{Ex-02.1}\\ y_{_{\rm B}} & \!=\!-\!15\,t+10 \tag{Ex-02.2} \end{align} The constants $\:c_{_{\rm K}},d_{_{\rm K}},g_{_{\rm K}},h_{_{\rm K}}, _{_{(\rm K=A,B)}}\:$ are : \begin{align} c_{_{\rm A}} & =30\,,\quad g_{_{\rm A}}=0\,,\quad d_{_{\rm A}} =20\,,\quad h_{_{\rm A}} =0 \tag{Ex-03a}\\ c_{_{\rm B}} & =35\,,\quad g_{_{\rm B}}=0\,,\quad d_{_{\rm B}} =-15\,,\quad h_{_{\rm B}} =10 \tag{Ex-03b} \end{align} From (12) $$\rho\equiv\dfrac{\sqrt{c^{2}_{_{\rm A}}\!+\!d^{2}_{_{\rm A}}}}{\sqrt{c^{2}_{_{\rm B}}\!+\!d^{2}_{_{\rm B}}}}=\dfrac{\sqrt{30^{2}\!+20^{2}}}{\sqrt{35^{2}\!+(-15)^{2}}}=\sqrt{\dfrac{1300}{1450}}=0.9469 \tag{Ex-04}$$ and equations (13),(14) and (15) yield \begin{align} x_{_{\rm A}} & =30\,\mathrm T \tag{Ex-05.1}\\ y_{_{\rm A}} & =20\,\mathrm T \tag{Ex-05.2} \end{align} \begin{align} x_{_{\rm B}} & =35\,\mathrm T^{0.9469} \tag{Ex-06.1}\\ y_{_{\rm B}} & =-15\,\mathrm T^{0.9469}\!+\!10 \tag{Ex-06.2} \end{align} \begin{align} x_{_{\rm BA}} & =35\,\mathrm T^{0.9469}\!-\!30\,\mathrm T \tag{Ex-07.1}\\ y_{_{\rm BA}} & = -15\,\mathrm T^{0.9469}\!-\!20\,\mathrm T\!+\! 10 \tag{Ex-07.2} \end{align} Equations (Ex-05),(Ex-06) and (Ex-07) are shown graphically in the Figure below.

Video here : What is the equation of relative motion

There are two objects that are moving in a straight line. The parametric equation for the first may be:

$\vec x = \vec a + t \vec b$

The equation for the second may be:

$\vec y = \vec p + t \vec q$

The relative position from $\vec y$ watched from the point $\vec x$ is:

$$\bbox[5px,border:2px solid red] { \vec r = \vec y - \vec x = ( \vec p - \vec a ) + t ( \vec q - \vec b ) }$$

The second object watched from the first object moves in a straight line. If both objects are moving in a plane, we can multiply the last equation by the normal vector to $\vec q - \vec b$ and the result is the cartesian equation of the movement:

$$\bbox[5px,border:2px solid red] { \vec n\cdot ( \vec r - \vec p + \vec a ) = 0 }$$

We first rewrite the velocities of the boats so that they're in terms of knots.

Currently, we have written: $$(x_A,y_A) = (30t, 20t)$$ $$(x_B,y_B) = (35t, 10-15t)$$ So that the velocities are $$\vec{v_A} = (30, \;\;\;\;\;20)$$ $$\vec{v_B} = (35, \;\;-15)$$ We need to rescale them so that $\vert \vec{v_A} \vert= 10$ and $\vert \vec{v_B} \vert= 9$ as posed in the question. $$\vec{v_A} \mapsto 10 \;\hat{\vec v}_A = \frac{10}{\sqrt{30^2 + 20^2}} (30, 20) \quad = \quad \frac{10}{\sqrt{13}}\left(3, 2 \right)$$ $$\vec{v_B} \mapsto 9 \;\hat{\vec v}_B = \frac{9}{\sqrt{35^2 + 15^2}} (35, -15) \quad = \quad \frac 9 {\sqrt{58}} (7, -3)$$ There. Now the velocities are written so that their time derivatives $d/\mathrm{d}\,t$ give the speed in knots as desired.

The relative velocity is given simply by the velocity of $A$ subtracted from the velocity of $B$: $$\vec{v_{B\mathbf r A}} = \left( \left( \frac{63}{\sqrt{58}}-\frac{30}{\sqrt{13}} \right), \quad \left( -\frac{27}{\sqrt{58}} - \frac{20}{\sqrt{13}} \right) \right) \; \mathrm{knots}$$ Note that the translation of coordinates doesn't affect relative velocity.

That the relative velocity is given by this subtraction of velocities follows from the linearity of the derivative operator, and the equation for relative velocity: $$\vec v_{B \mathbf r A} = \frac{d}{dt} \big((x_B,y_B) - (x_A,y_A)\big)$$

You can use distance formula. Let $(x_1, y_1)$ be coordinates of A at $t$ and $(x_2, y_2)$ be coordinates at $t$. Then by distance between this two can be, (Sorry for inconvenience in reading)

$(x_1 - x_2)^2 + (y_1 - y_2)^2 = 1250 t^2 + 1000 + 4035t$

• -1: how does this answer the question?
– Styg
Commented Dec 23, 2017 at 11:46