---
title: "Diameter in Combinatorics"
description: "Diameter in Combinatorics is the greatest shortest-path distance between two vertices in a graph, showing how far apart the graph can stretch."
canonical: "https://fiveable.me/combinatorics/key-terms/diameter"
type: "key-term"
subject: "Combinatorics"
unit: "Unit 11"
---

# Diameter in Combinatorics

## Definition

Diameter is the largest distance between any two vertices in a graph, where distance means the number of edges in the shortest path. In Combinatorics, it measures how spread out a graph is.

## What It Is

Diameter in combinatorics is the greatest shortest-path distance between any two vertices in a graph. You first find the shortest path between each pair of vertices, then take the largest of those distances. That number tells you the graph’s “longest shortest route,” not just its longest route overall.

The phrase shortest path matters. A graph can have a long walk that loops around and visits lots of vertices, but diameter ignores that. It only cares about the minimum number of edges needed to get from one vertex to another. So if one pair of vertices is four edges apart on their shortest route, and every other pair is three edges apart or less, the graph’s diameter is 4.

This idea shows up most clearly in connected graphs. If every vertex can reach every other vertex, then the diameter is a finite number. In a disconnected graph, some pairs of vertices have no path at all, so the diameter is often treated as infinite or undefined depending on the course convention.

Diameter is a graph-wide measurement, so it is different from looking at one single path or one single vertex. If you are working with a network, a small diameter means any two points are fairly close together through the network. A larger diameter means the graph is more spread out, and information, movement, or connections may need more steps to travel across it.

A compact example helps: imagine a path graph with five vertices in a line, v1 to v5. The shortest path from v1 to v5 uses 4 edges, and no pair is farther apart than that, so the diameter is 4. By contrast, in a complete graph, every pair of vertices is directly connected, so the diameter is 1.

One common mistake is mixing up diameter with radius. Diameter looks for the farthest pair overall, while radius looks at the most central vertex and its farthest distance to others. Those are related ideas, but they answer different questions about the same graph.

## Why It Matters

Diameter shows you how “wide” a graph is in combinatorics, which makes it a useful summary of the graph’s structure. Instead of listing every pairwise distance, you can use one number to describe the graph’s overall spread. That is handy when you want to compare graphs quickly or describe how efficiently vertices can reach one another.

It also connects directly to shortest path thinking. If you can find shortest paths, you can measure diameter by checking the largest of those distances. That means diameter often sits right next to questions about route-finding, network reach, and graph traversal, especially in graph theory problems where you need to reason about connectivity rather than just count edges.

In class problems, diameter can help you spot the shape of a graph. A long chain usually has a bigger diameter than a dense cluster. That gives you a fast way to interpret the structure of a graph from a drawing or adjacency list, especially when the graph is too large to inspect vertex by vertex.

It also matters when comparing graph models. Two graphs might have the same number of vertices and edges, but very different diameters, which means their connectivity patterns are not the same. One may be compact and centralized, while the other stretches out like a line.

## Connections

### Shortest Path

Diameter is built from shortest paths. For every pair of vertices, you measure the fewest edges needed to connect them, then take the largest of those values. If you misunderstand shortest path and count a longer walk instead, you will get the wrong diameter.

### Radius

Radius and diameter both describe how far vertices are from each other, but they answer different questions. Radius looks at the smallest possible worst-case distance from a vertex to all others, while diameter looks at the largest shortest-path distance anywhere in the graph. Radius is about the most central vertex, and diameter is about the most spread-out pair.

### Graph

Diameter is a property of a graph as a whole, not of one isolated vertex or edge. The graph’s shape, density, and connectivity all affect the diameter. Dense graphs tend to have small diameters, while sparse or path-like graphs tend to have larger ones.

### [breadth-first search](/combinatorics/key-terms/breadth-first-search)

Breadth-first search is a practical way to find shortest-path distances in an unweighted graph. If you are trying to compute or estimate diameter, BFS from a vertex gives you the distances needed to identify the farthest reachable vertices. It is especially useful on homework problems with small to medium graphs.

## On the AP Exam

A graph theory problem might ask you to identify the diameter from a diagram, an adjacency list, or a set of shortest-path distances. The move is to check the shortest distance between pairs of vertices and then name the largest one. If the graph is disconnected, be ready to explain why the diameter is infinite or not defined under the course’s convention.

You may also see diameter in a comparison question, where you decide which graph is more spread out or which network is more efficient for reaching other vertices. If the graph is unweighted, count edges along the shortest route. If it is weighted and your course includes weighted graphs, use total path weight instead of edge count only when the problem tells you to do that.

## Diameter vs Radius

Radius and diameter both describe distances in a graph, but they are not the same. Diameter is the largest shortest-path distance between any two vertices, while radius is the smallest possible maximum distance from a single vertex to all others. Diameter measures the graph’s widest spread, and radius measures how central the best-positioned vertex is.

## Key Takeaways

- Diameter is the greatest shortest-path distance between any two vertices in a graph.
- You measure diameter in number of edges for an unweighted graph, using the shortest route each time.
- A connected graph has a finite diameter, but a disconnected graph may be treated as having infinite diameter.
- Diameter tells you how spread out a graph is, which makes it useful for comparing network structure.
- Do not confuse diameter with radius, since radius focuses on one central vertex and diameter focuses on the farthest pair.

## FAQs

### What is diameter in Combinatorics?

Diameter is the greatest distance between any two vertices in a graph, where distance means the number of edges in the shortest path. It gives one number that describes how wide or spread out the graph is. In a line graph, the diameter is large, while in a complete graph, it is very small.

### How do you find the diameter of a graph?

Find the shortest-path distance between pairs of vertices, then take the largest of those distances. In small graphs, you can do this by inspection or by listing distances. In unweighted graphs, breadth-first search is a common tool for getting shortest-path distances.

### Is diameter the same as radius?

No. Diameter is the farthest shortest-path distance between any two vertices, while radius is the smallest maximum distance from one vertex to all others. Radius looks for the most central vertex, but diameter looks for the most distant pair.

### What happens to the diameter of a disconnected graph?

If two vertices are in different components, there is no path between them. Because of that, many combinatorics courses treat the diameter as infinite or undefined for disconnected graphs. The exact convention depends on the class, so match the wording your instructor uses.

## Related Study Guides

- [11.1 Paths, cycles, and walks in graphs](/combinatorics/unit-11/paths-cycles-walks-graphs/study-guide/U3zCGGTBH5vf5dw3)

## About This Document

Canonical Fiveable pages are available as Markdown at the same path plus `.md`.

- [llms.txt](https://fiveable.me/llms.txt): index of Fiveable's sections and URL patterns
- [llms-full.txt](https://fiveable.me/llms-full.txt): complete subject and unit listing
- [MCP server](https://fiveable.me/mcp): call Fiveable as tools instead of fetching pages (`https://fiveable.me/api/mcp`)
- [MCP server for AP teachers](https://fiveable.me/mcp/teachers): a teacher's classes, assignments and AP-rubric grading (`https://fiveable.me/api/mcp/teacher`)

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/combinatorics/key-terms/diameter#resource","name":"Diameter in Combinatorics","url":"https://fiveable.me/combinatorics/key-terms/diameter","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/combinatorics/key-terms/diameter#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"dateModified":"2026-07-03T02:21:06.613Z","isPartOf":{"@type":"Collection","name":"Combinatorics Key Terms","url":"https://fiveable.me/combinatorics/key-terms"},"publisher":{"@type":"Organization","name":"Fiveable","url":"https://fiveable.me"}},{"@type":"DefinedTerm","@id":"https://fiveable.me/combinatorics/key-terms/diameter#term","name":"Diameter","description":"Diameter is the largest distance between any two vertices in a graph, where distance means the number of edges in the shortest path. In Combinatorics, it measures how spread out a graph is.","url":"https://fiveable.me/combinatorics/key-terms/diameter","inDefinedTermSet":{"@type":"DefinedTermSet","name":"Combinatorics Key Terms","url":"https://fiveable.me/combinatorics/key-terms"}},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is diameter in Combinatorics?","acceptedAnswer":{"@type":"Answer","text":"Diameter is the greatest distance between any two vertices in a graph, where distance means the number of edges in the shortest path. It gives one number that describes how wide or spread out the graph is. In a line graph, the diameter is large, while in a complete graph, it is very small."}},{"@type":"Question","name":"How do you find the diameter of a graph?","acceptedAnswer":{"@type":"Answer","text":"Find the shortest-path distance between pairs of vertices, then take the largest of those distances. In small graphs, you can do this by inspection or by listing distances. In unweighted graphs, breadth-first search is a common tool for getting shortest-path distances."}},{"@type":"Question","name":"Is diameter the same as radius?","acceptedAnswer":{"@type":"Answer","text":"No. Diameter is the farthest shortest-path distance between any two vertices, while radius is the smallest maximum distance from one vertex to all others. Radius looks for the most central vertex, but diameter looks for the most distant pair."}},{"@type":"Question","name":"What happens to the diameter of a disconnected graph?","acceptedAnswer":{"@type":"Answer","text":"If two vertices are in different components, there is no path between them. Because of that, many combinatorics courses treat the diameter as infinite or undefined for disconnected graphs. The exact convention depends on the class, so match the wording your instructor uses."}}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Combinatorics","item":"https://fiveable.me/combinatorics"},{"@type":"ListItem","position":2,"name":"Key Terms","item":"https://fiveable.me/combinatorics/key-terms"},{"@type":"ListItem","position":3,"name":"Unit 11","item":"https://fiveable.me/combinatorics/unit-11"},{"@type":"ListItem","position":4,"name":"Diameter"}]}]}
```
