In geometry, the diameter of a circle is the length of a straight line segment that passes from a point on the circle to the opposite point (and therefore passes through the centre of the circle). This length is twice the radius. The line segment itself is also called a diameter.
The diameter of a connected graph is the distance between the two vertices which are furthest from each other. The distance between two vertices a and b is the length of the shortest path connecting them (for the length of a path, see Graph theory).
The two definitions given above are special cases of a more general definition. The diameter of a subset of a metric space is the least upper bound of the distances between pairs of points in the subset. So, if A is the subset, the diameter is
It is important not to confuse a diameter symbol (ø) with the empty set symbol, similar to the uppercase Ø. Diameter is also sometimes called phi (pronounced the same as "fee"), although this seems to come from the fact that Ø and ø look like Φ and φ, the letter phi in the Greek alphabet.