Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Multiplying matrices

by moritz (Cardinal)
on Mar 10, 2014 at 10:28 UTC ( #1077669=note: print w/ replies, xml ) Need Help??


in reply to Multiplying matrices

Hi Monks.. I am trying to multiply matrices but i want someway to calculate the matrix to the power of x

If your matrices are square, you can decompose your matrix into a product of the form M = U * D * U^T where U is a unitary matrix, U^T is its transposition, and D is a diagonal matrix. Calculating M^x then becomes M^x = U * D^x * U^T, and since D is diagonal calculating the xth power is the same as taking each component to the xth power.

How does the magical decomposition work? My linear algebra fu is a bit rusty, but Matrix decomposition says the singular value decomposition (SVD) can help.


Comment on Re: Multiplying matrices
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1077669]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (14)
As of 2014-07-29 09:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (212 votes), past polls