Characteristic Polynomial

DOWNLOAD Mathematica Notebook

The characteristic polynomial is the polynomial left-hand side of the characteristic equation

 det(A-lambdaI)=0,
(1)

where A is a square matrix and I is the identity matrix of identical dimension. Samuelson's formula allows the characteristic polynomial to be computed recursively without divisions. The characteristic polynomial of a matrix m may be computed in the Wolfram Language as CharacteristicPolynomial[m, x].

The characteristic polynomial of a 2×2 matrix

 P_2(x)=(a_(11)a_(22)-a_(12)a_(21))-x(a_(11)+a_(22))+x^2
(2)

can be rewritten in the particularly nice form

 P_2(x)=det(A)-xTr(A)+x^2,
(3)

where Tr(A) is the matrix trace of A and det(A) is its determinant.

Similarly, the characteristic polynomial of a 3×3 matrix is

 P_3(x)=det(A)+1/2(a_(ij)a_(ji)-a_(ii)a_(jj))x+Tr(A)x^2-x^3,
(4)

where Einstein summation has been used, which can also be written explicitly in terms of traces as

 P_3(x)=1/6[Tr^3(A)+2Tr(A^3)-3Tr(A)Tr(A^2)]-1/2[Tr^2(A)-Tr(A^2)]x+Tr(A)x^2-x^3,
(5)

In general, the characteristic polynomial has the form

f(lambda)=det(lambda1-A)
(6)
=lambda^n-a_1lambda^(n-1)+...+(-1)^na_n,
(7)

where a_1=suma_(ii) is the matrix trace Tr(A) of the matrix A, a_n=det(A), and a_i is the sum of the i-rowed diagonal minors of the matrix A (Jacobson 1974, p. 109).

Le Verrier's algorithm for computing the characteristic polynomial of a graph (Balasubramanian 1984; Trinajstić 1988; Ivanciuc and Balaban 2000, p. 89) can be formulated as the solution of the linear system

 [1 0 ... 0 0; a_1 2 ... 0 0; a_2 a_1 ... 0 0; | ... ... ... |; a_(n-1) a_(n-2) ... a_1 n][c_1; c_2; c_3; |; c_n]=[a_1; a_2; a_3; |; a_n],
(8)

where

 f(x)=sum_(k=0)^nc_kx^(n-k),
(9)

c_0=-1, and a_k=Tr(A^k).

An algorithm due to Balasubramanian computes c_k using the equation

 c_k=1/kTr(B_(k-1)),
(10)

where

 B_k=A(B_(k-1)-c_kI)
(11)

(Balasubramanian 1985, 1985, 1991; Ivanciuc and Balaban 2000, p. 90; typo corrected) with B_0=A and c_0=-1.

The characteristic polynomial of a graph g is defined as the characteristic polynomial of its adjacency matrix and can be computed in the Wolfram Language using CharacteristicPolynomial[AdjacencyMatrix[g], x]. The precomputed characteristic polynomial of a named graph in terms of a variable x can also be obtained using GraphData[graph, "CharacteristicPolynomial"][x].

CharacteristicPolynomialGraphs

Characteristic polynomials are not diagnostic for graph isomorphism, i.e., two nonisomorphic graphs may share the same characteristic polynomial. The smallest such example occurs for the two graphs on five nodes illustrated above, both of which have characteristic polynomial 4x^3-x^5. The number of distinct characteristic polynomials for simple undirected graphs on n=1, 2, ... nodes are 1, 2, 4, 11, 33, 151, 988, 11453, ... (OEIS A082104), giving the number of duplicated characteristic polynomials as 0, 0, 0, 0, 1, 5, 56, 893, 27311, ....

The following table summarizes the characteristic polynomials for some simple graphs.

graphcharacteristic polynomial
complete graph K_2(z-1)(z+1)
complete graph K_3-(z-2)(z+1)^2
complete graph K_4(z-3)(z+1)^3
cyclic graph C_3-(z-2)(z+1)^2
cyclic graph C_4(z-2)z^2(z+2)
cyclic graph C_5-(z-2)(z^2+z-1)^2
cubical graph(z-3)(z-1)^3(z+1)^3(z+3)
octahedral graph(z-4)z^3(z+2)^2
tetrahedral graph(z-3)(z+1)^3
wheel graph W_5-z^2(z+2)(z^2-2z-4)
wheel graph W_6(z^2-2z-5)(z^2+z+1)^2

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.