Number of edges
As a number of edges is known in the graph theory , the number of edges of a graph .
If this is the graph under consideration, this number is usually noted with (or briefly , if it is clear which graph it is). Alternatively, you can also write .
definition
In the case of undirected graphs, the number of edges of a given graph is the number of its edges, or the sum of the multiples of the individual edges, if it is a graph with multiple edges.
It can also be seen as the thickness of the set of edges .
properties
 The following applies: . Here, the clique number of ; the number of nodes in the largest clique of . Equality occurs with complete graphs .
 Also applies

. is a stable set of and the degree of the knot . If equality occurs, there is a maximally stable set of the graph .
Calculation for different classes of graphs
In the following section, simple graphs are always assumed, i.e. undirected graphs without multiple edges .
Complete graph
The number of edges of the complete graph with nodes corresponds to
 ,
so the triangle number .
This can be seen from the fact that each edge is defined by two nodes and there are options to select two nodes.
Trees
Trees with nodes have edges according to Cayley's formula . It is a special case of Euler's polyhedron substitute for planar graphs (see planar graphs). The graph class of trees also includes linear graphs and star graphs . A star graph is a graph that has a central node that is connected to all other nodes. The other nodes only have this one neighbor.
Planar graphs
The number of edges of a planar graph can be calculated using Euler's polyhedron theorem for planar graphs
 .
The area number applies and is .
If you solve the equation for , you get
 .
Maximum planar graphs
A maximally planar graph is a graph to which no further edges can be added. If it has at least 3 nodes, it is a triangle graph and each of its areas is surrounded by 3 edges.
The number of edges of a maximal planar graph with at least 3 nodes is .
Regular graphs
For a regular graph with degrees and nodes, the number of edges is
 .
This is due to the fact that edges emanate from every node ; However, you count each edge twice and therefore have to divide by 2.
Given average degree
Given the average degree and number of nodes , the number of edges can be calculated as follows
 .
By multiplying with the number of all edges is in the numerator; however, each is counted twice, so it is divided by 2.
This formula is a generalization of the formula for regular graphs.
Bipartite graph
If a given graph is a bipartite graph whose node set can be divided into two disjoint subsets and , then only one maximum can be given for the number of edges.
Each node can be connected to a maximum of different nodes by an edge.
So there are at most edges.
Is a complete bipartite graph , then the number of edges is maximum and achieved exactly .
In general, the maximum number of edges of a kpartite graph with the disjoint subsets is
Here stands for the th triangular number . The formula can be derived by considering how many edges are still missing from a complete graph .
Since every  nodecolorable graph is also partite, the above formula can also be used for nodecolorable graphs.
Grid graph
A grid graph with nodes can be represented as a rectangle in which all edges have the same length.
The number of edges can be calculated by first counting the outer edges and then adding the inner ones.
There are
outer edges and
inner edges. Together that results
Edge.
Ladder graphs
A ladder graph has the structure of a ladder. It consists of two linear graphs of equal length (the spars), with two corresponding nodes being connected by an edge (the rungs).
The ladder graph with nodes has edges for the stiles and edges for the rungs, so in total
Edge.
Wheel graphs
A wheel graph consists of a circle graph to which another node connected to all nodes has been added. The wheel graph has nodes.
The number of edges of is calculated through
 .
Calculation from an adjacency matrix
If the adjacency matrix of a graph is given, it is very easy to determine the number of edges of this graph.
An adjacency matrix has an entry in the th row and th column for an edge that connects the nodes and . If the graph is undirected, the 1 is also in the th row and th column.
To calculate the number of edges, you just have to add up all the entries and divide by 2. This procedure also works for graphs with multiple edges.
Graphs that emerge from each other through operations
Dual graphs
For a given graph , the dual graph is created by replacing each area of with a vertex of . In addition, edges that separated areas from become edges that connect the new nodes from .
The number of edges remains the same with this method, so the following applies
 .
Isomorphic graphs
The fact that two graphs are isomorphic to one another means that they are structurally the same and only differ in the names of the nodes and edges.
Therefore, for two isomorphic graphs and
 .
Complement graphs
The complement graph of a graph is the graph that has the same set of nodes as , but all edges that do not.
The number of edges of the complement graph of can be calculated depending on the number of edges of .
Stands for the number of nodes . The formula is derived because the union of the two sets of nodes forms a complete graph.
Edge graphs
The edge graph of a graph arises when every edge of becomes a node of . Then the nodes of are connected by an edge that was adjacent in.
The formula for the number of edges of can be derived from the consideration that every node of is replaced by edges that connect the nodes that have arisen instead of the adjacent edges.
So it is
 .