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

• To: mathgroup at smc.vnet.net
• Subject: [mg34988] Re: [mg34976] How to compute a MatrixPower using: A^n = P D^n Inverse[P]
• From: Murray Eisenberg <murraye at attbi.com>
• Date: Tue, 18 Jun 2002 02:48:28 -0400 (EDT)
• Organization: Mathematics & Statistics, Univ. of Mass./Amherst
• References: <200206170726.DAA18874@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```You do it in Mathematica just like the theory says to do it!  That means
that you construct P from the eigenvectors of A and the diagonal matrix
from the corresponding eigenvalues of A.  The essential Mathematica
function is Eigensystem.  Here's a "toy" example, using exact
arithmetic.  (With floating point arithmetic, of course, your results
may or may not be as good as you would wish).

A = {{2/5, 3/10}, {-13/40, 6/5}};

esys = Eigensystem[A]
{{11/20, 21/20}, {{2, 1}, {6/13, 1}}}

evecs = Last[esys]; evals = First[esys];
P = Transpose[evecs] ;  Pinv = Inverse[P];
diag = DiagonalMatrix[evals];

A == P . diag . Pinv  (* theory says they're the same *)
True

a[n_] := P . DiagonalMatrix[evals^n] . Pinv

a[9] == MatrixPower[A, 9]
True

"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

--
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street
Amherst, MA 01375

```

• Prev by Date: Re: How to compute a MatrixPower using: A^n = P D^n Inverse[P]
• Next by Date: RE: RE: Definitions of the functions
• Previous by thread: Re: How to compute a MatrixPower using: A^n = P D^n Inverse[P]
• Next by thread: RE: How to compute a MatrixPower using: A^n = P D^n Inverse[P]