\(\newcommand{\pb}[0]{\overline{\phi}}\) \(\newcommand{\cb}[0]{\overline{C}}\) \(\newcommand{\pbn}[1]{\pb\vphantom{\phi}^{#1}}\) \(\newcommand{\Pb}[0]{\overline{\Phi}\vphantom{\Phi}}\) \(\newcommand{\Pbn}[1]{\Pb^{#1}}\)
Matrix Square Roots and Related Fibonacci Matrices#
Fibonacci and Lucas Sequences#
The Fibonacci sequence \(1, 1, 2, 3, 5, 8...\) is defined by setting the first two values to \(1\) and thereafter setting each member of the sequence equal to the sum of the two values just before it. The definition can be extended to include values before the initial two \(1\)s. Formally, if we denote the \(n^{th}\) member of the sequence as \(F_n\),
So that the series is double-ended and looks like:
A related sequence is the Lucas numbers which can be defined \(L_n=F_{n-1}+F_{n+1}\) and looks like:
Fibonacci, Lucas, and the Golden Ratio \(\phi\)#
The Fibonacci sequence famously relates to the golden ratio \(\phi = \frac{1+\sqrt 5}{2}\) in the following way:
In words, the ratio of successive Fibonacci numbers tends to the golden ratio \(\phi\). The same can be said of the Lucas numbers:
But the relationships among the golden ratio and the two sequences run much deeper. Let’s denote the rational conjugate of \(\phi\) as \(\pb=\frac{1 - \sqrt 5}{2}\). Here is a list of some of the most important properties among \(\phi\), \(\pb\), \(F_n\), and \(L_n\):
I won’t write here much explanation for the properties above, but notice that the list includes explicit formulas for calculating Lucas and Fibonacci numbers using powers of \(\phi\) and \(\pb\). The list also shows more than one way to express powers of \(\phi\) and \(\pb\) using Lucas and/or Fibonacci numbers.
Matrix Roots and Matrices \(\Phi\) and \(\Pb\)#
Note that the expressions for \(\phi\) and \(\pb\) above rely on \(\sqrt 5\). In the realm of scalar numbers, \(\pm \sqrt 5\) are the only square roots of \(5\). Let’s shift focus to matrices. Let \(I\) denote the \(2 \times 2\) identity matrix, \(I = \left[ \begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix} \right]\). Then we can consider square roots of \(5I\). There are infinitely many. Examples include:
Let \(R\) denote a square root of \(5I\). Define \(\Phi=\frac{I+R}{2}\) and \(\Pb=\frac{I-R}{2}\). Remarkably, \(\Phi\) and \(\Pb\) thus defined mimic all the properties of \(\phi\) and \(\pb\) listed in the previous section:
Furthermore, any such matrix \(\Phi=\frac{I+R}{2}\) satisfies the matrix equation \(X^2=X+I\). The converse is also true: Any \(2 \times 2\) matrix satisfying \(X^2=X+I\) will be of the form \(\frac{I+R}{2}\).
\(\Phi\) for Specific Roots of \(5I\)#
The previous subsection discussed matrices of the form \(\Phi = \frac{I+R}{2}\) where \(R\) is a chosen matrix square root of \(5I\). It tends to be the case that powers of \(\Phi\) contain Fibonacci numbers and/or related values such as Lucas numbers and powers of the golden ratio, so such a matrices \(\Phi\) could be called Fibonacci matrices. Some choices of \(R\) lead to matrices \(\Phi\) with special properties. Let’s review some examples.
Example 1#
Suppose \(R = \left[\begin{matrix} 1 & 2\\ 2 & -1 \end{matrix}\right] \), so that \(\Phi = \frac{I+R}{2} = \left[\begin{matrix} 1 & 1\\ 1 & 0 \end{matrix}\right] \).
This is the Fibonacci matrix, also known as the Fibonacci Q-matrix. Two notable properties are:
and
In this case, \(\Phi\) expresses the recursive formula that the Fibonacci numbers obey, which is \(F_n = F_{n-1} +F_{n-1}\). If we define a Fibonacci vector \(\vec{F_n} = \left[\begin{matrix} F_n \\ F_{n-1} \end{matrix}\right] \), then \(\Phi\) will advance it to \(\vec{F_{n+1}}\):
The Lucas numbers obey the same recursive rule, \(L_n = L_{n-1} +L_{n-1}\), so that if we define a Lucas vector \(\vec{L_n} = \left[\begin{matrix} L_n \\ L_{n-1} \end{matrix}\right] \) then
More generally,
Example 2#
Suppose \(R = \left[\begin{matrix} 0 & 1\\ 5 & 0 \end{matrix}\right] \), so that \(\Phi = \frac{I+R}{2} = \left[\begin{matrix} \frac 1 2 & \frac 1 2\\ \frac 5 2 & \frac 1 2 \end{matrix}\right] \).
In this case,
This \(\Phi\) expresses a pair of identities: $\( F_{n+1} = \frac{L_n + F_n}{2} \quad \text{and} \quad L_{n+1} = \frac{5F_{n}+L_n}{2} \)$
So:
This matrix \(\Phi\) is special because it is a matrix representation of the golden ratio \(\phi = \frac 12 + \frac{\sqrt 5}2\) in much the same sense that \(\left[\begin{matrix} a & b\\ -b & a \end{matrix}\right]\) is the matrix representation of the complex number \(a+bi\).
Example 3#
Let’s consider a more general example. If a matrix \(R = \left[\begin{matrix} a & b\\ c & d \end{matrix}\right]\) satisfies \(R^2 = 5I\), then the following must hold:
Let’s assume \(b\) and \(c\) are non-zero. It follows that \(d = -a\) and \(c = \frac{5 - a^2}{b}\). So we can write \(R\) in terms of \(a\) and \(b\) only as \(R = \left[\begin{matrix} a & b\\ \frac{5 - a^2}{b} & -a \end{matrix}\right]\). Then \(\Phi = \frac{I+R}{2} = \left[\begin{matrix} \frac{1+a}{2} & \frac{b}{2}\\ \frac{5-a^2}{2b} & \frac{1-a}{2} \end{matrix}\right] \). This form generalizes examples 1 and 2 above. Let’s investigate what powers of \(\Phi\) look like using a bit of code:
from sympy import *
phi = (1 + sqrt(5))/2
phibar = 1 - phi
a, b = symbols('a, b')
Phi = Matrix([[(a+1)/2, b/2],[(5-a**2)/(2*b), (-a+1)/2]])
Phis = symbols(r'\Phi')
display(Eq(Phis, Phi, evaluate=False))
display(Eq(Phis**2, Phi**2, evaluate=False))
display(Eq(Phis**3, Phi**3, evaluate=False))
display(Eq(Phis**4, Phi**4, evaluate=False))
display(Eq(Phis**10, Phi**10, evaluate=False))
The \(n^{th}\) power of \(\Phi\) is filled with combinations of \(F_n\) and \(L_n\).
Example 4#
Suppose \(R = \left[\begin{matrix} -\sqrt 5 & 2\\ 0 & \sqrt 5 \end{matrix}\right] \), so that \(\Phi = \frac{I+R}{2} = \left[\begin{matrix} \pb & 1\\ 0 & \phi \end{matrix}\right] \) and \( \Phi^n = \left[\begin{matrix} \pbn{n} & F_n\\ 0 & \phi^n \end{matrix}\right]\).
This matrix can be used to implement the formula \(F_{n+1} = \phi^n + \pb F_n\), an equation which comes from solving \(\phi^{n+1} = F_{n+1} \phi + F_n\) for \(F_{n+1}\). Set a vector \(\vec F_n = \left[\begin{matrix} F_n \\ \phi^n \end{matrix}\right]\) and then:
and more generally:
Which illustrates a curious identity \(F_{n+k} = \pbn{k} F_n + \phi^n F_k\).
# Some illustrative calculations for Example 4
R=Matrix([[-sqrt(5), 2],[0, sqrt(5)]])
Phi = (R + eye(2))/2
F5 = Symbol(r'\vec F_5')
F5vec = Matrix(2, 1, [5, phi**5])
display(Eq(Phis, Phi, evaluate=False))
display(Eq(Phis**2, Phi**2, evaluate=False))
display(Eq(Phis**8, Phi**8, evaluate = False))
#Phi^8 * F5vector = F13Vector. F13Vector contains the 13th Fibonacci number 233:
display(Eq(Phis**8 * F5, simplify(Phi**8 * F5vec), evaluate = False))
#Confirm F_13 = 233 with the new identity:
F5val = 5
F8val = 21
F13val = phibar ** 8 * F5val + phi ** 5 * F8val
display(Eq(Symbol('F_13'), simplify(F13val), evaluate=False))
Example 5#
Suppose \(R = \left[\begin{matrix} -\sqrt 5 & 2 \sqrt 5\\ 0 & \sqrt 5 \end{matrix}\right] \), so that \(\Phi = \frac{I+R}{2} = \left[\begin{matrix} \pb & \sqrt 5\\ 0 & \phi \end{matrix}\right] \) and \( \Phi^n = \left[\begin{matrix} \pbn{n} & F_n \sqrt 5\\ 0 & \phi^n \end{matrix}\right]\).
This matrix operates similar to the previous example, but it’s based on the formula \(L_{n+1} = \phi^n \sqrt 5 + \pb L_n \) and leads to the identity \(L_{n+k} = \pbn{k} L_n + F_k \sqrt 5 \phi^n \).
#Some illustrative calculations for example 5
R=Matrix([[-sqrt(5), 2 * sqrt(5)],[0, sqrt(5)]])
Phi = (R + eye(2))/2
L6 = Symbol(r'\vec L_6')
L6vec = Matrix(2, 1, [18, phi**6])
display(Eq(Phis, Phi, evaluate=False))
display(Eq(Phis**7, Phi**7, evaluate=False))
display(Eq(Phis**7 * L6, expand(Phi**7 * L6vec), evaluate = False))
# An example of the formula L_n+k = phibar^k * L_n + F_k * sqrt(5) * phi^n
# with n = 6 and k = 7.
L6val = 18
F7val = 13
L13val = phibar**7 * L6val + F7val * sqrt(5) * phi**6
display(Eq(Symbol(r'L_13'),simplify(L13val), evaluate=False))
Example 6#
Suppose \(R = \left[\begin{matrix} \sqrt 5 & 0\\ 0 & -\sqrt 5 \end{matrix}\right] \), so that \(\Phi = \frac{I+R}{2} = \left[\begin{matrix} \phi & 0\\ 0 & \pb \end{matrix}\right] \).
One could use this matrix to implement Binet’s formula or similar formulas of the form \(S_n = C \cdot \phi^n + \overline{C} \cdot\pbn{n}\) if so desired.