Proof. If , then where is the adjacency matrix of . Thus, has two distinct distance eigenvalues i.e., and .
For the converse, assume that has two distinct distance eigenvalues, say, . Let be the multiplicity of . By Theorem 2, , and thus, . We show that does not contain as an induced subgraph. On the contrary, we assume that it is true. Let P be the principle submatrix of induced by . Then, by Theorem 3, we obtain that P has only two distinct distance eigenvalues. However, by Lemma 2, has precisely three distinct distance eigenvalues. This implies that is not an induced subgraph of . And thus, and , . □
Proof of Theorem 1. The ‘only if part’ of the statement follows from Lemma 2 by considering either or .
For the ‘if part’ of the statement, we assume
T to be a tree with three distinct distance eigenvalues. Let
D (resp.
) be the diameter (resp. distance matrix) of
T. Since
T is non-complete, we obtain that
T is non-regular. Let
be the distinct eigenvalues of
T with respective multiplicities
. By the Perron–Frobenius Theorem 2, we have
. Moreover, by Corollary 1, we have
and
. Let
be the Perron–Frobenius eigenvector of
, then
and
if and only if
. This implies that
. We discuss the following two possible cases:
Case 1. is not an integer.
Since
is simple and non-integral, one of
(
) is also simple. Let
, and assume
is the simple eigenvalue. This implies that
and has multiplicity
. Since
, we obtain that
Note that
. Moreover,
is an induced subgraph of
T as it is non-regular and non-complete. This implies that
where
is a principle submatrix of
. Therefore, by interlacing,
since
. However, since
, we obtain that
. By Theorem 2.6 from [
23],
T is a complete multipartite graph. Since
T is a non-regular graph having three distinct distance eigenvalues, by Lemma 3.4 from [
23],
,
is complete bipartite. By Lemma 2 and Corollary 1, we obtain that
and
. By solving these inequalities, we obtain that either
or
. This implies that
T is the star graph.
Case 2. is an integer.
In this case, we may assume that for . Based on , we consider the following subcases.
Subcase 2.1. Assume that .
In this case, the corresponding distance eigenvalues
and
are integral such that
and
. If
, then, by Theorem 2.6 from [
23],
T is a complete multipartite graph. Since
T is a non-regular graph having three distinct distance eigenvalues, by Lemma 3.4 from [
23],
,
is complete bipartite. By Lemma 2 and Corollary 1, we obtain that
and
. By solving these inequalities, we obtain that either
or
. This implies that
T is a star graph.
Thus, we have and . By Corollary 1, this is not possible, as the graph is a tree.
Subcase 2.2. Assume that .
Then,
, and hence,
is odd. Note that
implies that
. This gives us
As
, we obtain
, where
c is a positive integer by Equation (
1). Since
T is non-complete, there exist vertices
, and
z in
T such that
. Note that the set
induces a path of length two in
T. This implies that, by interlacing, we obtain
, as
. Moreover, since
is odd and
, by Theorem 5, we obtain
By Equation (
2), we obtain that
as
. Next, we discuss all these possibilities one by one:
Subsubcase 2.2.1. .
By Equation (
2), we obtain that
, which is not possible as
and
.
Subsubcase 2.2.2. .
In this case, by Equation (
2), we obtain
. As a consequence of Theorem 5, one could show that
T has
distinct distance eigenvalues. Using this fact with
, we find that
. By using
and Theorem 2, we obtain
This implies that
and, thus,
.
Table 1 and
Table 2 present all the trees on
vertices and their distance spectra. It is easy to check that this case is not possible.
Subsubcase 2.2.3. .
In this case, we obtain that
. By using a similar argument as in Subcase 2.1, we find that, in this case, we have
. Note that
and
are the roots of
From (
3), we obtain
. For
, the number
is not a perfect square. Thus,
(
) is not integral which is a contradiction to the fact that all
’s are integral. This shows that
is not integral which completes the proof. □