VertexDegree
✖
VertexDegree
Details

- VertexDegree is also known as valence.
- The vertex degree for a vertex v is the number of edges incident to v.
- For a directed graph g, an edge is incident to a vertex whether it is an in-edge or an out-edge.

Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Find the degree for each vertex:

https://wolfram.com/xid/0b8enotae6-bdzwy9

Find the degree for a specified vertex:

https://wolfram.com/xid/0b8enotae6-erdgia

Vertex degrees of the HararyGraph:

https://wolfram.com/xid/0b8enotae6-bjy0qx


https://wolfram.com/xid/0b8enotae6-iec2l6

Scope (6)Survey of the scope of standard use cases
VertexDegree works with undirected graphs:

https://wolfram.com/xid/0b8enotae6-fvzxpm


https://wolfram.com/xid/0b8enotae6-fla6ma


https://wolfram.com/xid/0b8enotae6-uvnf7h


https://wolfram.com/xid/0b8enotae6-hzoot6

Use rules to specify the graph:

https://wolfram.com/xid/0b8enotae6-bndh30

VertexDegree works with large graphs:

https://wolfram.com/xid/0b8enotae6-pq9ae

https://wolfram.com/xid/0b8enotae6-f6o29t

Applications (4)Sample problems that can be solved with this function
Highlight the vertex by its vertex degree for CycleGraph:

https://wolfram.com/xid/0b8enotae6-gzipus

https://wolfram.com/xid/0b8enotae6-baipzx

https://wolfram.com/xid/0b8enotae6-g2btke

https://wolfram.com/xid/0b8enotae6-h351s2


https://wolfram.com/xid/0b8enotae6-h7904

https://wolfram.com/xid/0b8enotae6-fod79c

https://wolfram.com/xid/0b8enotae6-yoa55


https://wolfram.com/xid/0b8enotae6-jbz7i6

https://wolfram.com/xid/0b8enotae6-j70q6

https://wolfram.com/xid/0b8enotae6-hp22t8


https://wolfram.com/xid/0b8enotae6-gca8u7

https://wolfram.com/xid/0b8enotae6-fxghik

https://wolfram.com/xid/0b8enotae6-o6y56


https://wolfram.com/xid/0b8enotae6-duj4e6

https://wolfram.com/xid/0b8enotae6-659hg

https://wolfram.com/xid/0b8enotae6-cpnmy0


https://wolfram.com/xid/0b8enotae6-6ri66

https://wolfram.com/xid/0b8enotae6-fh33ql

https://wolfram.com/xid/0b8enotae6-iop80


https://wolfram.com/xid/0b8enotae6-fnxa4i

https://wolfram.com/xid/0b8enotae6-d5r4aw

https://wolfram.com/xid/0b8enotae6-f3cto8


https://wolfram.com/xid/0b8enotae6-lrv5x

https://wolfram.com/xid/0b8enotae6-cmlbzy
Find the people with more influence:

https://wolfram.com/xid/0b8enotae6-eqnxe

https://wolfram.com/xid/0b8enotae6-l9u5c

The degree distribution for a Bernoulli random graph follows a BinomialDistribution:

https://wolfram.com/xid/0b8enotae6-d1vm7b

Generate vertex degrees from 1000 instances of random graphs:

https://wolfram.com/xid/0b8enotae6-ft9uun

Find the probability that a Bernoulli random graph has max degree greater than 50:

https://wolfram.com/xid/0b8enotae6-b521ri


https://wolfram.com/xid/0b8enotae6-bhpcac

The vertex degree distribution for BarabasiAlbertGraphDistribution follows a power-law:

https://wolfram.com/xid/0b8enotae6-jroi74

https://wolfram.com/xid/0b8enotae6-b0tydj

Properties & Relations (15)Properties of the function, and connections to other functions
The degree of a vertex of an undirected graph is the number of edges incident to the vertex:

https://wolfram.com/xid/0b8enotae6-lotoz


https://wolfram.com/xid/0b8enotae6-iw9hke


https://wolfram.com/xid/0b8enotae6-fl4x40


https://wolfram.com/xid/0b8enotae6-52dw

For an undirected graph, the vertex in-degree and out-degree are equal to the vertex degree:

https://wolfram.com/xid/0b8enotae6-nch4i7


https://wolfram.com/xid/0b8enotae6-boamnk

For a directed graph, the sum of the vertex in-degree and out-degree is the vertex degree:

https://wolfram.com/xid/0b8enotae6-c7g75m
Put the vertex degree, in-degree, and out-degree before, above, and below the vertex, respectively:

https://wolfram.com/xid/0b8enotae6-bvebwh


https://wolfram.com/xid/0b8enotae6-jrbvj2

The sum of the degrees of all vertices of a graph is twice the number of edges:

https://wolfram.com/xid/0b8enotae6-nc90z


https://wolfram.com/xid/0b8enotae6-co2r0o

Every graph has an even number of vertices with odd degree:

https://wolfram.com/xid/0b8enotae6-iuigjp


https://wolfram.com/xid/0b8enotae6-biu7nm


https://wolfram.com/xid/0b8enotae6-durc4r

Connected simple graphs have minimum vertex degree of at least :

https://wolfram.com/xid/0b8enotae6-b1eqe


https://wolfram.com/xid/0b8enotae6-dsdena


https://wolfram.com/xid/0b8enotae6-ehyr7g

A graph with minimum vertex degree at least 2 contains a cycle:

https://wolfram.com/xid/0b8enotae6-i86r19


https://wolfram.com/xid/0b8enotae6-7ebzl


https://wolfram.com/xid/0b8enotae6-4d6x3

The vertex degrees of an undirected graph can be obtained from its adjacency matrix:

https://wolfram.com/xid/0b8enotae6-bbjeit

https://wolfram.com/xid/0b8enotae6-cji5i


https://wolfram.com/xid/0b8enotae6-k903ls


https://wolfram.com/xid/0b8enotae6-ej029e

The vertex degrees of a directed graph can be obtained from its adjacency matrix:

https://wolfram.com/xid/0b8enotae6-ip1730

https://wolfram.com/xid/0b8enotae6-d068v1


https://wolfram.com/xid/0b8enotae6-d6r2qp


https://wolfram.com/xid/0b8enotae6-ch7kgq

The vertex degrees for an undirected graph can be obtained from the incidence matrix:

https://wolfram.com/xid/0b8enotae6-bz15n2

https://wolfram.com/xid/0b8enotae6-clt22t


https://wolfram.com/xid/0b8enotae6-gygas4


https://wolfram.com/xid/0b8enotae6-eanta7

The vertex degrees for a directed graph can be obtained from the incidence matrix:

https://wolfram.com/xid/0b8enotae6-eaeipp

https://wolfram.com/xid/0b8enotae6-ckixb5


https://wolfram.com/xid/0b8enotae6-ctf2dr


https://wolfram.com/xid/0b8enotae6-e548vm

Each vertex of a -regular graph has the same vertex degree
:

https://wolfram.com/xid/0b8enotae6-cdwjr4


https://wolfram.com/xid/0b8enotae6-bjrxkl

All vertices of a simple graph have maximum degree less than the number of vertices:

https://wolfram.com/xid/0b8enotae6-zn8ie


https://wolfram.com/xid/0b8enotae6-byf3az


https://wolfram.com/xid/0b8enotae6-px3kye

A simple graph without isolated vertices has at least one pair of vertices with equal degrees:

https://wolfram.com/xid/0b8enotae6-bjygid


https://wolfram.com/xid/0b8enotae6-mc9b


https://wolfram.com/xid/0b8enotae6-dl6hhf

A connected undirected graph is Eulerian iff every vertex has an even degree:

https://wolfram.com/xid/0b8enotae6-jgb5ug


https://wolfram.com/xid/0b8enotae6-cqry6f


https://wolfram.com/xid/0b8enotae6-egw5c2

Wolfram Research (2010), VertexDegree, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexDegree.html (updated 2015).
Text
Wolfram Research (2010), VertexDegree, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexDegree.html (updated 2015).
Wolfram Research (2010), VertexDegree, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexDegree.html (updated 2015).
CMS
Wolfram Language. 2010. "VertexDegree." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/VertexDegree.html.
Wolfram Language. 2010. "VertexDegree." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/VertexDegree.html.
APA
Wolfram Language. (2010). VertexDegree. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexDegree.html
Wolfram Language. (2010). VertexDegree. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexDegree.html
BibTeX
@misc{reference.wolfram_2025_vertexdegree, author="Wolfram Research", title="{VertexDegree}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/VertexDegree.html}", note=[Accessed: 25-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_vertexdegree, organization={Wolfram Research}, title={VertexDegree}, year={2015}, url={https://reference.wolfram.com/language/ref/VertexDegree.html}, note=[Accessed: 25-March-2025
]}