---
format:
html:
html-math-method: katex
---
Generating Polynomials, Part 2: Ghostly Chains
==============================================
In the [previous post](), I tied the geometry regular polygons to a sequence of polynomials though some clever algebraic manipulation. But let's deign to ask a very basic question: what is a polygon?
Fundamentally, it is just a collection of vertices and edges. Each vertex is connected to its two neighbors by two edges. Only examining these figures by their connectedness is precisely the kind of thing *graph theory* deals with. Graph can seem like a strange name, as it has no relation to the familiar graphs on a Cartesian plane one may be familiar with. Either way, it is a worthy subject of study, and will be the focus of this article.
Loops without Distance
----------------------
For polygons in a Euclidean setting, the position of points matters, as well as which points connect to which. A rectangle is different from a trapezoid or a kite. However, topologically, all of these are quadrilateral graphs and cannot be distinguished; they are but a simple notion of 4 points in a loop.
![]()
From a graph theory perspective, the vertices are sometimes called nodes. In these graphs, each edge has no direction associated to it, so the graph is called *undirected*. Additionally, these graphs are *planar* since the nodes can be arranged so that no nodes cross another, despite the appearance of the lower-right figure.
If the graph is a simple loop, it is called a [*cycle graph*](https://en.wikipedia.org/wiki/Cycle_graph), denoted $C_n$, where n is the number of nodes. In a cycle graph, all nodes and all edges are identical to each of the others. Therefore, the best geometric interpretation is a shape which is
- Regular, so that each edge and each angle (vertex) are of equal measure
- Convex, so that no edge meets another without creating a vertex (or node)
In other words, $C_3$ is analogous to an equilateral triangle, $C_4$ is analogous to a square, and so on.
### Encoding Graphs
There are two primary ways to store information about a graph. The first is by labelling each node (for example, with integers), then recording the edges as a list of pairs of connected nodes. In the case of an undirected graph, these are unordered pairs. While such a list is convenient, it doesn't convey a lot of information about the graph besides the number of edges.
Alternatively, these pairs can also be interpreted as addresses in a matrix, called an *adjacency matrix*.
$$
\begin{align*}
C_3 := \begin{matrix} [(0, 1),\\ (1, 2),\\ (2, 0)] \end{matrix} &\cong
\begin{pmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{pmatrix} \\ \\
C_4 := \begin{matrix} [(0, 1),\\ (1, 2),\\ (2, 3),\\ (3, 0)] \end{matrix} & \cong
\begin{pmatrix} 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 \end{pmatrix} \\ \\
C_5 := \begin{matrix} [(0, 1),\\ (1, 2),\\ (2, 3),\\ (3, 4),\\ (4, 0)] \end{matrix} &\cong
\begin{pmatrix} 0 & 1 & 0 & 0 & 1 \\ 1 & 0 & 1 & 0 & 0 \\
0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 1 \\ 1 & 0 & 0 & 1 & 0 \end{pmatrix} \\
\end{align*}
$$
Each adjacency matrix is square, where each column and row refer to a specific node. An entry is 1 when the nodes corresponding to the row and column of its address are joined by an edge (and zero otherwise). For undirected graphs, these matrices are symmetric, since it is possible to traverse an edge in either direction.
Swapping the labels on two nodes is as simple as exchanging two rows and two columns. Just one of these swaps would flip the sign of the determinant of the adjacency matrix. However, since they occur in pairs, the determinant is invariant of the labelling (equally, a graph invariant).
Prismatic Recurrence
--------------------
The determinant of a matrix is also the product of its eigenvalues, which are another matrix invariant. The set of eigenvalues is also called its *spectrum*, and the study of the spectra of graphs is called [*spectral graph theory*](https://en.wikipedia.org/wiki/Spectral_graph_theory), which is among the most mystifying names in math to read for the first time.
Eigenvalues are the roots of the characteristic polynomial of a matrix. The matrix $C_5$ is sufficiently large enough to generalize to $C_n$, and its characteristic polynomial by [Laplace expansion](https://en.wikipedia.org/wiki/Laplace_expansion) is:
$$
\begin{gather*}
Ax = \lambda x \implies (\lambda I - A)x = 0 \\ \\
c_5(\lambda) = |\lambda I - C_5| = \left |
\begin{matrix} \lambda & -1 & 0 & 0 & -1 \\ -1 & \lambda & -1 & 0 & 0 \\
0 & -1 & \lambda & -1 & 0 \\ 0 & 0 & -1 & \lambda & -1 \\ -1 & 0 & 0 & -1 & \lambda \end{matrix}
\right | \\
= \lambda m_{1,1}
+ \overbrace{(-1)}^\text{entry}\overbrace{(-1)^{1 + 2 \ }}^\text{sign} m_{1, 2}
+ \overbrace{(-1)}^\text{entry}\overbrace{(-1)^{1 + 5 \ }}^\text{sign} m_{1, 5}
\end{gather*}
$$
Note that every occurrence of "5" generalizes to higher *n*. The first minor is easily expressed in terms of *another* matrix's characteristic polynomial.
$$
m_{1, 1} = \left |
\begin{matrix} \lambda & -1 & 0 & 0 \\ -1 & \lambda & -1 & 0 \\
0 & -1 & \lambda & -1 \\ 0 & 0 & -1 & \lambda \end{matrix}
\right | = |\lambda I - P_4| = p_{5-1}(\lambda)
$$
We will come to the meaning of the $P_n$ in a moment. Meanwhile, the second and third minors require another expansion, but one that (thankfully) quickly terminates.
$$
\begin{matrix}
m_{1, 2} =& \left |
\begin{matrix}-1 & -1 & 0 & 0 \\ 0 & \lambda & -1 & 0 \\
0 & -1 & \lambda & -1 \\ -1 & 0 & -1 & \lambda \end{matrix}
\right | &=& (-1) \left |
\begin{matrix}\lambda & -1 & 0 \\ -1 & \lambda & -1 \\ 0 & -1 & \lambda \end{matrix}
\right | &+& (-1)(-1)^{1 + 4} \left |
\begin{matrix}-1 & 0 & 0 \\\lambda & -1 & 0 \\ -1 & \lambda & -1 \end{matrix}
\right | \\
&&=& (-1)|\lambda I - P_3| &+& (-1)\overbrace{(-1)^{5}(-1)^{5 - 2}}^{\text{even, even when $\scriptsize n \neq 5$}} \\
&&=& ((-1)p_{5 - 2}(\lambda) &+& (-1)) \\
&&=& -(p_{5 - 2}(\lambda) &+& 1) \\
\\
m_{1, 5} =& \left |
\begin{matrix}-1 & \lambda & -1 & 0 \\ 0 & -1 & \lambda & -1 \\
0 & 0 & -1 & \lambda \\ -1 & 0 & 0 & -1 \end{matrix}
\right | &=& (-1) \left |
\begin{matrix}-1 & \lambda & -1 \\ 0 & -1 & \lambda \\ 0 & 0 & -1 \end{matrix}
\right | &+& (-1)(-1)^{5 - 2} \left |
\begin{matrix}\lambda & -1 & 0 \\ -1 & \lambda & -1 \\
0 & -1 & \lambda \end{matrix}
\right | \\
&&=& (-1)(-1)^{5-2} &+& (-1)(-1)^{5 - 2}|\lambda I - P_3| \\
&&=& (-1)^{5-1}((-1)(-1) &+& (-1)(-1)p_{5 - 2}(\lambda)) \\
&&=& (-1)^{5-1}(1 &+& p_{5 - 2}(\lambda))
\end{matrix}
$$
All together, this produces a characteristic polynomial in terms of the polynomials $p_n$:
$$
\begin{align*}
&&c_5(\lambda) &= \lambda p_{5 - 1}
+ (-1)(p_{5 - 2} + 1)
+ (-1)\overbrace{(-1)^{5 - 1} (-1)^{5 - 1}}^{\text{even, even when $\scriptsize n \neq 5$}}(p_{5 - 2} + 1) \\
&&&= \lambda p_{5 - 1}
- (p_{5 - 2} + 1)
- (p_{5 - 2} + 1) \\
&&&= \lambda p_{5 - 1}
- 2(p_{5 - 2} + 1) \\
&&\implies c_n(\lambda) &= \lambda p_{n - 1}(\lambda)
- 2(p_{n - 2}(\lambda) + 1) \\
\end{align*}
$$
This resembles a recurrence relation, which is great, but it is meaningless without knowing $p_n$.
Powerful Chains
---------------
The various $P_n$ are in fact the adjacency matrices of a path on *n* nodes.
![]()
$$
\begin{align*}
P_2 &:= \begin{matrix} [(0, 1)] \end{matrix} \cong
\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \\
P_3 &:= \begin{matrix} [(0, 1),\\ (1, 2)] \end{matrix} \cong
\begin{pmatrix} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix} \\
P_4 &:= \begin{matrix} [(0, 1),\\ (1, 2),\\ (2, 3)] \end{matrix} \cong
\begin{pmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix} \\ \\
\end{align*}
$$
Without the entries in the corners of the matrix, the characteristic polynomials of $P_n$ are much easier to solve for.
$$
\begin{gather*}
p_4(\lambda) = |\lambda I - P_4| = \left |
\begin{matrix} \lambda & -1 & 0 & 0 \\ -1 & \lambda & -1 & 0 \\
0 & -1 & \lambda & -1 \\ 0 & 0 & -1 & \lambda \end{matrix}
\right | \\ \\
= \lambda \left |
\begin{matrix} \lambda & -1 & 0 \\ -1 & \lambda & -1 \\ 0 & -1 & \lambda \end{matrix}
\right | + (-1)(-1)^{1+2} \left |
\begin{matrix} -1 & -1 & 0 \\ 0 & \lambda & -1 \\ 0 & -1 & \lambda \end{matrix}
\right | \\ \\
= \lambda |\lambda I - P_3| + \left ( (-1) \left |
\begin{matrix} \lambda & -1 \\ -1 & \lambda \end{matrix}
\right | + (-1)(-1) \left |
\begin{matrix} 0 & -1 \\ 0 & \lambda \end{matrix}
\right | \right) \\ \\
= \lambda |\lambda I - P_3| - |\lambda I - P_2| \\
= \lambda p_{4 - 1}(\lambda) - p_{4 - 2}(\lambda) \\
\implies p_{n}(\lambda) = \lambda p_{n - 1}(\lambda) - p_{n - 2}(\lambda)
\end{gather*}
$$
While the earlier equation for $c_n$ in terms of $p_n$ reminded of a recurrence relation, actually is one (if perhaps eerily familiar).
Since the recurrence has order 2, it requires two initial terms: $p_0$ and $p_1$. The graph corresponding to $p_1$ is a single node, not connected to anything. Therefore, its adjacency matrix is a 1x1 matrix with 0 as its only entry, and its characteristic polynomial is $\lambda$. By the recurrence, $p_2 = \lambda p_1 -\ p_0 = \lambda^2 -\ p_0$. Equating terms with the characteristic polynomial of $P_2$, it is obvious that
$$
|\lambda I - P_2| = \begin{pmatrix}\lambda & -1 \\ -1 & \lambda \end{pmatrix}
= \lambda^2 - 1 = \lambda p_1 - p_0 \\
\implies p_0 = 1
$$
which makes sense, since $p_0$ should have degree zero. Therefore, the sequence of polynomials $p_n(\lambda)$ is:
$$
\begin{gather*}
p_0(\lambda) =& && 1 \\
p_1(\lambda) =& && \lambda \\
p_2(\lambda) =& \lambda \lambda - 1 &=& \lambda^2 - 1 \\
p_3(\lambda) =& \lambda (\lambda^2 - 1) - \lambda &=& \lambda(\lambda^2 - 2) \\
p_4(\lambda) =& \lambda (\lambda(\lambda^2 - 2)) - (\lambda^2 - 1)
&=& \lambda^4 - 3\lambda^2 + 1 \\
\vdots&\vdots&&\vdots
\end{gather*}
$$
But wait, we've seen these before (if you read the previous post, that is). These are just the Chebyshev polynomials of the second kind, evaluated at $\lambda / 2$. Indeed, their recurrence relations are identical, and the characteristic polynomial of $P_n$ is $U_n(\lambda / 2)$. Effectively, this connects an n-path to a regular $n+1$-gon.
Since the generating function of $U_n$ is known, the generating function for the $c_n$ which prompted this is also easily determined. For ease of use, let
$$
P(x; \lambda) = {B(x; \lambda / 2) \over x} = {1 \over 1 - \lambda x +\ x^2}
$$
Discarding the initial $c_0$ and $c_1$ by setting them to 0, the generating function is
$$
\begin{align*}
c_{n+2}(\lambda) &= \lambda p_{n+1}(\lambda) - 2(p_n(\lambda) + 1) \\ \\
{C(x; \lambda) - c_0(\lambda) - x c_1(\lambda) \over x^2}
&= \lambda \left( {P(x; \lambda) - 1 \over x} \right)
- 2\left( P(x; \lambda) + {1 \over 1 - x} \right) \\
C &= x \lambda (P - 1) -\
2x^2\left( P + {1 \over 1 - x} \right) \\
C{(1 - x) \over P} &= x \lambda \left(1 - {1 \over P} \right)(1 - x) -\
2x^2\left( (1 - x) + {1 \over P} \right) \\
&= x^4 \lambda - 2 x^4 - x^3 \lambda^2 + x^3 \lambda
+ 2 x^3 + x^2 \lambda^2 - 4 x^2 \\
&= x^2 (\lambda - 2) (x^2 - \lambda x - x + \lambda + 2) \\ \\
C(x; \lambda) &= x^2 (\lambda - 2)
{(x^2 - (\lambda + 1) x + \lambda + 2)
\over (1 - x)(1 - \lambda x + x^2)}
\end{align*}
$$
While the numerator is considerably more complicated than the one for P, the factor $\lambda -\ 2$ drops out of the entire series, pleasantly informing that 2 is an eigenvalue of all $C_n$.
Some other Exceptional Graphs
-----------------------------
And now for something completely different (and which prompted me to research this topic in the first place). Another simple family of graphs are [*trees*](https://en.wikipedia.org/wiki/Tree_%28graph_theory%29). They are in some sense opposite to the cycle graphs, since they contain no cycles.
### Platonic Trees
Of trees, three small ones (which are not also paths) stand out. They are based on the [Schläfli symbols](https://en.wikipedia.org/wiki/Schl%C3%A4fli_symbol) of the Platonic solids. These expressions convey which regular polygon is present, and how many of them are found at every vertex.
- Tetrahedron: {3, 3}
- Equilateral triangles, three around a vertex
- Octahedron: {3, 4}
- Equilateral triangles, four around a vertex
- Icosahedron: {3, 5}
- Equilateral triangles, five around a vertex
- Cube: {4, 3}
- Squares, three around a vertex
- Dodecahdedron: {5, 3}
- Regular pentagons, three around a vertex
Each edge in a Platonic solid connects two faces, which gives a third parameter of 2. From each parameter, create a $n-1$-path, and join the three to a central node. Intuitively, this is because we have shown that $n-1$-paths are related to regular *n*-gons, which show up in the pairs of dual Platonic solids.
::: {}
![]()
Adjacency matrices of T as a heatmap. Purple is 0, yellow is 1.
:::
Dispensing with the Laplace expansion and finding a recurrence relation, the characteristic polynomials for each of the three trees is
$$
\begin{align*}
|\lambda I - T_{3,3}| = t_{3,3}(\lambda)
&= \lambda^{6} - 5 \lambda^{4} + 5 \lambda^{2} - 1 \\
&= (\lambda - 1) (\lambda + 1) (\lambda^{4} - 4 \lambda^{2} + 1) \\
|\lambda I - T_{3,4}| = t_{3,4}(\lambda)
&= \lambda^{7} - 6 \lambda^{5} + 9 \lambda^{3} - 3 \lambda \\
&= \lambda (\lambda^{6} - 6 \lambda^{4} + 9 \lambda^{2} - 3) \\
|\lambda I - T_{3,5}| = t_{3,5}(\lambda)
&= \lambda^{8} - 7 \lambda^{6} + 14 \lambda^{4} - 8 \lambda^{2} + 1
\end{align*}
$$
Searching the OEIS for the coefficients of $t_{3,5}$ returns sequence [A228786](http://oeis.org/A228786), which informs that it is the minimal polynomial of $2\sin( \pi/15 )$. This sequence also informs that, where $m_n$ is the minimal polynomial of $2\sin( \pi / n )$:
- $t_{3,3} = m_6(\lambda) \cdot -m_6(-\lambda) \cdot m_{12}(\lambda)$
- $t_{3,4} = m_1(\lambda) \cdot m_9(\lambda)$
Perhaps this is not surprising, given how $2\cos(\pi / n)$ also appear in the spectra of graphs. However, I am perplexed by the apparent relationship of tetrahedra to dodecagons, octahedra to enneagons, and icosahedra to 15-gons. It is also strange that 9 is *not* related to the smallest Platonic solid, and is sandwiched between 12 and 15.
### Wooden Tiles
Platonic solids can be seen as regular tilings of the sphere. Schläfli symbols also exist for the regular tilings of the plane (which can also tile the torus, another topologically significant object).
- Triangular tiling: {3, 6}
- Equilateral triangles; 6 around a vertex
- Square tiling: {4, 4}
- Squares; 4 around a vertex
- Hexagonal tiling: {6, 3}
- Regular hexagons; 3 around a vertex
::: {}
![]()
Adjacency matrices as a heatmap
:::
I would prefer *not* to wrestle the adjacency matrices into a general recurrence relation, but if one would like to go down this route, try using the Laplace expansion of the southmost tip of the "island" in the $T_{3,n}$ graphs as an example.
The characteristic polynomials of *these* graphs are
$$
\begin{align*}
|\lambda I - T_{4,4}| = t_{4,4}(\lambda)
&= \lambda^{8} - 7 \lambda^{6} + 14 \lambda^{4} - 8 \lambda^{2} \\
&= (\lambda - 1) (\lambda + 1) (\lambda^{4} - 4 \lambda^{2} + 1) \\
&= m_6(\lambda) \cdot -m_6(-\lambda) \cdot m_8(\lambda) \\
|\lambda I - T_{3,6}| = t_{3,6}(\lambda)
&= \lambda^{9} - 8 \lambda^{7} + 20 \lambda^{5} - 17 \lambda^{3} + 4 \lambda \\
&= \lambda (\lambda - 1)(\lambda + 1) (\lambda - 2)(\lambda + 2)
(\lambda^{2} - \lambda - 1) (\lambda^{2} + \lambda - 1) \\
&= m_1(\lambda) \cdot m_6(\lambda) \cdot -m_6(-\lambda)
\cdot m_2(\lambda) \cdot -m_2(-\lambda)
\cdot m_{10}(\lambda) \cdot m_{10}(-\lambda) \\
\end{align*}
$$
Where the $m_n$ come from the sine polynomial series. To me, this implies that where chains are connected to cosines of fractions of a half-turn, these trefoil trees are connected to sines of fractions of turns (but you'd have to derive a general rule to be sure).
Closing
-------
Regardless of whether chains or polygons are more fundamental, it is certainly interesting that they are just an algebraic stone's (a *calculus*'s?) toss away from one another. Perhaps Euler skipped such stones from the bridges of Koenigsberg which inspired him to initiate graph theory.