GraphTheory
GraphSpectrum
compute spectrum of eigenvalues of a graph
Calling Sequence
Parameters
Options
Description
Examples
GraphSpectrum(G, opt)
G
-
graph
opt
(optional) the symbol exact or an equation of the form exact=true or false
exact=true or false
If exact or exact=true is specified, the eigenvalues are returned as exact expressions. If exact=false, the eigenvalues are returned as floating-point expressions. The default is false.
The GraphSpectrum command returns the spectrum of the eigenvalues of the adjacency matrix of a specified graph. The output is a list L. Each element of L is a list of size 2, where the first element is an eigenvalue and the second element is its multiplicity.
If argument exact or exact=true is provided, the eigenvalues are returned as exact expressions. Otherwise the eigenvalues are returned as floating-point expressions.
with⁡GraphTheory:
C5≔CycleGraph⁡5
C5≔Graph 1: an undirected graph with 5 vertices and 5 edge(s)
GraphSpectrum⁡C5
−1.618033990,2,0.6180339900,2,2.000000000,1
GraphSpectrum⁡C5,exact
−52−12,2,52−12,2,2,1
f≔CharacteristicPolynomial⁡C5,x
f≔x5−5⁢x3+5⁢x−2
factor⁡f
x−2⁢x2+x−12
See Also
AdjacencyMatrix
CharacteristicPolynomial
IsIntegerGraph
SeidelSpectrum
Download Help Document