# Revision history [back]

Here is some code that investigates the powers of the "given" matrix.

sage: A = matrix( QQ, 3,3, [ 1/6, 1/2, 1/3, 1/2, 1/4, 1/4, 1/3, 1/4, 5/12 ] )
sage: A
[ 1/6  1/2  1/3]
[ 1/2  1/4  1/4]
[ 1/3  1/4 5/12]

sage: A.is_bistochastic()
True

sage: A.charpoly().factor()
(x - 1) * (x^2 + 1/6*x - 1/24)
sage: solve(x^2 + 1/6*x - 1/24 == 0, x )
[x == -1/12*sqrt(7) - 1/12, x == 1/12*sqrt(7) - 1/12]

sage: K.<u> = QuadraticField( 7 )
sage: A = matrix( K, 3,3, [ 1/6, 1/2, 1/3, 1/2, 1/4, 1/4, 1/3, 1/4, 5/12 ] )
sage: A.eigenvalues()
[1, 1/12*u - 1/12, -1/12*u - 1/12]
sage: [ CC( ev ) for ev in A.eigenvalues() ]
[1.00000000000000, 0.137145942588716, -0.303812609255383]

sage: J, S = A.jordan_form( transformation=True )
sage: J, S
(
[             1|             0|             0]
[--------------+--------------+--------------]
[             0| 1/12*u - 1/12|             0]
[--------------+--------------+--------------]
[             0|             0|-1/12*u - 1/12],

[           1            1            1]
[           1  1/2*u + 1/2 -1/2*u + 1/2]
[           1 -1/2*u - 3/2  1/2*u - 3/2]
)


Let us check the decomposition:

sage: S * J * S.inverse() == A
True


$J$ is the diagonal matrix with entries: $$1\ ,\ \frac 1{12}(-1+\sqrt 7)\ ,\ \frac 1{12}(-1-\sqrt 7)\ .$$ (In the code $u$ is a short hand for $\sqrt{7}$. In my choice.) So in the limit, $J^n$ converges to the diagonal matrix with entries $1,0,0$. So $A^n$ converges to:

sage: S * matrix( K, 3,3, [ 1,0,0, 0,0,0, 0,0,0 ] ) * S.inverse()
[1/3 1/3 1/3]
[1/3 1/3 1/3]
[1/3 1/3 1/3]


Almost all computations are done exactly.

(But it is hard to describe in words what we have done so far...)