Joal Heagney wrote:
> Robert Dodier wrote:
>
>>Hi Slava,
>>
>>
>>>hello, may be i'm not first, but i find bug: example A - matrix,
>>>A^0 = matrix([1,1],[1,1]) or A^(-1)*A = matrix([1,1],[1,1]), expected
>>>=matrix([1,0],[0,-1]).
>>
>>
>>You want . (i.e., dot) for noncommutative multiplication here
>>instead of * which is commutative multiplication.
>>Also you want ^^ for exponentiation induced by . .
>>
>>E.g.
>>A : matrix ([4, a], [b, 17]);
>>display2d : false;
>>A ^^ -1; => matrix([-17/(a*b-68),a/(a*b-68)],[b/(a*b-68),-4/(a*b-68)])
>>A . %; => matrix([a*b/(a*b-68)-68/(a*b-68),0],[0,a*b/(a*b-68)-68/(a*b-68)])
>>ratsimp (%); => matrix([1,0],[0,1])
>>A ^^ 0; => matrix([1,0],[0,1])
>>
>>In all cases % = most recent preceding result.
>>
>>Hope this helps,
>>Robert Dodier
>
>
> On a related note:
>
> I don't know if this is accurate, but I was taught in high school by my
> maths teacher, that any formula involving matricies can be solved by a
> polynomial equation with order = rank of matrix. This was as long as you
> used the eigenvalues to set the coefficients of the polynomial.
>
> (What does this have to do with maxima? I'm getting there.)
>
> For example:
> A: matrix([1,2],[3,4])
>
> My maths teacher was saying that:
>
> A^^3 = a_0.I + a_1.A
>
> If the values of a_0 and a_1 satisfy the following equations (where n
> and m are the eigenvectors of A):
>
> n^^3 = a_0 + a_1 * n
> m^^3 = a_0 + a_1 * m
>
> Okay, so firstly, was my maths teacher correct? :)
>
> Secondly, will it work with exponentials? (I'm imagining that the
> exponential of a matrix would be given by the taylor expansion, but
> replacing the commutive multiply by the dot multiply.)
*sighs* Should have used Google first. The answers to the first two
questions are yes and yes. It's a consequence of the Cayley Hamilton
theorem.
http://web.mit.edu/2.151/www/Handouts/CayleyHamilton.pdf
However, I still don't know the answer to this third question:
> Thirdly, when I enter the following into maxima:
> exp(A), it calculates the exponent of individual terms.
> (This is how my question related to maxima)
> So is there a way to get an exponential of a matrix that uses the dot
> multiply? A variable or setting?
>
> Thank you,
>
> Joal Heagney
Thank you,
Joal Heagney