<p>I'm assuming you're talking about <em>physical</em> distances (as opposed to any of the other <a href="https://en.wikipedia.org/wiki/Distance_measures_(cosmology)" rel="noreferrer">distance measures in cosmology</a>).</p>

<p>The comoving distance to a galaxy at redshift <span class="math-container">$z$</span> is
<span class="math-container">$$
d_C(z) = \frac{c}{H_0}\int_0^z 
         \frac{dz}{\sqrt{
         \Omega_r(1+z)^4 + 
         \Omega_m(1+z)^3 + 
         \Omega_k(1+z)^2 + 
         \Omega_\Lambda
         }},
$$</span>
where <span class="math-container">$c$</span> and <span class="math-container">$H_0$</span> are the speed of light and the Hubble parameter, and
<span class="math-container">$\{\Omega_r,\Omega_m,\Omega_k,\Omega_\Lambda\}$</span> <span class="math-container">$\simeq$</span> <span class="math-container">$\{\lt 10^{-4},0.3,0,0.7\}$</span>
are the radiation, matter, curvature, and dark energy density parameters, respectively.</p>

<p>By definition, the comoving and the physical distance <span class="math-container">$d_P$</span> coincide today, but at the time a galaxy at <span class="math-container">$z$</span> emitted the light we see today, it was at
<span class="math-container">$$
d_P = \frac{d_C}{1+z}.
$$</span></p>

<p>In your example, <span class="math-container">$z_A = 6$</span>, and <span class="math-container">$z_B = 0.5$</span>. The comoving distance to galaxy <span class="math-container">$B$</span> is, from the equation above and with a <a href="https://arxiv.org/abs/1502.01589" rel="noreferrer">Planck Collaboration et al. (2016)</a> cosmology, <span class="math-container">$1946\,\mathrm{Mpc}$</span> away. Hence, when <span class="math-container">$A$</span> emitted the light we see today, its physical distance was a factor <span class="math-container">$(1+6)$</span> smaller, i.e. <span class="math-container">$278\,\mathrm{Mpc}$</span>.</p>

<hr>

<p>In Python, with astropy:</p>

<pre><code>from astropy.cosmology import Planck15
from astropy import units as u
zA,zB      = 6,.5
dC_B       = Planck15.comoving_distance(zB)
dP_B_at_zA = dC_B / (1+zA)
print(dC_B)
   -&gt; 1945.5612969107992 Mpc
print(dP_B_at_zA)
   -&gt; 277.93732813011417 Mpc
print(dP_B_at_zA.to(u.Mlyr)) # convert to light-years
   -&gt; 906.5103217447773 Mlyr
</code></pre>

CC BY-SA 4.0
2020-03-23T02:34:43.203Z
Thanks for your answer, I am really appercaite your help. However, i still have some quesitons, do I need to know the hubble constant at z=6? to solve this question, can i calculate the recession velocity of B galaxy at z=6, and then calculate the distance by divde the recession velocity of B by hubble constant at z=6?
Stargazer
CC BY-SA 4.0
2020-03-23T11:27:03.633Z
@Stargazer You only need to know the Hubble parameter at $z_A = 6$ if you also want to know the distance to $A$. Your approach is sort of one step forward, and one step back: To calculate the recession velocity of $B$ at $z=6$, you must first calculate its physical distance $d_{P,B}(z=6)$, and then multiply by $H(z=6)$. Then you divide by $H$ again to get back to $d_{P,B}$
pela
CC BY-SA 4.0
2020-03-23T22:15:39.103Z
@Stargazer Sorry, I wrote a slight mistake/confusion: You don't really need to know the Hubble parameter at $z=6$ to know the distance. But in effect you do calculate it, since that is really what the denominator in the integral is (that square-root is sometimes written $\sqrt{\cdots} \equiv E(z)$, and $H(z) = H_0 E(z)$).
pela
CC BY-SA 4.0
2020-03-24T00:28:28.667Z
Thank you very much, i know it now.
Stargazer
CC BY-SA 4.0
2020-03-23T00:04:32.127Z
2020-03-23T00:04:32.127Z
pela
<p>for example, assume there is a high redshift galaxy called "A" with z=6, so how to calculate the distance between us and another galaxy B when the light left the galaxy A?</p>

<p>For example, say B has a redshift of 0.5, and let's assume when the light emitted from A, us and B both exist.</p>

CC BY-SA 4.0
2020-03-22T22:14:49.387Z
How far is B from us now? (for example)
James K
CC BY-SA 4.0
2020-03-22T22:35:43.627Z
for example, B has redshift of 0.5, but lets assume when the light emitted from A, us and B both exists
Stargazer
<star><astrophysics><redshift><positional-astronomy><galaxy-cluster>
how to calculate distance between galaxies in the distant past
Stargazer
# how to calculate distance between galaxies in the distant past

(Asked by: username_0 on 2020-03-22)

for example, assume there is a high redshift galaxy called "A" with z=6, so how to calculate the distance between us and another galaxy B when the light left the galaxy A?

For example, say B has a redshift of 0.5, and let's assume when the light emitted from A, us and B both exist.

**Tags:** star, astrophysics, redshift, positional-astronomy, galaxy-cluster
> **Comments:**
> **username_1**: How far is B from us now? (for example)  
> **username_0**: for example, B has redshift of 0.5, but lets assume when the light emitted from A, us and B both exists  

---

## 1 answers

### Answer by username_2 on 2020-03-23. Score: 6 | Accepted answer

I'm assuming you're talking about physical distances (as opposed to any of the other distance measures in cosmology).
The comoving distance to a galaxy at redshift $z$ is
$$
d_C(z) = \frac{c}{H_0}\int_0^z 
         \frac{dz}{\sqrt{
         \Omega_r(1+z)^4 + 
         \Omega_m(1+z)^3 + 
         \Omega_k(1+z)^2 + 
         \Omega_\Lambda
         }},
$$
where $c$ and $H_0$ are the speed of light and the Hubble parameter, and
$\{\Omega_r,\Omega_m,\Omega_k,\Omega_\Lambda\}$ $\simeq$ $\{\lt 10^{-4},0.3,0,0.7\}$
are the radiation, matter, curvature, and dark energy density parameters, respectively.
By definition, the comoving and the physical distance $d_P$ coincide today, but at the time a galaxy at $z$ emitted the light we see today, it was at
$$
d_P = \frac{d_C}{1+z}.
$$
In your example, $z_A = 6$, and $z_B = 0.5$. The comoving distance to galaxy $B$ is, from the equation above and with a Planck Collaboration et al. (2016) cosmology, $1946\,\mathrm{Mpc}$ away. Hence, when $A$ emitted the light we see today, its physical distance was a factor $(1+6)$ smaller, i.e. $278\,\mathrm{Mpc}$.

In Python, with astropy:
from astropy.cosmology import Planck15
from astropy import units as u
zA,zB      = 6,.5
dC_B       = Planck15.comoving_distance(zB)
dP_B_at_zA = dC_B / (1+zA)
print(dC_B)
   -> 1945.5612969107992 Mpc
print(dP_B_at_zA)
   -> 277.93732813011417 Mpc
print(dP_B_at_zA.to(u.Mlyr)) # convert to light-years
   -> 906.5103217447773 Mlyr

> **Comments:**
> **username_0**: Thanks for your answer, I am really appercaite your help. However, i still have some quesitons, do I need to know the hubble constant at z=6? to solve this question, can i calculate the recession velocity of B galaxy at z=6, and then calculate the distance by divde the recession velocity of B by hubble constant at z=6?  
> **username_2**: @Stargazer You only need to know the Hubble parameter at $z_A = 6$ if you also want to know the distance to $A$. Your approach is sort of one step forward, and one step back: To calculate the recession velocity of $B$ at $z=6$, you must first calculate its physical distance $d_{P,B}(z=6)$, and then multiply by $H(z=6)$. Then you divide by $H$ again to get back to $d_{P,B}$  
> **username_2**: @Stargazer Sorry, I wrote a slight mistake/confusion: You don't really need to know the Hubble parameter at $z=6$ to know the distance. But in effect you do calculate it, since that is really what the denominator in the integral is (that square-root is sometimes written $\sqrt{\cdots} \equiv E(z)$, and $H(z) = H_0 E(z)$).  
> **username_0**: Thank you very much, i know it now.  

---

