Recent from talks
Nothing was collected or created yet.
Degree matrix
View on WikipediaIn the mathematical field of algebraic graph theory, the degree matrix of an undirected graph is a diagonal matrix which contains information about the degree of each vertex—that is, the number of edges attached to each vertex.[1] It is used together with the adjacency matrix to construct the Laplacian matrix of a graph: the Laplacian matrix is the difference of the degree matrix and the adjacency matrix.[2]
Definition
[edit]Given a graph with , the degree matrix for is a diagonal matrix defined as[1]
where the degree of a vertex counts the number of times an edge terminates at that vertex. In an undirected graph, this means that each loop increases the degree of a vertex by two. In a directed graph, the term degree may refer either to indegree (the number of incoming edges at each vertex) or outdegree (the number of outgoing edges at each vertex).
Example
[edit]The following undirected graph has a 6x6 degree matrix with values:
| Vertex labeled graph | Degree matrix |
|---|---|
Note that in the case of undirected graphs, an edge that starts and ends in the same node increases the corresponding degree value by 2 (i.e. it is counted twice).
Properties
[edit]The degree matrix of a k-regular graph has a constant diagonal of .
According to the degree sum formula, the trace of the degree matrix is twice the number of edges of the considered graph.
References
[edit]- ^ a b Chung, Fan; Lu, Linyuan; Vu, Van (2003), "Spectra of random graphs with given expected degrees", Proceedings of the National Academy of Sciences of the United States of America, 100 (11): 6313–6318, Bibcode:2003PNAS..100.6313C, doi:10.1073/pnas.0937490100, MR 1982145, PMC 164443, PMID 12743375.
- ^ Mohar, Bojan (2004), "Graph Laplacians", in Beineke, Lowell W.; Wilson, Robin J. (eds.), Topics in algebraic graph theory, Encyclopedia of Mathematics and its Applications, vol. 102, Cambridge University Press, Cambridge, pp. 113–136, ISBN 0-521-80197-4, MR 2125091.
Degree matrix
View on GrokipediaFundamentals
Definition
In graph theory, an undirected graph consists of a finite set of vertices and a set of unordered pairs with (possibly ) representing edges between vertices. The degree of a vertex , denoted , is the number of edges incident to it. In simple graphs without loops or multiple edges, this equals the number of distinct neighbors of . In general undirected graphs allowing loops and multiple edges, the degree is given by , where is the multiplicity (number) of edges between distinct vertices and , and is the number of loops at ; each loop contributes 2 to the degree, while each multiple edge contributes once to each endpoint. In weighted graphs, the degree is the sum of the weights of edges incident to , with a loop's weight contributing twice.[3] The degree matrix of with is the diagonal matrix where the diagonal entry for each , and all off-diagonal entries are zero.[4] Formally, where the are defined as above. This matrix encodes the degrees in a compact form, distinct from the adjacency matrix which captures direct connections between vertices.Notation and prerequisites
In graph theory, the degree matrix is commonly introduced using undirected simple graphs, which consist of a finite nonempty set of vertices and a set of edges , where each edge connects exactly two distinct vertices without direction. These graphs assume no self-loops (edges from a vertex to itself) or multiple edges between the same pair of vertices, ensuring a straightforward counting of connections per vertex. However, the concept extends to multigraphs with loops and multiple edges, as well as weighted and directed graphs.[5] While the degree matrix is primarily defined for undirected graphs, directed graphs introduce asymmetries via in-degrees and out-degrees, typically requiring separate matrices rather than a single degree matrix.[5] Standard notation denotes the degree matrix of a graph as or simply , represented in boldface as D to indicate its matrix form, with diagonal entries given by lowercase , the degree of vertex .[1] Formally, D is the diagonal matrix , where each counts the number of edges incident to .[1] In the context of weighted graphs, degrees are computed as the sum of weights on incident edges, extending the diagonal entries accordingly while maintaining the diagonal structure.[6] The concept of the degree matrix originated in early 20th-century graph theory as part of efforts to represent graph properties via matrices, with formalization in spectral graph theory during the 1950s and 1960s through analyses of adjacency and Laplacian matrices.[7]Construction
From graph degrees
The degree matrix of an undirected graph with vertex set is constructed by first determining the degree of each vertex , defined as the number of edges in incident to . The matrix is then the diagonal matrix , where all off-diagonal entries are zero.[8] The construction proceeds in the following steps: (1) For each vertex , compute by counting the edges connected to ; (2) assign to the -th entry of ; (3) set all off-diagonal entries to 0. This direct method ensures captures the local connectivity of each vertex without relying on other matrix representations.[9] A pseudocode implementation for building from the edge set (assuming 1-based indexing and an undirected simple graph) is:Initialize degrees array of size n to 0
For each edge {u, v} in E:
degrees[u] ← degrees[u] + 1
degrees[v] ← degrees[v] + 1
Initialize n × n matrix D to the [zero matrix](/page/Zero_matrix)
For i = 1 to n:
D[i, i] ← degrees[i]
Initialize degrees array of size n to 0
For each edge {u, v} in E:
degrees[u] ← degrees[u] + 1
degrees[v] ← degrees[v] + 1
Initialize n × n matrix D to the [zero matrix](/page/Zero_matrix)
For i = 1 to n:
D[i, i] ← degrees[i]
