gives a list of eigenvector centralities for the vertices in the graph g.
EigenvectorCentrality[g,"In"]
gives a list of in-centralities for a directed graph g.
EigenvectorCentrality[g,"Out"]
gives a list of out-centralities for a directed graph g.
EigenvectorCentrality[{vw,…},…]
uses rules vw to specify the graph g.
EigenvectorCentrality
gives a list of eigenvector centralities for the vertices in the graph g.
EigenvectorCentrality[g,"In"]
gives a list of in-centralities for a directed graph g.
EigenvectorCentrality[g,"Out"]
gives a list of out-centralities for a directed graph g.
EigenvectorCentrality[{vw,…},…]
uses rules vw to specify the graph g.
Details and Options
- EigenvectorCentrality will give high centralities to vertices that are connected to many other well-connected vertices.
- EigenvectorCentrality gives a list of centralities
that can be expressed as a weighted sum of centralities of its neighbors. - With
being the largest eigenvalue of the adjacency matrix
for the graph g, you have: -
EigenvectorCentrality[g] ![c=TemplateBox[{{{1, /, {lambda, _, 1}}, a}}, Transpose].c c=TemplateBox[{{{1, /, {lambda, _, 1}}, a}}, Transpose].c](Files/EigenvectorCentrality.en/4.png)
EigenvectorCentrality[g,"In"]
,
left eigenvectorEigenvectorCentrality[g,"Out"]
,
right eigenvector - Eigenvector centralities are normalized.
- For a directed graph g, EigenvectorCentrality[g] is equivalent to EigenvectorCentrality[g,"In"].
- The option WorkingPrecision->p can be used to control precision used in internal computations.
- EigenvectorCentrality works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open all close allBasic Examples (2)
Compute eigenvector centralities:
g = ExampleData[{"NetworkGraph", "Friendship"}];EigenvectorCentrality[g]HighlightGraph[g, VertexList[g], VertexSize -> Thread[VertexList[g] -> Rescale[%]]]Rank the vertices. Highest-ranked vertices are connected to many well-connected vertices:
g = ExampleData[{"NetworkGraph", "Friendship"}];Part[VertexList[g], Ordering[EigenvectorCentrality[g], All, Greater]]Scope (7)
EigenvectorCentrality works with undirected graphs:
EigenvectorCentrality[[image]]EigenvectorCentrality[[image]]EigenvectorCentrality[[image]]EigenvectorCentrality[[image]]Use rules to specify the graph:
EigenvectorCentrality[{1 -> 3, 2 -> 1, 3 -> 6, 4 -> 6, 1 -> 5, 5 -> 4, 6 -> 1}]Compute in-centralities and out-centralities:
EigenvectorCentrality[[image], "In"]EigenvectorCentrality[[image], "Out"]EigenvectorCentrality works with large graphs:
g = RandomGraph[{10000, 10005}];EigenvectorCentrality[g]//Short//TimingOptions (3)
WorkingPrecision (3)
By default, EigenvectorCentrality finds centralities using machine-precision computations:
EigenvectorCentrality[[image]]Specify a higher working precision:
EigenvectorCentrality[[image], WorkingPrecision -> 50]Infinite working precision corresponds to exact computation:
EigenvectorCentrality[[image], WorkingPrecision -> ∞]Applications (9)
Rank vertices by their connectivity to other well-connected vertices:
g = [image];Order vertices from highest to lowest centrality:
SortBy[{VertexList[g], EigenvectorCentrality[g]}, Last]//ReverseHighlight the eigenvector centrality for CycleGraph:
HighlightCentrality[g_, cc_] := HighlightGraph[g, Table[Style[VertexList[g][[i]], ColorData["TemperatureMap"][cc[[i]] / Max[cc]]], {i, VertexCount[g]}]];g = CycleGraph[8, VertexSize -> Large];cc = EigenvectorCentrality[g];HighlightCentrality[g, cc]g = GridGraph[{10, 10}, VertexSize -> Large];cc = EigenvectorCentrality[g];HighlightCentrality[g, cc]g = CompleteKaryTree[3, 3, VertexSize -> Large];cc = EigenvectorCentrality[g];HighlightCentrality[g, cc]g = PathGraph[Range[20], VertexSize -> Large];cc = EigenvectorCentrality[g];HighlightCentrality[g, cc]Find well-connected people in a social network:
g = ExampleData[{"NetworkGraph", "ZacharyKarateClub"}];Part[VertexList[g], Ordering[EigenvectorCentrality[g], -10]]HighlightGraph[g, %]Find the most influential members of a student government network with connections from student A to student B, if student A consults student B for opinions:
g = [image];Part[VertexList[g], Ordering[EigenvectorCentrality[g], -10]]A citation network from the High Energy Physics Phenomenology section of the arXiv e-Print archive. Find the top 10 important articles:
g = ExampleData[{"NetworkGraph", "HighEnergyPhysicsPhenomenology"}];c = EigenvectorCentrality[g, "In"];Part[VertexList[g], Ordering[c, -10]]Find hubs of the internet at the level of autonomous systems:
g = ExampleData[{"NetworkGraph", "Internet"}];SortBy[VertexList[g], VertexDegree[g, #]&]//Reverse//ShallowHubs are well-connected vertices and have the highest eigenvector centralities:
c = EigenvectorCentrality[g];
Table[VertexList[g][[i]], {i, Ordering[c, -4]}]Find a protein whose deletion will result in lethality in a protein interaction network of yeast:
UndirectedGraph[ExampleData[{"NetworkGraph", "ProteinInteraction"}]];network = Subgraph[%, First[ConnectedComponents[%]]];Protein with the largest eigenvector centrality:
Short[c = EigenvectorCentrality[network]]Pick[VertexList[network], c, Max[c]]Deleting the protein increases the diameter of the network:
{GraphDiameter[network], GraphDiameter[VertexDelete[network, %]]}A Saccharomyces cerevisiae protein interaction network. The frequency of the eigenvector centrality follows a power-law distribution:
g = ExampleData[{"NetworkGraph", "WholeNetworkSaccharomycesCerevisiae"}];c = EigenvectorCentrality[g];hist = Histogram[c, {"Log", 10}, {"Log", "PDF"}, Ticks -> None]Obtain the maximum likelihood parameter estimates, assuming a Pareto distribution:
𝒟 = EstimatedDistribution[Cases[c, x_ /; x > 0], ParetoDistribution[k, α]]PDF[𝒟, k]Show[{hist, LogLogPlot[PDF[𝒟, x], {x, 10^-14, 0.01}]}]A human-computer system of an organization that deals with internet orders and sends goods by mail. Find departments that should be given the most resources:
g = [image];With[{c = EigenvectorCentrality[g]}, Part[VertexList[g], Ordering[c, -2]]]Most services rely on a system administration department as well as a register orders department:
HighlightGraph[g, NeighborhoodGraph[g, %]]Properties & Relations (6)
For undirected graphs, the centrality vector
satisfies the equation
:
g = [image];c = EigenvectorCentrality[g];
a = N[AdjacencyMatrix[g]];
Subscript[λ, 1] = First[Eigenvalues[a, 1]];c == (1 / Subscript[λ, 1]) a.cFor directed graphs, in-centrality vector
satisfies the equation
:
g = [image];c = EigenvectorCentrality[g, "In"];
a = N[AdjacencyMatrix[g]];
Subscript[λ, 1] = First[Eigenvalues[a, 1]];c == (1 / Subscript[λ, 1]) a.cOut-centrality vector
satisfies the equation
:
c = EigenvectorCentrality[g, "Out"];
Subscript[λ, 1] = First[Eigenvalues[a, 1]];c == (1 / Subscript[λ, 1]) a.cEigenvector centralities are normalized:
EigenvectorCentrality[[image]]Total[%]For disconnected graphs, centralities are normalized with respect to the connected components:
g = [image];c = Last[ConnectedComponents[g]]Part[EigenvectorCentrality[g], c]Centrality of the subgraph generated by the connected component:
h = Subgraph[g, c];EigenvectorCentrality[h] * (VertexCount[h] - 1) / (VertexCount[g] - Length[ConnectedComponents[g]])EigenvectorCentrality is a special case of KatzCentrality:
g = [image];EigenvectorCentrality[g]Use
and
as the parameters for KatzCentrality:
α = 1 / First@Eigenvalues[N@AdjacencyMatrix[g], 1]KatzCentrality[g, α, 0] // Normalize[#, Total]&Use VertexIndex to obtain the centrality of a specific vertex:
g = ExampleData[{"NetworkGraph", "Friendship"}];EigenvectorCentrality[g][[VertexIndex[g, "Anna"]]]Related Guides
History
Introduced in 2010 (8.0) | Updated in 2012 (9.0) ▪ 2014 (10.0) ▪ 2015 (10.3)
Text
Wolfram Research (2010), EigenvectorCentrality, Wolfram Language function, https://reference.wolfram.com/language/ref/EigenvectorCentrality.html (updated 2015).
CMS
Wolfram Language. 2010. "EigenvectorCentrality." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/EigenvectorCentrality.html.
APA
Wolfram Language. (2010). EigenvectorCentrality. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EigenvectorCentrality.html
BibTeX
@misc{reference.wolfram_2026_eigenvectorcentrality, author="Wolfram Research", title="{EigenvectorCentrality}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/EigenvectorCentrality.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_eigenvectorcentrality, organization={Wolfram Research}, title={EigenvectorCentrality}, year={2015}, url={https://reference.wolfram.com/language/ref/EigenvectorCentrality.html}, note=[Accessed: 12-June-2026]}