Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You have to convert the matrix M to an endomorphism of the Euclidean space and apply the latter to the vector field. Given the canonical identification between endomorphisms and tensors of type (1,1), the conversion is performed as follows:

A = E.tensor_field(1, 1, M)

Here is the full example:

sage: E.<x,y,z> = EuclideanSpace(start_index=0)                                                       
sage: vf = E.vector_field([x*y, x^2, z**2])                                                             
sage: M = Matrix(RR, 3, 3); M[:] = 1                                                                
sage: A = E.tensor_field(1, 1, M)  
sage: A                                                                                             
Tensor field of type (1,1) on the Euclidean space E^3                                  
sage: A[:]                                                                                          
[1 1 1]
[1 1 1]
[1 1 1]
sage: A(vf)                                                                                         
Vector field on the Euclidean space E^3
sage: A(vf).display()                                                                               
(x^2 + x*y + z^2) e_x + (x^2 + x*y + z^2) e_y + (x^2 + x*y + z^2) e_z
sage: A(vf)[:]                                                                                      
[x^2 + x*y + z^2, x^2 + x*y + z^2, x^2 + x*y + z^2]

Note that the action of the endomorphism A onto the vector field vf is obtained by A(vf) and not by A*vf, which would perform a tensor product and would yield a tensor field of type (2, 1).

Note also that if the matrix M is invertible, you may perform the conversion simply as

A = E.automorphism_field(M)