Symbolic matrix power



Hi, thank you but the result is not correct. In particular the element 
(3,1). I think that your method raises each element to the k-th power, 
while I want to raise the whole matrix by doing M*M*M*... k times. 
Anyway never mind: thanks to this mailing list I was able to solve my 
problem.
Thank you once again.
Regards,

Michele M.

Il 25/10/2013 20:16, Paul Bowyer ha scritto:
> On 10/25/2013 05:39 AM, Michele Minelli wrote:
>> Hello everyone,
>> is there a way to compute the k-th power of a matrix in a symbolic way?
>> For example if the matrix is [2, 0, 0], [0, 2, 0], [-1, 0, 3] it 
>> should return [2^k, 0, 0], [0, 2^k, 0], [2^k-3^k, 0, 3^k].
>> Thank you.
>> Michele
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>
> In wxMaxima, I wrote:
> M:matrix([[2, 0, 0],[0, 2, 0],[1, 0, 3]]);
> (%o1) [[2,0,0],[0,2,0],[?1,0,3]]
>
> M2:M^k;
> (%o2) [[2^k,0,0],[0,2^k,0],[(?1)^k,0,3^k]]
>
> So it seems to be straight forward to apply arbitrary exponents.
>
> wxbuild_info()$
> wxMaxima version: 13.4.0 (compiled from source)
> Maxima version: branch_5_31_base_79_gf5e6d07
> Maxima build date: 2013-10-18 17:39:30
> Host type: x86_64-unknown-linux-gnu
> Lisp implementation type: SBCL
> Lisp implementation version: 1.1.12
>
> Respectfully,
>
> Paul Bowyer