matrix square






________________________________
 In the case that theall the eigenvalues are differents a simple solution for the square root is

squareRoot(a):=block([l1,l2,d,c],[l1,l2]:eigenvectors(a),d:apply(diag_matrix,l1[1]),
? c:transpose(apply(matrix,map(first,eigenvectors(a)[2]))), c . sqrt(d) . invert(c));



De: Evan Cooch <evan.cooch at gmail.com>
Para: Stavros Macrakis <macrakis at alum.mit.edu> 
CC: maxima at math.utexas.edu; maxima-request at math.utexas.edu 
Enviado: Viernes 28 de diciembre de 2012 17:34
Asunto: Re: [Maxima] matrix square
 

There are some conditions under which there are unique square-roots for some matrices, but not others. 

For example, a : matrix([0.8,0.5],[0.2,0.5]);

Unique square-root:??
matrix([0.87077787570164,0.3230553107459],[0.12922212727859,0.67694468180352])

But consider matrix matrix([33,24],[48,57]); This has *two* square
    roots: matrix(91,4],8,5]) and matrix([5,2],[4,7]);


?But, your point concerning no standard definition 'in general'
    seems to be correct. There has been a fair bit of work on the
    problem - some of which I can actually follow! ;-) 



On 12/28/2012 10:50 AM, Stavros Macrakis wrote:

The ^^ operator doesn't do anything with fractional powers. ?One reason for that is that they are not unique. ?For example, there are infinitely many solutions to a^^2=ident(2); one infinite family is matrix([1,0],[%r1,-1]) for arbitrary %r1. ?I don't believe there is any standard definition of a "principal value" of the matrix square root in general. 
>
>
>? ? ? ? ? ? -s
>
>
>
>On Fri, Dec 28, 2012 at 10:30 AM, Evan Cooch <evan.cooch at gmail.com> wrote:
>
>
>>"? matrix" is your friend. ?It's not clear exactly what you
            did, but the
>>documentation there says that A^2 squares the elements of a
            matrix, but
>>A^^2 is the matrix product of A and A, which is probably
            what you
>>wanted.
>>
>>Ray
>>
>>
>>Thank you. A^^2 is indeed what I wanted.
>>>
>>>
>>>
>>
>>That approach seems to work fine, so long as you are
            interested in integer powers of a matrix (which seems to be
            the case here). The approach I posted earlier is more
            general. Suppose, for example, you want the square-root of
            A? A^^(0.5) doesn't evaluate.
>>_______________________________________________
>>Maxima mailing list
>>Maxima at math.utexas.edu
>>http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>

_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima