By a hollow symmetric matrix we mean a symmetric matrix with zero diagonal elements. The notion contains those of predistance matrix and Euclidean distance matrix as its special cases. By a centered symmetric matrix we mean a symmetric matrix with zero row (and hence column) sums. There is a one-toone correspondence between the classes of hollow symmetric matrices and centered symmetric matrices, and thus with any hollow symmetric matrix D we may associate a centered symmetric matrix B, and vice versa. This correspondence extends a similar correspondence between Euclidean distance matrices and positive semidefinite matrices with zero row and column sums.We show that if B has rank r, then the corresponding D must have rank r, r + 1 or r + 2. We give a complete characterization of the three cases.We obtain formulas for the Moore-Penrose inverse D+ in terms of B+, extending formulas obtained in Kurata and Bapat (Linear Algebra and Its Applications, 2015). If D is the distance matrix of a weighted tree with the sum of the weights being zero, then B+ turns out to be the Laplacian of the tree, and the formula for D+ extends a well-known formula due to Graham and Lovász for the inverse of the distance matrix of a tree.