# Describe in words what happens when you compute A5, A10;A20; and A30 for

```
[1/6 1/2 1/3]
```

A = [1/2 1/4 1/4] [1/3 1/4 5/12]

Describe in words what happens when you compute A5, A10;A20; and A30 for

```
[1/6 1/2 1/3]
```

A = [1/2 1/4 1/4] [1/3 1/4 5/12]

0

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...)

Asked: **
2016-09-24 20:49:53 -0600
**

Seen: **1,159 times**

Last updated: **Apr 06 '17**

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.

This looks like homework, especially given how you pasted it in. We can help with legitimate questions, if you understand enough to be able to ask one, but please do edit your question to make it clear what your

Sagequestion is, not just your homework question using Sage.Come on and be nice. What is wrong with the homework? Have you ever get help from anyone under any circumstances? There are tutors in the University to help students do the homework all over the country. If you do not want to help, that

`s fine. You don`

t need to make any comment like this. Here is the answer: A = matrix ( RR ,[[1/6 ,1/2 ,1/3] ,[1/2 ,1/4 ,1/4] ,[1/3 ,1/4 ,5/12]]) B = A * A print B Then Change A*A to A^5, A^10,A^20 and A^30 to find out the results corresponding to each of them. Then replace RR to QQ (rational) to compare the difference between them. You can easily see the entries run with RR(integer) that approach to 0.33333333333333 when it comes to A^30. You can copy and paste it ...(more)Not at all! We help many beginners with all kinds of things. But this is a website about Sage, and the way your question was posted was so unclear that it would be pretty hard to figure out.

Also, more seriously, your question as stated has nothing about real, rational, or integer in it. Again, we are very happy to help legitimate questions (even homework) but do ask for folks to take a little bit of time and care to respect the time of those answering. There is definitely no intent to humiliate, and you can see that in the careful answers many of us have taken great pains to explain in full detail. But it's hard to answer a question like this one, as stated, so the original comment was a suggestion to make it one that is easy for the experts to answer. Good luck!

@Help9542 please look at you own question and try to understand it honestly. How nice ? For example, how could we know that A20 in the title was the power of some matrix ? Now could we guess that the question was about the choice of a convenient ring ? How humiliating is it to identify the help of tutors who try to let you understand some concepts with getting an answer to be copy-pasted ? If the goal is not to get any help but to publish yourself an answer to a question that could only be understood by your schoolmate who got the exact same homework, an appropriate tool would be a pastebin website, not ask.sagemath.org.