Re: How to compute a MatrixPower using: A^n = P D^n Inverse[P]

• To: mathgroup at smc.vnet.net
• Subject: [mg34987] Re: [mg34976] How to compute a MatrixPower using: A^n = P D^n Inverse[P]
• From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
• Date: Tue, 18 Jun 2002 02:48:27 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Since your matrix is symmetric and has distinct eigenvalues this is
rather easy.
Let's just do one case, say n=3.

First let's compute:

In[1]:=
A={{3,1,0},{1,2,-1},{0,-1,3}};

In[2]:=
B=MatrixPower[A,3];

Next we find the eigenvalues and eigenvectors of B.

In[3]:=
{eigenvals, eigenvecs} = Eigensystem[B];

We normalize the eigenvectors and compute the change of basis matrix:

In[4]:=
q =  Map[1/Sqrt[#.#]&, eigenvecs]*eigenvecs;

the diagonal matrix has the eigenvalues along the diagonal:
In[5]:=
d=DiagonalMatrix[eigenvals];

Its transpose = its inverse

In[6]:=
Transpose[q]==Inverse[q]

Out[6]=
True

Finally we check the formula:

In[7]:=
B==Inverse[q].d.q

Out[7]=
True

Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/

On Monday, June 17, 2002, at 04:26  PM, J. Guillermo Sanchez wrote:

>
> I have the matrix
>
> A == {{3,1,0},{1,2,-1},{0,-1,3}}
>
> For educational purpose I would like to evaluate
>
> A^n (* I mean MatrixPower[A,n]*)
>
> using the following matrix property
>
> A^n == P D^n Inverse[P]  (*D mean Diagonal Matrix *)
>
> How can I do with Mathematica? (Methods to obtain P and D)
>
> Thanks
>
> Guillermo Sanchez
>
>
>
>

```

• Prev by Date: Re: How to compute a MatrixPower using: A^n = P D^n Inverse[P]
• Next by Date: Re: How to compute a MatrixPower using: A^n = P D^n Inverse[P]
• Previous by thread: RE: How to compute a MatrixPower using: A^n = P D^n Inverse[P]
• Next by thread: some of the numbers in a list = a total