---
tag: 096B7Q5742
kind: statement
role: theorem
name: Unique paths in trees
msc: [05C05]
uses: [0JDE56HWQ8, 0MJ0JS72DZ]
sources:
  - url: https://en.wikipedia.org/wiki/Tree_(graph_theory)
    locator: Properties
---

## Statement

Let $G$ be a [[graph|0JD5C82QMB]].
Then $G$ is a [[tree|0MJ0JS72DZ]] if and only if $G$ has at least one vertex and these conditions hold.
For any two vertices $u$ and $v$ of $G$, there is exactly one [[path|0JDE56HWQ8]] from $u$ to $v$.

## Remarks

Existence of a path between any two vertices is connectedness. Uniqueness of the path is equivalent to acyclicity: two different paths between the same vertices contain a cycle.
In a tree, the unique path from $u$ to $v$ is a shortest walk, so its length is the [[distance|0WPZ5YPAGR]] $d(u, v)$.

## Explanations

### L1 human

In a tree there is only one way to get from one vertex to another without going back.
If there were two different ways, together they would form a loop, and a tree has no loop.
