1 Introduction

The distance to the Galactic center \(R_{0}\) represents the most fundamental parameter for the study of Galactic structure, kinematics, and dynamics. I have already determined \(R_{0}\) by use of the OB stars (Branham 2014) and the AF stars (Branham 2015). To use the remaining spectral classes seems indicated, but first perhaps an explanation why the stars should be grouped into OB, AF, and GKM divisions should be made.

There is a significant difference in the kinematics of the OBAF stars and the GKM stars manifested in Parenago’s discontinuity. Table 1 shows this discontinuity for the giant stars; the jump in magnitude of the axes of the velocity ellipsoid between F III and G III is striking. Dehnen and Binney (1998) have shown the same for the main sequence stars. As for differences between the OB and the AF stars, the former show a noticeable concentration towards the Galactic plane, see Fig. 3 in Branham (2014), whereas the latter do not, see Fig. 5 in Branham (2015). Nor does the Gould belt make a significant contribution to the AF stars, whereas Gould belt stars, with different kinematics, must be removed from the OB stars before determination of \(R_{0}\).

Table 1 Parenago’s discontinuity for giant stars

The methodology used in this current study of the GKM stars is nearly the same as that of my previous studies of the OB and the AF stars. Much detail, therefore, will be omitted and the reader referred to these previous investigations. This current study, like the previous ones, relies on stellar kinematics rather than dynamics, which requires that the results be supported by solid statistics such as tests of randomness.

2 The observational data

The proper motions and parallaxes up to 1 mas used in this study were taken from van Leeuwen’s (2007) version of the Hipparcos catalog (ESA 1997), henceforth called simply the Hipparcos catalog, the radial velocities from the Wilson (Nagy 1991) and Strasbourg Data center (Barbier-Brossat et al. 2000) catalogs. Any star flagged in the Hipparcos catalog as of substandard quality was omitted from consideration. From these catalogs I extracted 49,227 stars with parallaxes and proper motions. 6,821 of the stars have radial velocities for a total of 105,275 proper motions and radial velocities. Smith and Eichhorn (1996) have derived a procedure to correct observed parallaxes for parallax error, and this procedure was used to transform all of the parallaxes used in this study.

The GKM stars show only slight concentration towards the Galactic plane. Figure 1 shows the 3-dimensional distribution of the rectangular coordinates. Calculate a moment matrix \(M\), a matrix referred to the centroid of the distances, \(\bar{x},\bar{y},\bar{z}\), from the \(x,y,z\). Let \(X_{i}=(x_{i}- \bar{x})\), \(Y_{i}=(y_{i}-\bar{y})\), \(Z_{i}=(z_{i}-\bar{z}),\ldots {}\). Then

$$ M=\left ( \textstyle\begin{array}{c@{\quad}c@{\quad}c} \sum_{i}X_{i}^{2} & \sum_{i}X_{i}Y_{i} & \sum_{i}X_{i}Z_{i} \\ \sum_{i}Y_{i}X_{i} & \sum_{i}Y_{i}^{2} & \sum_{i}Y_{i}Z_{i} \\ \sum_{i}Z_{i}X_{i} & \sum_{i}Z_{i}Y_{i} & \sum_{i}Z_{i}^{2} \end{array}\displaystyle \right ) . $$
(1)
Fig. 1
figure 1

Space distribution of GKM stars

The matrix is symmetric because \(\sum_{i}X_{i}Y_{i}= \sum_{i}Y_{i}X_{i}, \ldots {}\). An eigenvalue–eigenvector decomposition of this matrix yields the following array:

$$\textstyle\begin{array}{c@{\quad}c@{\quad}c@{\quad}c} & \text{Direction}\ x & \text{Direction}\ y & \text{Direction}\ z \\ l & -80.^{\circ }04 & 63.^{\circ }33 & -0.^{\circ }54 \\ b & 29.^{\circ }96 & -54.^{\circ }32 & 17.^{\circ }55 \\ \lambda & 1767.74 & 1420.11 & 1267.45. \end{array} $$

The \(z\) eigenvalue is less prominent than the others, but not strikingly so. The latitude of the \(z\)-component shows that the distribution has little orientation towards the north Galactic pole. There is also little correlation among the \(x\), \(y\), and \(z\) directions, respectively −2.9 %, −5.0 %, and 9.4 %. The GKM stars, therefore, constitute a homogeneous sample.

3 The reduction model

The origin of the kinematical equations of condition can be found in Branham (2014, 2015) as well as the reason why cylindrical or spherical coordinates are not used. The equations, given in the previous publications but nevertheless repeated here for benefit of the reader, contain 14 unknowns, shown in Eq. (2). \(\dot{r}\) denotes radial velocity in km s−1, \(\mu _{l}\) proper motion in Galactic longitude in milli-arc-sec (mas) per year, \(\mu _{b}\) proper motion in latitude in the same units, \(\kappa\) a constant with value 4.74047 km s−1 yr, and \(\pi\) the parallax in mas.

$$\begin{aligned} & \begin{aligned} \pi ^{2}\dot{r}&=\pi A\sin 2l\cos ^{2}b \\ &\quad {}+\cos ^{3}b\sin l\bigl(-A/R_{0}+c_{1}+4c_{2} \tan ^{2}b\bigr)/4 \\ &\quad {}+\cos ^{3}b\sin 3l(3A/R_{0}+c_{1})/4 \\ &\quad {}+\pi ^{2}(X\cos l\cos b+Y\sin l\cos b+Z\sin b) \\ &\quad {}+\pi ^{2}K+\pi ^{2}\sin ^{2}b\partial W/ \partial z+\sin ^{2}b\partial ^{2}W/\partial z^{2}/2 \\ &\quad {}+\pi A_{1}\cos 2l\cos ^{2}b+\pi A_{2} \cos ^{2}b \\ &\quad {}-C\cos ^{3}b\sin l\cos ^{2}l; \end{aligned} \\ & \begin{aligned} k\pi \mu _{l}&=\pi A\cos 2l+\pi B+\cos b \cos l\bigl(-3A/R_{0}+3c_{1} \\ &\quad {}+4c_{2}\tan ^{2}b\bigr)/4 +\cos b\cos 3l(3A/R_{0}+c_{1})/4 \\ &\quad {} +\pi ^{2}(-X\sin l+Y\cos l)-\pi A_{1}\sin 2l \\ &\quad {}-C\cos ^{2}b\cos ^{3}l, \end{aligned} \\ & \begin{aligned} \kappa \pi \mu _{b}&=-\tan b \bigl[\pi A\sin 2l\cos ^{2}b+\cos ^{3}b\sin l \bigl(-A/R_{0} \\ &\quad {}+c_{1}+4c_{2}\tan ^{2}b\bigr)/4+\cos ^{3}b\sin 3l(3A/R_{0} \\ &\quad {}+c_{1})/4\bigr]\ +\pi ^{2}(-X\cos l\sin b-Y\sin l \sin b \\ &\quad {}+Z\cos b)+\cos b\sin ^{2}b\partial ^{2}W/\partial z^{2}/2 \\ &\quad {}-\pi \sin b\cos b\partial W/\partial z\ +C\sin b\cos ^{2}b \sin l\cos ^{2}l. \end{aligned} \end{aligned}$$
(2)

In these equations \(A\) and \(B\) are the familiar Oort constants, \(R_{0}\) the distance to the Galactic center, \(c_{1}=1/2\partial ^{2}V_{0}/ \partial R^{2}\), \(c_{2}=1/2\partial ^{2}V_{0}/\partial z^{2}\), where \(V_{0}\) is the circular velocity of rotation at the Sun’s distance, \(X, Y,Z\) the components of the reflex solar velocity, and \(K\) a \(\mathrm{K}\) term for possible systematic effects in the radial velocity, putatively significant only for the early stars, but this must be demonstrated for the GKM stars rather than assumed. If \(W\) denotes velocity perpendicular to the Galactic plane, then to allow for coupled motion in the plane and perpendicular to it we add two more unknowns, \(\partial W/\partial z\) and \(\partial ^{2}W/\partial z^{2}\). To allow for a possible expansion of the Galaxy Smart (1968, pp. 303–305) introduces the terms \(e_{0}=\dot{R}_{0}/R_{0}\) and \(\dot{e}_{0}=de_{0}/dR_{0}\). These two terms allow for bulk motion towards or away from the Galactic center, and affect the equations of condition in radial velocity and Galactic longitude. Let \(A_{1}=R_{0}\dot{e}_{0}/2\) and \(A_{2}=A_{1}+e_{0}\). A further term, which can also be called an Oort constant, \(C\) may be added that indicates a displacement of the system of longitudes from the direction to the Galactic center. With the \(C\) term in lieu of \(A\) we use \(\sqrt{A^{2}+C^{2}}\), and the longitude offset \(l_{1}\) from the direction to the center of the Galaxy becomes \(l_{1}=1/2\tan ^{-1}(-C/\sqrt{A^{2}+C^{2}})\). Because the distance enters in the denominator, the equations become nonlinear. Notice that because of the units of \(\pi ,\dot{r},\mu _{l},\mu _{b}\), and \(\kappa \), the dimensions of the residuals from Eq. (2), defined as the right-hand-side minus the left-hand-side, will be mas2 km s−1. It is convenient, however, for reason explained in Branham (2014) to multiply Eq. (2) by \(R_{0}\), which converts the residuals to mas km s−1.

The success of the kinematical model depends on the behavior of the post-fit residuals and in particular their randomness. A mean squared successive difference test, also known as the Durbin-Watson statistic, measures the serial correlation of a residual with its successor (Wonnacott and Wonnacott 1972, pp. 411–413). A different test, based on runs of the residuals, explained in Knuth (1981, pp. 65–67), and implemented in the IMSL Numerical Libraries “DRUNS” routine (www.roguewave.com), calculates a covariance matrix, and a chi-squared statistic for the probability of the null hypothesis: the residuals are random. The test relies on a covariance matrix calculated from a sequence of the runs, from the longest to the shortest. Too few or too many variables will be manifested by lack of randomness in the residuals. Good randomness also indicates less probability of systematic error.

Eichhorn’s efficiency (Eichhorn and Xu 1990) also becomes useful. The efficiency varies from 0 for statistically dependent variables to 1 for complete independence; the closer to 1 the better.

The randomness of the residuals and Eichhorn’s efficiency are good indicators whether one can determine well \(R_{0}\), falls within the range 6.5–9.5 kpc for post-1980 determinations (Francis and Andersen 2014), from a group of stars whose distances are generally less than 1 kpc. Randomness and high efficiency imply that the kinematical model is reliable and thus the distance determined trustworthy. Accurate data contribute to good randomness and high efficiency. I have already commented on the high quality of the Hipparcos proper motions (Branham 2009b), which allow one to calculate the velocity ellipsoid for the K giants without the need for a \(K_{2}\) correction term (Trumple and Weaver 1962, pp. 375–377). The parallaxes also have a close to Gaussian error distribution (ESA 1997) and thus conform to one of the assumptions for an optimal least squares solution (Branham 1990, pp. 74–76). One may infer, therefore, that the data entering into Eq. (2) are of good quality.

4 The solution

Because \(R_{0}\) occurs in the denominator Eq. (2) becomes a system of nonlinear equations, but permits a direct determination of the distance under the assumptions used to derive the equation. One should multiply both sides of Eq. (2) by \(R_{0}\) (see Branham 2014), which changes the dimensions of the residuals to mas km s−1. The equations still remain nonlinear. The Nelder-Mead simplex algorithm (Nelder and Mead 1965) becomes a good nonlinear method because it reduces the residuals in any vector norm. One of the input parameters is the initial size of the simplex, \(\lambda\), which depends on the scale of the variables being used. For use with stellar kinematics I have found that \(\lambda =0.1\) to \(\lambda =0.001\) work well.

As with all nonlinear methods one needs a first approximation to the solution. This comes from a potpourri of sources, primarily my previous studies of the G, K, and M giant stars; see Table 1. Table 2 shows the first approximation.

Table 2 First approximation to solution

Unlike previous research with the OB and the AF stars I have eschewed first calculating an L1 solution, using it to find weights, and then proceeding to a least squares solutions. Rather, I use least squares from the beginning and recalculate weights from each iteration; for the first iteration the weights are taken as unity. Various weighting schemes are possible, but my work with the OB stars (Branham 2014) shows that Welsch weighting works well (Branham 1990, p. 117). Scale the residuals by the median of the absolute values of the residuals, \(r=r/\mathit{median}(\vert r\vert )\), then weight an individual residual \(r_{i}\) by a factor \(w_{i}\) given by,

$$ w_{i}=\exp (-r_{i}/2.985)^{2}. $$
(3)

How to compute a covariance matrix \(C_{V}\), which permits calculation of the mean errors and the correlations among the unknowns, and mean errors for quantities not solved for directly is found in Branham (2014).

5 Results

The solution was calculated after the norms of the iterates had converged to within 0.1 of one another. Although there is no guarantee of global convergence, a question discussed in my previous publications (Branham 2014, 2015), that the norm of the final solution differs by 17.3 % from that of the first approximation demonstrates that the former has not converged to a local minimum close to the latter. Table 3 shows the final, least squares solution, discussed in the next section. Figure 2 shows the residuals sorted by both longitude and latitude from this solution, and Fig. 3 shows a histogram of the weights. 87.8 % of the weights are greater than the Fortran double-precision machine epsilon of \(2.2\times 10^{-16}\) (the language used in this study), 65.3 % greater than 0.5, and 48.2 % greater than 0.9.

Fig. 2
figure 2

Residuals from final solution in longitude and latitude

Fig. 3
figure 3

Histogram of weights

Table 3 Least squares solution with Welsch weighting

A runs test shows that the residuals in longitude have a 32.8 % chance of being random and in latitude 22.6 %. The Durbin-Watson statistic does better, 92.9 % in both coordinates. Because the tests measure different properties of the residuals, tracking of residuals above and below 0 and serial correlation of one residual with another, concordance should not be expected. The Durbin-Watson test shows that at a higher than 90 % confidence the residuals can be considered random. Although random residuals do not guarantee a good reduction model, a poor model produces poor residuals. Eichhorn’s efficiency of 0.17, although not close to 1, is far above 0 and implies no redundant unknowns in Eq. (2).

Given the randomness of the residuals and Eichhorn’s efficiency one may infer that the determination of \(R_{0}\) is sound even if the bulk of the stars have distances less than 1 kpc.

Although the residuals do not represent temporal series, we can nevertheless apply spectral analysis to the residuals sorted first by longitude, see Fig. 4, and then by latitude, see Fig. 5. There is no indication of periodicity in either longitude or latitude; the noise is almost pure white noise.

Fig. 4
figure 4

Spectral analysis applied to longitude

Fig. 5
figure 5

Spectral analysis applied to latitude

Given this statistical evidence there is little reason, therefore, to question the kinematical model represented by Eq. (2).

6 Discussion

Certain questions arise from a study of Table 3. Mean errors for two of the unknowns, \(1/2\partial V_{0}/\partial R_{0}\) and \(C\) exceed the values themselves; this also occurred with the AF stars, but for three unknowns, and for one unknown for the OB stars. Should these unknowns be suppressed? The answer is no. The singular values of the equations of condition, given in Fig. 6, show that none of them are null; the smallest is \(5\times 10^{16}\) larger than the machine \(\epsilon \) of \(5.4\times 10^{-20}\) for the Pentium processor used in the calculations. (This \(\epsilon \) represents the computed value from a Pentium processor using the floating point unit. The Fortran function epsilon for many compilers gives the higher value of \(2.2\times 10^{-16}\) because these compilers do not take advantage of the extra two bytes offered by extended precision of the unit.) We can say that although some of the calculated values lack significance because of their mean errors, all of the unknowns are necessary for a good solution that exhibits random residuals. Some of the mean errors may seem on the low side, but this is a consequence of Eq. (3), which downweights large residuals. If one were to merely use trimmed residuals, an idea going back to the 19th century (Pierce 1852) and almost universally used until the mid-20th century, the mean error for \(V_{0}\) would be 31.7 km s−1. The more modern, robust schemes such as Eq. (3), however can be defended. Huber (1981) is a good reference because he has worked with ancient observations such as Babylonian solar and eclipse observations with numerous and serious errors that cannot be handled by merely trimming the residuals.

Fig. 6
figure 6

The singular values

Table 4 duplicates some of the values for various entities found in my previous studies of the OB and AF stars plus this study. The distance to the Galactic center of 7.64 kpc for the GKM stars falls within the range that Francis and Andersen (2014) list, 135 determinations made between 1918 and 2013 that vary from 5.5 to 16.5 kpc. Notice that all of the distances, for the OB, the AF, and the GKM stars, fall below 8 kpc. The solar velocity is higher than that found from the OB and the AF stars, consistent with Table 4 in Branham (2010) that yields higher solar velocities for the later stars. \((A-B)\) becomes \(22.24\pm 0.82~\mbox{km}\,\mbox{s}^{-1}\,\mbox{kpc}^{-1}\), consistent with values given in Table 5 of Branham (2010). \(-(A+B)\) becomes \(-5.77\pm 0.71~\mbox{km}\,\mbox{s}^{-1}\,\mbox{kpc}^{-1}\), also in the range of the values given in the same Table 5. The K term is low, although not zero, and diminishes as we go from the early to the late stars, consistent with what others have found. The value for \(C\), admittedly with its high mean error, implies that there is no significant offset in the system of longitudes. All of this leads me to conclude that the kinematic model embodied by Eq. (2) remains adequate.

Table 4 Comparison of solutions for various spectral types

The calculated values for \(A_{1}\) and \(A_{2}\) give \(\dot{R}_{0}=77.00 \pm 19.30~\mbox{km}\,\mbox{s}^{-1}\). This implies that the system of GKM stars expands 1 kpc in \({\approx} 1.27\times 10^{7}~\mbox{yr}\). Such a rapid expansion becomes unrealistic and shows the limitations of kinematics; matters such as an overall expansion of the Galaxy require dynamics. Although we find, at this moment in time, a secular trend for \(R_{0}\), we cannot extrapolate this trend to cover millions of years.

6.1 Conclusion

The distance to the Galactic center determined by 105,275 GKM stars of all luminosity classes is \(7.64\pm 0.09~\mbox{kpc}\).