Let T be a tree with vertex set {1,…,n} such that each edge is
assigned a nonzero weight. The squared distance matrix of T, denoted by
Δ, is the n×n matrix with (i,j)-element d(i,j)2, where
d(i,j) is the sum of the weights of the edges on the (ij)-path. We obtain a
formula for the determinant of Δ. A formula for Δ−1 is also
obtained, under certain conditions. The results generalize known formulas for
the unweighted case