The degree, , of a vertex, , is the number of edges connected to the vertex. For an undirected graph with vertices, it is related to the adjacency matrix by:
Also the total number of edges is:
as each edge has two ends ('stubs').
The mean degree, is then:
.
Aside: a node with a "high" degree is sometimes called a 'hub'.
A network where all nodes have same degree is called 'regular'.
The number of edges in a complete (i.e. with max # of edges) simple graph can be found by counting the number of edges, where each edge represents a choice of a pair of vertices where the order doesn't matter. The number of such choices is .
The density (or connectance), , is the fraction of these that are actually present:
the last approx. is for large.
A network is sparse if as . It is dense otherwise. These definitions make sense mathematically when one has a model for an ensemble of graphs, that can be defined for any . For an empirical network, one has to situations:
For directed networks one has two types of degree:
in-degree, the number of ingoing edges (sum of a row in adj. matrix)
out-degree, the number of outgoing edges (sum of columns in adj. matrix).
Now the total number of edges is:
as each edge has one ingoing end and one outgoing end. Clearly then the mean degrees are equal: .
In a weighted network, one defines the strength of a node as the weighted degree:
,
where is the weight matrix.