A q-analogue of the distance matrix of a tree

We consider a q-analogue of the distance matrix (called the q-distance matrix) of an unweighted tree and give formulae for the inverse and the determinant, which generalize the existing formulae for the distance matrix. We obtain the Smith normal form of the q-distance matrix of a tree. The relationship of the q-distance matrix with the Laplacian matrix leads to q-analogue of the Laplacian matrix of a tree, some of whose properties are also given. We study another matrix related to the distance matrix (the exponential distance matrix) and show its relationship with the q-Laplacian and the q-distance matrix. A formula for the determinant of the q-distance matrix of a weighted tree is also given.