What does it mean, precisely, for a graph to be dense or sparse? I understand the intuitive part, that a dense graph is one that has "many" edges and a sparse graph is one that has "few" edges, but I can't seem to find a concrete definition, since each book I've read uses a different one.
For instance, Diestel (4th edition) defines sparse graphs as "graphs whose number of edges is about linear in their number of vertices", and then goes on to prove various facts about sparse graphs, for example:
"There is a constant $c \in \mathbb{R}$ such that, for every $r \in \mathbb{N}$, every graph $G$ of average degree $d(G) \geq cr^2$ contains $K^r$ as a topological minor".
What I don't get is why is this a result that concerns sparse graphs? I mean, why is a graph of average degree $cr^2$ considered sparse?
Thank you in advance.
Dense and sparse mean different things in different contexts, so it's always good to check these definitions when it seems like they should be defined rigorously.
As for your specific example, we can see that the graphs in questions could be sparse, i.e. have their number of edges be linear in their number of vertices. As per your example, let's say we have a graph with $n$ vertices and average degree $cr^2$. Note that in this statement there is no dependence between $n$, $c$, and $r$. In many problems, we think of $n$ as sufficiently large whereas a parameter like $r$ is fixed. The number of edges in this graph is $cr^2 n$, and since $c$ and $r$ do not depend on $n$, the number of edges is indeed linear in the number of vertices. While the statement concerns all graphs with average degree at least $cr^2$, in the worst-case (least number of edges) the graph considered may be sparse. This is why this is a theorem about sparse graphs.
Alternatively, theorems about dense graphs may suppose some properties like $\delta(G) \geq \frac{n}{2}$ or the average degree is at least $n/4$. These are necessarily dense graphs.