For a connected graph G , let e(G) be the number of its distinct eigenvalues and d be the diameter. It is well known that e(G) >= d + 1 . This shows eta <= n - d, where eta and n denote the nullity and the order of G , respectively. A graph is called minimal if e(G) = d + 1 . In this paper, we characterize all trees satisfying eta(T) = n - d or n - d - 1 . Applying this re-sult, we prove that a caterpillar is minimal if and only if it is a path or an even caterpillar, which extends a result by Aouchiche and Hansen. Furthermore, we completely character-ize all connected graphs satisfying eta = n - d. For any non-zero eigenvalue of a tree, a sharp upper bound of its multiplicity involving the matching number and the diameter is pro-vided. (C)& nbsp;2022 Elsevier Inc. All rights reserved.