# [Maxima] definition of nonscalar and jacobian matrices

Jaime Villate villate at fe.up.pt
Thu May 24 10:04:21 CDT 2012

On 05/23/2012 07:48 PM, Mario Villanueva wrote:
>
> Now I need to define a Matrix M(t) = A^{-1}*\frac{\partial f}{\partial
> x}*A, where A is an invertible matrix and \frac{\partial f}{\partial
> x} is the Jacobian matrix of f with respect to vector x.
>
> Basically I need to get (d^i/dx^i) for i=1,...,n.
I cannot tell you a general way for an arbitrary number of dimensions,
but perhaps if I show you how I'd
define the jacobian in the 3-dimensinal case might be useful as a
starting point:

(%i1) display2d: false$(%i2) vars:[x,y,z]$
(%i3) f:[fx,fy,fz]\$
(%i4) depends(f,vars);
(%o4) [fx(x,y,z),fy(x,y,z),fz(x,y,z)]

(%i5) J:jacobian(f,vars);
(%o5) matrix(['diff(fx,x,1),'diff(fx,y,1),'diff(fx,z,1)],
['diff(fy,x,1),'diff(fy,y,1),'diff(fy,z,1)],
['diff(fz,x,1),'diff(fz,y,1),'diff(fz,z,1)])

You can then define the 3x3 matrix A and proceed.
Are you trying to find a matrix A that will diagonalize the Jacobian?

Cheers,
Jaime