I have defined my matrix M in Maple as follows:
M := Matrix(2, 2, [[-a, a], [b, -b]]);
Then I want to derive M^k in terms of M. The answer I am supposed to get is M^k = M*[-(a+b)]^{k-1}. When I enter the command:
M^k;
I am getting the following undesired output
Matrix(2, 2, [[-a, a], [b, -b]])^k
How to solve my problem? Picture from my Maple showing what I have tried.

Here is one way to get such a result:
You can easily show that this equals
M*(-b-a)^(k-1).[edit] It occurs to me that this might be a coursework question, and as such you might be interested in a more step-by-step approach instead of just what result the
MatrixPowercommand provides.Let's diagonalize the Matrix
M, checking results as we go.Check that
P.Diag.P^(-1)equalsM.It turns out that using
Adjoint(P)/Determinant(P)is slightly easier to use here thanP^(-1). But first we'll check they're equivalent, which might be new to you.We can also use
denom(detP)/numer(detP)instead of1/detP.We want
M^k. But that's the same as,Now, the "big idea:. If you multiply
P.Diag.P^(-1)by itselfktimes then you get various instances ofP^(-1).Pin that product of terms. ButP^(-1).Pwill just produce the identity matrix. So(P.Diag.P^(-1))^kwill telescope down to,And here
Diag^kis,which is the same as,
So
M^kis the same as,You could check that that simplifies to the earlier
MatrixPowerresult.We could also rearrange the terms in that last product,
That last product can be made into two terms.
The "first term" turns out to be simply
M,The "second term" is,
So
M^kis the same as that first term times that second term, ie.M * (-b-a)^(k-1).