Main

RR Lyrae stars simultaneously pulsating at two different periods are classified as double-mode RR Lyr (RRd) stars. The majority of them are classical RRd stars, characterized by the presence of the radial fundamental and first-overtone modes, where the first-overtone mode is usually the dominant mode. The default RRd stars in this paper are the classical RRd stars. We collected 1,021 Galactic RRd stars from Gaia Data Release 3 (DR3)1 and 2,083 and 674 RRd stars belonging to the Large Magellanic Cloud (LMC) and the Small Magellanic Cloud (SMC) from the Optical Gravitational Lensing Experiment (OGLE) database2, and plotted the period–period ratio diagram (Petersen diagram3) (Fig. 1a,c). At each period, the RRd stars in different galaxies have a consistent period ratio distribution. Theory4,5 and observations6,7 suggest that metal-rich RRd stars have a shorter fundamental period (PF) and a smaller period ratio (P1O/PF, where P1O is the first-overtone period) when compared with metal-poor RRd stars. We found that SMC RRd stars have longer mean periods and larger mean period ratios than the LMC and Galactic RRd stars (Extended Data Fig. 1). Alternatively, the distribution of periods and period ratios of LMC and Galactic RRd stars is wider.

Fig. 1: Period ratio–period diagram (Petersen diagram), period ratio–metallicity diagram and period–metallicity diagram.
figure 1

a, The loci of the SMC and LMC RRd stars on the Petersen diagram. 207 and 96 RRd stars with SDSS and LAMOST metallicities are also shown. b, The period ratio–metallicity relations for RRd stars based on SDSS and LAMOST metallicities. The best-fit lines are in the respective colours. The black stars in bd show the grid points of theoretical models from ref. 5. c, On the Petersen diagram, the RRd stars are represented by solid circles of different colours according to their SDSS metallicities. The Milky Way’s RRd stars are indicated by grey dots as the background. The fitted equal-metallicity lines are represented by different solid lines, and the colours are kept consistent with the colour bar. The theoretical models5 of the three different metallicities are represented by dotted, dashed and dot–dashed lines. d, Period–metallicity diagram. Symbols as in b.

We cross-matched Gaia DR3’s RRd stars with all available spectroscopic observations and found 68 and 32 with metallicities from the Sloan Digital Sky Survey8 (SDSS) and the Large Sky Area Multi-Object Fiber Spectroscopic Telescope9 (LAMOST), respectively. On the basis of the Zwicky Transient Facility (ZTF) DR14 photometry, we additionally discovered twice the number of RRd stars that have spectral parameters. Our final sample contains 207 and 96 RRd stars with metallicity measurements from SDSS and LAMOST, respectively. These metallicities were measured from low-resolution spectra (R ≈ 2,000) with an external error of 0.13–0.19 dex. For either the SDSS or LAMOST metallicities, we found an intuitive linear relationship between the metallicity and the period ratio (Fig. 1b) or period (Fig. 1d). The best-fit period–period ratio–metallicity relations are shown in equation (1). σ is the dispersion of the relations, while R2 is the coefficient of determination. The use of logarithmic period ratios and periods facilitates comparison with theoretical results. We also adopted a mean period ratio of 0.745 and a mean period of 0.37 d as the zero point so that the intercept can directly present the metallicity. The relations for SDSS and LAMOST RRd stars are consistent with each other if uncertainties are taken into account. The main contribution of dispersion is the metallicity uncertainty of the low-resolution spectra. When we selected a better sample on the basis of the internal error of metallicity, the dispersion of the period–period ratio–metallicity relation gradually decreased as the criterion became tighter. The best case was when limiting σ[Fe/H] < 0.04 dex: on the basis of 56 SDSS RRds, we obtained a dispersion of 0.13 dex. By error comparison (also see Methods), we found that the metallicity estimated using the period and the period ratio of RRd stars can be as accurate as the low-resolution spectra. The subsequent discussions in this Article are based on the SDSS RRd stars, considering the larger number and the smaller metallicity uncertainty.

$$\begin{array}{ll}{\left[{{{\rm{Fe}}}}/{{{\rm{H}}}}\right]}_{{{{\rm{SDSS}}}}}=-(173\pm 38)\left(\log \frac{{P}_{1{{{\rm{O}}}}}}{{P}_{{{{\rm{F}}}}}}-\log 0.745\right)\\\qquad\qquad\qquad\quad\;-(6.62\pm 0.88)(\log {P}_{1{{{\rm{O}}}}}-\log 0.37)\\\qquad\qquad\qquad\quad\;-(1.76\pm 0.01),\sigma =0.16\,{{{\rm{dex}}}},{R}^{2}=0.74,\\ {\left[{{{\rm{Fe}}}}/{{{\rm{H}}}}\right]}_{{{{\rm{LAMOST}}}}}=-(184\pm 70)\left(\log \frac{{P}_{1{{{\rm{O}}}}}}{{P}_{{{{\rm{F}}}}}}-\log 0.745\right)\\\qquad\qquad\qquad\quad\;-(5.69\pm 1.50)(\log {P}_{1{{{\rm{O}}}}}-\log 0.37)\\\qquad\qquad\qquad\quad\;-(1.68\pm 0.03),\sigma =0.21\,{{{\rm{dex}}}},{R}^{2}=0.60.\\ \end{array}$$
(1)

Due to an approximate linear correlation (R2 = 0.70) between period and period ratio, the period–period ratio–metallicity relation can be simplified to the period–metallicity relation or period ratio–metallicity relation. The dispersion of the linear relation between log PF and log(P1O/PF) is \({\sigma }_{\log {P}_{1{{{\rm{O}}}}}/{P}_{{{{\rm{F}}}}}}=0.0003\) (corresponding to a metallicity dispersion of 0.05 dex from equation (1)). In terms of accuracy, the period–metallicity relation is closer to the period–period ratio–metallicity relation. Equation (2) shows the determined period–metallicity relations for SDSS RRd stars, using the same sample as equation (1). These relations are important for the optimization of the theoretical model and the use of RRd stars for high-precision distance measurements. In Fig. 1, we compared our relations with the theoretical model of RRd stars5. Here we assumed that the metal abundance of the Sun is Z = 0.019 and that all heavy elements vary by the same factor in different RRd stars. The black star symbols are seven theoretical grid points (zero-age horizontal branch luminosity level) located near the observed sequences on the Petersen diagram. The general trends of theoretical grid points and observed period ratio–metallicity relations (Fig. 1b) and period–metallicity relations (Fig. 1d) are consistent. However, the uncertainty of the period ratio calculated using the nonlinear pulsation theory (Fig. 1b) is one to two orders of magnitude larger than that of the observations (\({\sigma }_{{P}_{1{{{\rm{O}}}}}/{P}_{{{{\rm{F}}}}}}=2\times 1{0}^{-5}\)). In Fig. 1c, we also compared the theoretical (black lines) and observed (coloured lines) equal-metallicity lines on the Petersen diagram. The lines for [Fe/H] = −1.5 dex and −1.8 dex are in perfect agreement, but the theoretical line for [Fe/H] = −1.28 dex corresponds to a smaller period ratio. We suspect that the possible reason for the discrepancy is the enhanced mass of the metal-rich RRd stars. Mass enhancement leads to an increase in the period ratio and a moderate decrease in the fundamental period7,10. Our observed period–period ratio–metallicity relation may help to optimize the theoretical models, mainly at the metal-rich and metal-poor ends, and the accuracy of the period ratios. Once the theoretical model can predict the period–period ratio–metallicity relation well, it can also predict the period–luminosity relation (PLR) of RRd stars.

$$\begin{array}{l}{\left[{{{\rm{Fe}}}}/{{{\rm{H}}}}\right]}_{{{{\rm{SDSS}}}}}=(-10.33\pm 0.47)\log {P}_{{{{\rm{F}}}}}+(-4.87\pm 0.14),\\\qquad\qquad\qquad\sigma =0.17\,{{{\rm{dex}}}},{R}^{2}=0.71,\\ {\left[{{{\rm{Fe}}}}/{{{\rm{H}}}}\right]}_{{{{\rm{SDSS}}}}}=(-10.15\pm 0.46)\log {P}_{1{{{\rm{O}}}}}+(-6.11\pm 0.19),\\\qquad\qquad\qquad\sigma =0.17\,{{{\rm{dex}}}},{R}^{2}=0.71.\end{array}$$
(2)

Fundamental-mode (RRab) and first-overtone-mode (RRc) RR Lyr stars satisfy the period–metallicity–luminosity (PLZ) relations M = a0 + a1 log P + a2[Fe/H] in observations. In the optical band, these PLZ relations can be simplified to the metallicity–luminosity relations11. These relations can be predicted theoretically by combining the horizontal-branch evolutionary model and the pulsation model5. The two periods of RRd stars also satisfy the PLZ relation of RRab stars and RRc stars, respectively. Combining the period–period ratio–metallicity relation, we obtained M = b0 + b1 log P1O + b2 log(P1O/PF). Due to the approximate linear correlation between log P1O and log(P1O/PF), the relation can be simplified to M = c0 + c1 log P1O or M = d0 + d1 log PF. The reasons why we prefer to use the PLR rather than the period–period ratio–luminosity relation are discussed in Methods. We used the LMC RRd stars from the OGLE database12 to determine their PLRs. Since the distance of each RRd star with respect to the LMC mid-plane is non-negligible, using about 2,000 RRd stars avoids the bias due to incompleteness. We adopted Wesenheit magnitude13 to reduce the effect of extinction, that is, WVI = I − 1.55(V − I). As for the Gaia passbands, the Wesenheit magnitude is WG,BP,RP = G − 1.90(BP − RP) (ref. 14). The determined MW–log P relations are shown in equation (3) and Fig. 2a. DMLMC is the distance modulus of LMC. Since the primary period of an RRd star is the first-overtone period, it is preferable to use the first-overtone period to calculate the absolute magnitude, especially if the second period cannot be measured accurately. Nevertheless, the difference between the absolute magnitudes estimated using PF and P1O is negligible for Gaia or OGLE RRd stars (0.000 ± 0.001 mag).

$$\begin{array}{ll}{M}_{{W}_{VI}}=(-4.523\pm 0.156)\log {P}_{{{{\rm{F}}}}}+(16.620\pm 0.048)\\\qquad\qquad\quad\;-{{{{\rm{DM}}}}}_{{{{\rm{LMC}}}}},\sigma =0.132\,{{{\rm{mag}}}},\\ {M}_{{W}_{VI}}=(-4.434\pm 0.153)\log {P}_{1{{{\rm{O}}}}}+(16.079\pm 0.067)\\\qquad\qquad\quad\;-{{{{\rm{DM}}}}}_{{{{\rm{LMC}}}}},\sigma =0.132\,{{{\rm{mag}}}},\\ {M}_{{W}_{G,BP,RP}}=(-3.623\pm 0.229)\log {P}_{{{{\rm{F}}}}}+(17.042\pm 0.071)\\\qquad\qquad\quad\;-{{{{\rm{DM}}}}}_{{{{\rm{LMC}}}}},\sigma =0.159\,{{{\rm{mag}}}},\\ {M}_{{W}_{G,BP,RP}}=(-3.557\pm 0.225)\log {P}_{1{{{\rm{O}}}}}+(16.606\pm 0.098)\\\qquad\qquad\quad\;-{{{{\rm{DM}}}}}_{{{{\rm{LMC}}}}},\sigma =0.159\,{{{\rm{mag}}}}.\end{array}$$
(3)
Fig. 2: PLR and metallicity dependence examination for RRd stars.
figure 2

a, WVI–log P1O PLR based on LMC RRd stars. The light-grey dots indicate the positions of LMC RRd stars, and the blue solid line is the best-fit PLR. The residual plot is shown at the bottom. b,c, The effect of metallicity on PLR residual ΔWVI is examined using LMC (b) and SMC (c) RRd stars. The blue filled circles indicate the mean residual of each 100 RRd stars, binned in order of the metallicity. d, The effect of metallicity on the zero point of the WG,BP.RP–log P1O PLR is examined using the Milky Way’s RRd stars (light-grey dots) with good Gaia DR3 parallaxes. The PLR zero point is converted into parallax ϖPL by assuming a DMLMC of 18.48 mag. The blue filled circles denote the mean values of each ten RRd stars, binned in order of the metallicity. The red error bars in bd denote the 1σ in each bin. All of bd show that RRd stars’ PLRs are not dependent on metallicity.

In addition to the theoretical derivation, there is direct observational evidence showing that the PLR of RRd stars is independent of metallicity. The most direct evidence is that the PLR of RRd stars can be derived from the PLZ relation of RRab or RRc stars by simply using the period–metallicity relation of RRd stars to remove the metallicity dependence.

LMC RR Lyr stars from the OGLE database were used here. We took RRc stars as an example and determined their PLR as \({M}_{{W}_{VI}}=(-3.14\pm 0.03)\log {P}_{1{{{\rm{O}}}}}+(16.66\pm 0.01)\) \({-{{{{\rm{DM}}}}}_{{{{\rm{LMC}}}}},\sigma =0.136}\) mag. The slope and intercept of RRc stars’ PLR are very different from those of RRd stars (equation (3)). We then added a metallicity-dependent term +0.13([Fe/H] + 1.64) to the PLR of RRc stars, where 0.13 originates from theoretical calculations5 and −1.64 ± 0.20 dex is the mean metallicity of LMC RRd stars (calculated using equation (1)). Here we assumed that RRc stars and RRd stars have the same mean metallicity. In the Milky Way, the mean metallicities of RRab, RRc and RRd stars are −1.50 ± 0.37 dex, −1.62 ± 0.42 dex and −1.71 ± 0.32 dex, respectively, on the basis of the Gaia DR3 RR Lyr sample and the SDSS metallicities. The mean metallicity differences between RRd stars and RRab, RRc stars are in the range of 0.1–0.2 dex, and these differences have been considered since we used an error of 0.2 dex for the mean metallicity of RRd stars. This metallicity difference causes a 0.01–0.03 mag change in the zero point of the PLR, but does not affect the slope. Combining the period–metallicity relation of RRd stars, we obtained the PLR as \({M}_{{W}_{VI}}=(-4.46\pm 0.07)\log {P}_{1{{{\rm{O}}}}}+(16.08\pm 0.04)-{{{{\rm{DM}}}}}_{{{{\rm{LMC}}}}}\), which is exactly consistent with the PLR of RRd stars. Similarly, we used RRab stars5,15 to obtain the PLR of the fundamental mode as \({M}_{{W}_{VI}}=(-4.58\pm 0.07)\log {P}_{{{{\rm{F}}}}}+(16.67\pm 0.04)-{{{{\rm{DM}}}}}_{{{{\rm{LMC}}}}}\). If we consider the coefficient difference in the logarithmic periods between the two PLRs as the possible remaining metallicity dependence of the PLRs, the results are \({{\Delta }}{M}_{{W}_{VI}}=(0.003\pm 0.017){{{\rm{[Fe/H]}}}}\) and \({{\Delta }}{M}_{{W}_{VI}}=(0.006\pm 0.017){{{\rm{[Fe/H]}}}}\) for PLRs based on the first-overtone and fundamental period, which are negligible. These consistencies indicate that calculating the luminosity using the PLR of RRd stars is equivalent to calculating the luminosity using the PLZ relation of RRab or RRc stars. In turn, the period–metallicity relation of RRd stars can be determined by combining the PLZ relations of RRab or RRc stars with the PLR of RRd stars, even without knowing the metallicity of any RRd stars (Methods). This means that RRd stars are RRab or RRc stars that satisfy the period–metallicity relation.

We estimated the metallicity of RRd stars from the period–period ratio–metallicity relation (equation (1)) and checked the correlation between the magnitude residual of the PLR and the metallicity for LMC, SMC and Galactic RRd stars separately. Note that this metallicity is not a completely independent measurement, but it can be used to check whether the period ratio affects the PLR through metallicity. For LMC and SMC, we binned RRd stars in order of metallicity, with a bin size of 100. This bin size allows us to detect deviations as low as 0.01 mag. We then fixed the slope of the PLR and calculated the mean magnitude residual ΔWVI = WVI − WVI,PL in each bin separately. In both LMC and SMC, we found that the correlation between the magnitude residual of the PLR and the metallicity is less than 0.03 mag dex−1 (Fig. 2b,c).

We estimated the PLR distances of 126 Galactic RRd stars with good Gaia DR316 parallaxes (ϖ > 0, σϖ/ϖ < 0.25, WG,BP,RP < 14 mag and renormalized unit weight error (RUWE) < 1.4, ϖ denotes the Gaia DR3 parallax) by assuming a DMLMC of 18.48 mag (ref. 17). The PLR distances were converted to parallaxes and we compared them with the Gaia DR3-corrected parallaxes ϖcorr (ref. 18). The mean error of Gaia parallax for this sample is 12%. We found that the difference between the two parallaxes zp = ϖ − ϖPL shows no correlation with metallicities (Fig. 2d). The mean parallax offset is zp = 8.3 ± 2.5 ± 2.6 μas. The statistical error is the s.d. divided by the root of the sample size, while the systematic error is propagated from the distance uncertainty (1.1%) of LMC. This parallax offset agrees well with the result determined for classical Cepheids (zp = 14 ± 6 μas; ref. 19), contact binaries (zp = 4.2 ± 1.9 μas; ref. 20) and red giants (zp = 15 ± 5 μas; ref. 21).

As a distance tracer, we used both the LMC distance and Gaia parallaxes to optimize the PLR of RRd stars. The PLR can then be used to determine the distances of distant galaxies or dwarf galaxies. The Gaia parallaxes can also provide an independent constraint for the PLR zero point of RRd stars. On the basis of the method of ref. 19, we used nonlinear least squares to fit equation (4). We fixed the slope of PLR, a0 = − 3.557 ± 0.225 (equation (3)), and determined \({a}_{1}={M}_{{W}_{G,BP,RP}}({P}_{1{{{\rm{O}}}}}=0.37\,{{{\rm{d}}}})=-0.388\pm 0.051\) mag and zp = 13.4 ± 5.8 μas. On the basis of the RRd stars with different parallaxes, the degeneracy of these two parameters is largely broken. On the basis of this PLR, the determined DMLMC is 18.530 ± 0.051 mag. By calculating the weighted average of the PLR zero points determined on the basis of the Gaia parallax and the LMC distance (\({M}_{{W}_{G,BP,RP}}({P}_{1{{{\rm{O}}}}}=0.37\,{{{\rm{d}}}})=-0.338\pm 0.024\) mag), we obtained the final zero points of PLRs as \({M}_{{W}_{G,BP,RP}}({P}_{1{{{\rm{O}}}}}=0.37\,{{{\rm{d}}}})=-0.348\pm 0.022\) mag and \({M}_{{W}_{VI}}({P}_{1{{{\rm{O}}}}}=0.37\,{{{\rm{d}}}})=-0.496\pm 0.022\) mag (1.0% distance uncertainty). On the basis of 617 SMC RRd stars, the determined distance modulus and average metallicity are DMSMC = 18.913 ± 0.007 ± 0.022 mag (60.62 ± 0.64 kpc) and [Fe/H] = −1.87 ± 0.19 dex. Due to the existence of non-negligible irregular spatial structure of the SMC22,23, the actual error of the average distance will be larger. The metallicity dispersion of SMC RRd stars is smaller than that of the LMC (0.21) and the Milky Way (0.24).

$${\varpi }_{{{{\rm{corr}}}}}=1{0}^{-(0.2\times ({W}_{G,BP,RP}-{a}_{0}(\log {P}_{1{{{\rm{O}}}}}-\log 0.37)-{a}_{1})-2)}+{{{\rm{zp}}}}.$$
(4)

In contrast to RRab stars, distance measurements based on RRd stars are no longer affected by metallicities. The difficult-to-measure metallicity is replaced by an easy-to-measure period. In addition, RRd stars can provide the metallicity distribution of the galaxy’s old populations to help with RRab stars’ distance measurements. This is crucial because for most galaxies we cannot directly measure the metallicities of RRab stars. RRab stars’ metallicities are also difficult to infer from the average metallicity of the host galaxy. Although the metallicity of an RRab star can be obtained indirectly from the light-curve shape through the parameter ϕ31 (ref. 24), this requires high-precision and high-sampling data, otherwise the prevalence of light-curve modulation in RRab will make ϕ31 measurements inaccurate. In the Gaia DR3 RR Lyr sample, the ϕ31-based metallicity error (only propagation error) is nearly 50 times larger than the (P1O, P1O/PF)-based metallicity error for the same number of epochs (Extended Data Fig. 2). Moreover, optimizing the L(RRab) = f(P, ϕ31) relationship still requires more work because the value of ϕ31 is different in different bands. In contrast, RRd stars require only periods to estimate distances, which not only is convenient but also reduces systematic biases. The metallicity effect introduces a systematic error of about 1.8% to the RRab star-based distance measurements25. The metallicity effect and the PLR zero point are the two most significant components of the systematic error in distance measurements of RR Lyr stars and Cepheids. We calculated the root sum square of these two errors and call it the base systematic error. The base systematic error is the lower limit error of the tracer in distance measurement, so it can be used as a criterion to evaluate the goodness of the distance tracer. When using RRab and RRd stars to measure the distances of galaxies or dwarf galaxies, the base systematic errors are \(\sqrt{1.8{ \% }^{2}+1.0{ \% }^{2}}=2.1 \%\) and \(\sqrt{0.0{ \% }^{2}+1.0{ \% }^{2}}=1.0 \%\). In contrast to classical Cepheids, distance measurements based on RRd stars avoid the effects of metallicity and binarity. The fraction of RR Lyr stars in a binary system is as low as 7% (ref. 26). Cepheid pulsations in both fundamental and first-overtone modes were also found to fulfil a period ratio–metallicity relation27. However, the smaller number (95 in LMC) and the larger dispersion on the Petersen diagram limit the application of these Cepheids in distance measurements. The dispersion of the period ratios on the basis of the quadratic curve fit is 0.0004 (RRd stars) and 0.0043 (Cepheids with F/1O modes).

We used RRd stars to study four globular clusters, IC 4499, M15, M3 and M68, and a dwarf galaxy, Sculptor, as examples. IC 4499, M15 and Sculptor are the three targets in the Gaia DR3 RR Lyr catalogue with more than five RRd stars, with numbers of 11, 6 and 40, respectively. M3 and M68 contain 7 and 9 RRd stars with periods and VI mean magnitude information from the literature28,29. The determined distances and metallicities based on RRd stars agree well with previous works25,30,31 in 1σ and 2σ (Fig. 3), except for M15’s metallicity (2.9σ) if we consider a metallicity uncertainty of 0.05 dex in the literature. Our overall distance uncertainty is at the level of 2–3% for globular clusters. The distance error of these four globular clusters determined by the different works is typically around 5%, while the best distance error is around 2–3% (ref. 32). The independent distances provided by RRd stars can help to optimize the average distances obtained by combining different methods. The advantage is that it has a base systematic error of only 1%. When combined with other distances (especially photometric distances), more components of the error can be eliminated. The metallicity scatters of RRd stars in globular clusters and the dwarf galaxy Sculptor are about 0.05–0.08 dex and 0.16 dex. Note that dispersion smaller than 0.16 dex may be unrealistic, and here it is certain that the dispersion of the period and the period ratio of RRd stars is much smaller in globular clusters than in dwarf galaxies.

Fig. 3: Metallicity and DM determination based on RRd stars.
figure 3

The different coloured dots indicate individual metallicity and DM determinations based on RRd stars in IC 4499, Sculptor, M15, M3 and M68. The mean values of RRd stars in five targets are shown as squares, and the 1σ internal errors are added. Filled stars indicate the parameters of the four globular clusters, from the Harris globular cluster catalogue. Squares and stars are colour coded the same as the dots. To make the figure clearer, the DM of IC 4499 is reduced by 1.0 mag, that of Sculptor is reduced by 3.5 mag and that of M15 is increased by 0.5 mag.

For Sculptor, there are two groups of RRd stars with [Fe/H] = −1.59 ± 0.06 dex and [Fe/H] = −1.96 ± 0.09 dex, respectively. This is consistent with the bimodal distribution of metallicity inferred on the basis of the horizontal branching discontinuity and the double red giant branch bumps31. The average metallicities of Sculptor based on 107 RR Lyr stars33 are −1.83 ± 0.26 dex (on the scale of ref. 34) and −1.64 ± 0.27 dex (on the scale of ref. 35), the latter being more consistent with our average metallicity, − 1.67 ± 0.16 dex. There are six RRd stars among these RR Lyr stars. We found that our metallicity measurements are also consistent with the literature, with deviations of −0.13 ± 0.25 dex and 0.07 ± 0.26 dex for two different scales. The determined DM of Sculptor is 19.51 ± 0.03 ± 0.02 mag (79.86 ± 1.46 kpc). We find that the mean metallicities of IC 4499 and M15 are [Fe/H] = −1.60 ± 0.05 dex and [Fe/H] = −2.10 ± 0.08 dex. Our M15 metallicity is 0.27 dex higher than that in the literature, but the deviation is still within 3σ. The reason for the overestimation may be that the metallicity [Fe/H] = −2.37 has reached the metal-poor end of our period–period ratio–metallicity relation. The determined distance moduli are DMIC 4499 = 16.36 ± 0.05 ± 0.03 mag (18.66 ± 0.49 kpc) and DMM15 = 15.04 ± 0.06 ± 0.02 mag (10.19 ± 0.32 kpc).

The period ratios of RRd stars in M3 and M68 are not accurate enough to be used to determine metallicities. We adopted the first-overtone period and converted it to the period ratio based on an empirical quadratic function (equation (5) in Methods). Metallicity is then determined using equation (1). Metallicities of M3 and M68 are [Fe/H] = −1.53 ± 0.06 dex and [Fe/H] = −2.06 ± 0.07 dex. Note that four M3 RRd stars are not classical RRd stars, and we excluded them in determining metallicity and distance (Methods and discussion in ref. 28). The determined distance moduli are DMM3 = 15.00 ± 0.08 ± 0.02 mag (9.99 ± 0.37 kpc) and DMM68 = 15.04 ± 0.04 ± 0.02 mag (10.20 ± 0.21 kpc).

The percentage of RRd stars in RR Lyr is 10%, 5% and ~3% in SMC, LMC and the Milky Way halo, respectively. With the continued observations of the ZTF, OGLE and Gaia, the number of RRd stars observed in the Milky Way will increase by ~4,000 in the next few years. To date, there are at least 22 galaxies or dwarf galaxies with more than 100 RR Lyr stars36, all of which are suitable for distance (1–2% accuracy) and metallicity measurements using RRd stars. With RRd star PLRs determined for the Dark Energy Camera and the Hubble Space Telescope, RRd stars can trace distances and metallicities to 300 kpc and 1 Mpc. With the future China Space Station Telescope and the Vera C. Rubin Observatory Legacy Survey of Space and Time, RRd stars will provide an independent distance ladder for the near-field universe to examine the distance ladder based on the classical Cepheids37 or the tip of the red giant branch38.

Methods

RRd sample

To obtain a larger sample of RRd stars with metallicities, we used the light curve of ZTF DR14 to help identify them. We targeted on RRab or RRc stars in Gaia DR3 with SDSS or LAMOST metallicity, which may not be classified as RRd stars due to insufficient photometry. In analysing the ZTF light curve, we used the Lomb–Scargle algorithm39,40 to obtain the primary period and then fitted the light curve using a sixth-order Fourier function41. Then we used the Lomb–Scargle algorithm on the residual light curve after pre-whitening with the primary period to obtain the second period. Only periods with low false-alarm probability of <0.001 were considered to be real periods. We also excluded periods with light-variation amplitudes less than 0.03 mag to avoid false signals or non-classical RRd stars. Candidates with period ratios between 0.72 and 0.76 were finally selected as RRd stars, and we found that all of these RRd stars have period ratios between 0.741 and 0.748 (Fig. 1c). In this way, we found 186 RRd stars with metallicity. We also found 17 RRd stars that were not classified as RR Lyr by Gaia DR3, but were classified as RR Lyr in the ZTF periodic variable catalogue41. The final sample size of RRd stars we used to determine the period–period ratio–metallicity relation was 303. 55 RRd stars have multi-epoch spectra, and we estimated and adopted their average metallicities. By comparing the period ratios obtained from Gaia and ZTF photometry, we found that the period ratio error of RRd stars is 2.5 × 10−5 in observation.

RR Lyr stars with metallicities are a very good sample to analyse the proportion of RRd stars. These RR Lyr stars are relatively bright, and their second period is easily detected by time-series photometry. ZTF photometry is very suitable for analysing the proportion of RRd stars because it covers the sky field of SDSS and LAMOST and has an average of ~500 photometry observations over a 4 yr span. On the basis of ZTF photometry, we found that for 707 RR Lyr stars with both LAMOST and SDSS parameters the number of RRd stars is 29 (4.1%). For 3,076 and 4,305 RR Lyr stars with only SDSS and LAMOST parameters, the numbers of RRd stars are 168 and 92, respectively. The average proportion of RRd stars is 3.6%. This is consistent with the proportion of RRd stars calculated on the basis of the OGLE database12 in the anti-Galactic centre direction (3%) and is much higher than the proportion of RRd stars in the bulge (<1%).

For the sample of 126 RRd stars with good Gaia parallaxes, 68 of them are from the Gaia DR3 RRd star catalogue, and 47 are confirmed by ZTF photometry. We also added 11 nearby RRd stars42.

Anomalous/peculiar RRd stars

Among the RRd stars, there are a small number of anomalous or peculiar RRd stars in addition to the classical RRd stars. The main differences43 between anomalous or peculiar RRd stars and classical RRd stars are the following. (1) Anomalous or peculiar RRd stars are located above or below the sequence of classical RRd stars on the Petersen diagram. (2) The dominant mode of anomalous or peculiar RRd stars is the fundamental mode, while the dominant mode of classical RRd stars is the first-overtone mode. (3) Anomalous or peculiar RRd stars usually have long-term amplitude modulation. The main difference between peculiar RRd stars and anomalous RRd stars is that the amplitude ratio of peculiar RRd stars is usually less than 0.05. The use of classical RRd star relations to calculate the metallicity and luminosity of anomalous or peculiar RRd stars usually results in large deviations due to deviations from the sequence of classical RRd stars. We checked that the RRd samples used to obtain the period–period ratio–metallicity relation, PLRs and Gaia parallax offset are all classical RRd stars. There are four anomalous or peculiar RRd stars in the M3 globular cluster28, and we excluded them from the metallicity and distance analysis. It should be noted that there are dozens of short-period classical RRd stars (P1O/PF < 0.74), which are found in the Galactic bulge12 and are not in our sample. Whether these short-period classical RRd stars satisfy the relation of classical RRd stars requires future confirmation based on spectral parameters.

Metallicity

The metallicities we adopted are determined using the SEGUE (Sloan Extension for Galactic Understanding and Exploration) Stellar Parameter Pipeline on SDSS spectra and the LAMOST Stellar Parameter pipeline on LAMOST spectra. Three RRd stars with LAMOST [Fe/H] > 0.0 dex are excluded because their spectra do not match correctly with the template (effective temperature (Teff) > 10,000 K). The metallicities of 303 RRd stars are distributed between −2.6 dex and −0.8 dex, where the average internal error of the metallicity is 0.08 dex. To obtain its external error, we compared the spectral parameters of LAMOST and SDSS with the high-resolution spectroscopic parameters of the Apache Point Observatory Galactic Evolution Experiment (APOGEE)44. We chose stars with metallicities [Fe/H] < −1.0 dex, which are more consistent with our RRd stars of interest. We found that the external error of metal-poor stars is 0.03 dex larger than that of solar metallicity stars. For comparison, we used one-time 3σ clipping to remove the outliers (a rate of 1.5%) and then calculated the s.d. For 586 and 5,840 metal-poor stars with SDSS and LAMOST metallicities, the s.d. values are 0.158 dex and 0.189 dex, respectively. If we select the sample using the internal error σ[Fe/H] < 0.04 dex, then the s.d. for the remaining 262 metal-poor stars with SDSS metallicity is 0.131 dex. For the remaining 3,883 metal-poor stars with LAMOST metallicity, the standard deviation is 0.177 dex. The external error of the low-resolution spectroscopic metallicity is slightly smaller than these s.d. values, which also include the APOGEE metallicity error. We compared the external error with the dispersion of the period–period ratio–metallicity relation (equation (1)) and found that they are comparable for the SDSS RRd stars. This suggests that the dispersion of the period–period ratio–metallicity relation arises from errors in the low-resolution spectroscopic metallicities.

Mass

Mass is a very poorly studied parameter of RR Lyr stars. Due to the low percentage of RR Lyr binaries and their existence only in wide binaries (with orbital periods longer than 1,000 d), no dynamical masses of typical RR Lyr stars are currently known. The analysis of RR Lyr stars’ masses can only be based on evolutionary masses. For an RRd star, ref. 5 provides the equation log(M/M) = −0.85 ± 0.05 − (2.8 ± 0.3) log(P1O/PF) − (0.097 ± 0.0003) log Z to calculate its evolutionary mass. For 303 RRd stars with metallicities, the determined masses are between 0.58 and 0.85 M. The mass range also agreed with the prediction from the other theoretical model10. We calculated a linear correlation coefficient of R2 = 0.9984 between metallicities and logarithmic masses; this high correlation is due to the existence of the period ratio–metallicity relation. The correlation suggests that the period–period ratio–metallicity relation for RRd stars does not require the introduction of mass as an independent variable. There is no metallicity dependence in the PLR of RRd stars, and likewise no mass dependence. By calculation, we obtained that the correlation between the PLR residuals and the mass or metallicity is consistent, both being low to negligible.

Period–period ratio–metallicity relation

We performed a nonlinear check of the period–period ratio–metallicity relation and period–metallicity relation. On the basis of the current 303 RRd stars, we found that the use of second- to fourth-order polynomials did not lead to a reduction in the root-mean-square error (RMSE) of the fit. We also tried more than 30 machine learning regression methods (for example, support vector machines, Gaussian process regression, neural networks and so on) to explore the complex relation between metallicity and period, period ratio. The results show that the linear regression learner has the smallest RMSE. We performed Markov-chain Monte Carlo simulations to estimate the coefficient error of [Fe/H] = e0 log(P1O/PF) + e1 log P1O + e2 and confirmed that the errors in equation (1) were not underestimated. The period–period ratio–metallicity relation is applicable for RRd stars with 0.741 ≤ P1O/PF ≤ 0.748, which includes the majority of classical RRd stars.

Period–metallicity relation

The period–metallicity relation of RRd stars can be derived by combining the RR Lyr PLZ relation and RRd star PLR. We used RRab stars (from the OGLE LMC sample) as an example and determined their PLR as \({M}_{{W}_{VI}}=(-3.03\pm 0.02)\log {P}_{{{{\rm{F}}}}}+(17.15\pm 0.01)-{{{{\rm{DM}}}}}_{{{{\rm{LMC}}}}},\;\sigma =0.133\) mag. We then added a metallicity-dependent term +0.15([Fe/H] + 1.64) to the PLR of RRab stars, where 0.15 originates from the theoretical calculations5 and observations15. When RRab stars become RRd stars, they also follow the PLR of RRd stars (equation (3)). On the basis of these two relations, we eliminated \({M}_{{W}_{VI}}\) and DMLMC and derived the period–metallicity relation [Fe/H]SDSS = (−9.96 ± 1.04) log PF + (−5.17 ± 0.32) dex. Similarly, we used RRc stars to derive the period–metallicity relation for first-overtone mode as [Fe/H]SDSS = (−9.92 ± 1.20) log P1O + (−6.11 ± 0.52) dex. These relations agree well with RRd stars’ period–metallicity relations (equation (2)). Therefore, RRd stars are RRab or RRc stars that satisfy the period–metallicity relation.

Period–period ratio relations

The primary period determined from short-time-span observation is more accurate than the second period. In this case, the period ratio of RRd stars can be better derived from the Petersen diagram. The primary period of the classical RRd star is the first-overtone period, and the conversion equation is given in equation (5). This relation was established by a quadratic curve fit to the OGLE LMC RRd stars. The period ratio error of 0.0004 is only one order of magnitude higher than the period ratio error of the ZTF or Gaia observations. The metallicity calculated with equation (1) on the basis of this approximate period ratio has a dispersion of 0.039 dex compared with the metallicity calculated with the observational period ratio.

$$\begin{array}{l}{P}_{1{{{\rm{O}}}}}/{P}_{{{{\rm{F}}}}}=(-0.6567\pm 0.0200){P}_{1{{{\rm{O}}}}}^{2}+(0.5381\pm 0.0151){P}_{1{{{\rm{O}}}}}\\\qquad\qquad\,\,\, +(0.6357\pm 0.0029),\;\sigma =0.0004.\end{array}$$
(5)

Period–luminosity relation

For the OGLE system, we excluded a few foreground RRd stars using I > 18.05 mag (LMC) and I > 18.35 mag (SMC) when obtaining the PLR. For the Gaia system, only ~300 RRd stars have a mean magnitude based on light-curve analysis. To avoid the PLR being biased by incompleteness, we complemented ~800 RRd stars (σBP < 0.05 mag and σRP < 0.05 mag) with Gaia DR3 statistical mean magnitude. However, considering that Gaia’s statistical mean magnitude was based on more than 40 measurements, using this value would only increase the dispersion of the PLR (from 0.13 mag to 0.16 mag), without affecting the zero point. On the basis of future data released by Gaia, the dispersion of Gaia-based PLR will decrease.

Zero point of PLR

In the main text, we determined the zero point of RRd stars’ PLR assuming a fixed slope from the LMC PLR. Here we also show the results using an unfixed slope, that is \({M}_{{W}_{G,BP,RP}}({P}_{1{{{\rm{O}}}}}=0.37\,{{{\rm{d}}}})=-0.391\pm 0.052\) mag, zp = 13.5 ± 5.9, a0 = −3.393 ± 0.671. We can see that the RRd stars’ PLRs based on the LMC distance and Gaia parallax agree well with each other. We finally use the PLR slope based on LMC RRd stars to establish the best PLR.

In the main text, we used a conservative PLR zero point of RRd stars that can be optimized in future work. If we assume that there is no offset in the Gaia parallax, the PLR zero point obtained is \({M}_{{W}_{G,BP,RP}}({P}_{1{{{\rm{O}}}}}=0.37\,{{{\rm{d}}}})=-0.286\pm 0.022\) mag. Moreover, on the basis of the parallax offset of contact binaries, we determined a zero point of \({M}_{{W}_{G,BP,RP}}({P}_{1{{{\rm{O}}}}}=0.37\,{{{\rm{d}}}})=-0.317\pm 0.022\) mag. An assumption is introduced here that the sample of RRd stars and the sample of contact binaries have the same mean Gaia parallax offset. Since the Gaia parallax offset is related to the spatial position, colour and G-band apparent magnitude18, the assumption holds only if these two samples have the same mean values of these parameters. On the basis of the parallax offsets calculated from a fine selection of other tracers, or the future Gaia DR4 parallax, the zero-point uncertainty of the RRd stars’ PLR can be improved to 0.022 mag. When combined with the LMC-based zero point \({M}_{{W}_{G,BP,RP}}({P}_{1{{{\rm{O}}}}}=0.37\,{{{\rm{d}}}})=-0.338\pm 0.024\) mag, a zero-point uncertainty of 0.016 mag can be obtained (0.7% distance uncertainty).

Period–period ratio–luminosity relation

We obtained the period–period ratio–luminosity relations for RRd stars using the same samples as for PLRs (equation (6)). We found that their RMSEs are not optimized when compared with PLRs. By analysing the PLR residuals ΔMW, we found that the period–period ratio–luminosity relation may be slightly overfitted at the long-period end and the small-period-ratio end. For the LMC RRd stars, the absolute magnitude deviations calculated with these two relations are \({{\Delta }}{M}_{{W}_{VI}}=0.000\pm 0.008\) mag and \({{\Delta }}{M}_{{W}_{G,BP,RP}}=0.000\pm 0.010\) mag, and the deviations are not significant compared with the RMSEs. This suggests that these two relations are consistent when using larger numbers of RRd stars to measure the distances of galaxies. As with metallicity, a linear regression relation between absolute magnitude and period or period ratio is the most appropriate, out of 30 machine learning regression methods.

$$\begin{array}{ll}{M}_{{W}_{VI}}\qquad=(-3.800\pm 0.283)(\log {P}_{1{{{\rm{O}}}}}-\log 0.37)\\\qquad\qquad\qquad +(-30.06\pm 8.58)(\log \frac{{P}_{1{{{\rm{O}}}}}}{{P}_{{{{\rm{F}}}}}}-\log 0.745)\\\qquad\qquad\qquad +(17.987\pm 0.004)-{{{{\rm{DM}}}}}_{{{{\rm{LMC}}}}},\;\sigma =0.132\,{{{\rm{mag}}}},\\ {M}_{{W}_{G,BP,RP}}=(-2.855\pm 0.399)(\log {P}_{1{{{\rm{O}}}}}-\log 0.37)\\\qquad\qquad\qquad +(-34.83\pm 16.45)(\log \frac{{P}_{1{{{\rm{O}}}}}}{{P}_{{{{\rm{F}}}}}}-\log 0.745)\\\qquad\qquad\qquad +(18.135\pm 0.006)-{{{{\rm{DM}}}}}_{{{{\rm{LMC}}}}},\;\sigma =0.159\,{{{\rm{mag}}}}.\end{array}$$
(6)

Distance uncertainties

The statistical uncertainty was estimated using σstat = max(σ, σPL)/√n. σ is the s.d. of the RRd stars’ distance moduli in each globular cluster or dwarf galaxy, while n denotes the number of RRd stars used. σPL is the RMSE of the PLR. Normally, σ will be greater than or equal to σPL. However, when the sample size is too small, σ can be smaller than σPL. We conservatively took their maximum values. The systematic uncertainties include those caused by the PLR zero point, extinction and metallicity. The PLR zero point was based on LMC distance and the Gaia DR3 parallaxes with an uncertainty of σZP = 1.0%. The extinction uncertainty was estimated by assuming a σext,coef = 5% uncertainty in the coefficient of Wesenheit magnitude. The PLR and distance of RRd stars were redetermined on the basis of the new coefficient and the DM difference was assumed to be the extinction uncertainty σext. IC 4499 has σext = 0.02 mag, while the other five targets (including SMC) have σext < 0.01 mag. The effect of the metallicity on the PLR is negligible. The final systematic uncertainty was estimated using \({\sigma }_{{{{\rm{syst}}}}}=\sqrt{{\sigma }_{{{{\rm{ZP}}}}}^{2}+{\sigma }_{{{{\rm{ext}}}}}^{2}}\).