# Tagged Questions

Use this tag for questions that involve tensors. Tensors are fundamental tools for linear computations, generalizing vectors and matrices to higher ranks. Mathematica 9 introduces powerful methods to algebraically manipulate tensors with any rank and symmetry.

62 views

### Atlas 2 For Mathematica. Need to calculate Riemann tensor, etc [duplicate]

Is anyone familiar with Atlas 2 for Mathematica to calculate the Riemann Tensor, Ricci Tensor, and scalar I have a metric that I need to calculate these things for. Can anyone help? I'm not too up on ...
283 views

### FindFit returns “tensors have incompatible shapes”

I'm trying to fit experimental data with FindFit and implicitly calculated function. It seems, that function works fine and satisfactorily approximates data when parameters are fed manually. However ...
86 views

### Finding basis of isotropic tensors of rank $n$

I am looking for a way to obtain a basis of isotropic tensors of rank $n$. Actually I am mostly interested in rank $8$ isotropic tensors but maybe you know already a simple algorithm in order to ...
226 views

### Efficient tensor product followed by contraction [duplicate]

Say I want to efficiently evaluate $\sum_{kl}A_{ikjl}B_{kl}$ where $A$, $B$ are numerical tensors. This has been discussed before but with no focus on efficiency. A straightforward way as mentioned ...
39 views

### Inverse KroneckerProduct given other arguments

I'm having problems working out how to do the inverse of a two argument Kronecker Product, given one of the decomposed column vectors. For example, say I have used the Kronecker Product on two ...
492 views

### How can I define or use a new coordinate system in Mathematica?

I want to use the dipole coordinate system as defined in this paper: http://arxiv.org/abs/physics/0606044 I see that Mathematica can do all kinds of vector analysis using different kinds of ...
334 views

163 views

### Derivative with respect to a tensor

I am trying to differentiate a tensor with respect to another one in Mathematica, but I can't do it. Down below is the code I am using: ...
232 views

### SymmetrizedArray of stiffness/compliance tensor

The stiffness and compliance tensors of a material are 3x3x3x3 tensors relating stress and strain. ...
175 views

### How to take derivative of a tensor leading to kronecker delta? [duplicate]

I'm trying to write a Mathematica program to find derivatives such as the following simple example: Could you please help?
225 views

### Change of basis for a rank 3 Cartesian tensor

I have a Cartesian tensor $\chi_{ijk}$ and I want to express the elements in terms of a new basis to get $\chi_{ijk}^\prime$. The transformation is represented using $a_{ij}$. The tensor transforms ...
107 views

### Error messages from TensorContract and TensorReduce

I am struggling with a few errors when using symbolic tensors. I am using mathematica 9.0.1.0, linux x86. The following code generates what seems to me an incorrect tensor, this is the smallest ...
256 views

### Solving a System/Matrix of Equations in Matrix Form

Ok, I am trying to solve an equation involving matrices (well, tensors actually), which is of the form: $\mathbf{e}^{T} \cdot \mathbf{M} \cdot \mathbf{e}$ = $\mathbf{N}$, where $\mathbf{e}$ is an ...
293 views

### How to put the tensor product of two operators onto two variables?

I am trying to make an intuitive Mathemtaica program to show the principle of quantum walking. The idea of quantum walking is very simple and direct, but when I try to transfer it into Mathemitca ...
721 views

### Sum with Levi-Civita [duplicate]

I'm trying to write the expression $$\sum_{\alpha,\beta = 1}^{4}\epsilon_{\mu \nu\alpha\beta}a^{\nu} b^{\alpha} c^{\beta}$$ in Mathematica, where $\epsilon$ is the Levi-Civita symbol and $a$, $b$, $c$ ...
394 views

### Mathematica package for supergravity and superstring theory

I am looking for a Mathematica package that can manipulate tensors for supergravity, string theory or M-theory. I am particularly looking for a package that can do spinor and Clifford algebra ...
153 views

### Can I use symbolic tensors for simple linear algebra and calculus?

As an example, I'd like to calculate this symbolic derivative: $\frac{\partial}{\partial b}(x-A.b)^{\mathsf{T}}.(x-A.b)$ where $x$ and $b$ are vectors and $A$ is a matrix. What I tried is this: ...
52 views

### Tensor product involving Levi Civita symbol [duplicate]

I'm working with xAct package. I've defined the tensor component values and my issue is that I want an expression involving Levi Civita symbols and tensor components, I don't know how to deal with it. ...
65 views

### Get rid of external library dependency [closed]

I am trying to generate C code for some functions, which I do not post in full because they are a few hundred lines long. The functions do nothing too fancy: a bunch of dot products, powers and roots. ...
368 views

### How to get rid of nested matrices

If I type into Mathematica TensorProduct[IdentityMatrix[2],IdentityMatrix[2]] It gives me a result that has nested matrices. How do I turn that into a normal ...
179 views

### How to select elements in a tensor conditional upon their indices

I have a tensor, u, of rank one, meaning that I have a matrix whose elements are themselves matrices. I would like to select, and make a list of, only those sub-matrices whose indices comply with the ...
199 views

### Defining tensor components generally

I would like to define a tensor according to its components, something like the following: [F(x)]_i,j = Integrate[f(x,y)A_i(y)B_j(y),y] where i and j are ...
127 views

### Matrix/tensor addition behaving funny under replacement?

I have two matrices I want to add, and one of the matrices is a tensor product of two vectors. I've used a SetDelayed to define the summed matrix, because I want to evaluate it for different values of ...
325 views

566 views

### How to take derivative of parameterized coordinate?

Suppose I have a vector in $\mathbb{R}^n$ but $n$ is not known in advance. I want to be able to write functions which operate on the components of that vector, and then I'd like to be able to take ...
109 views

### Why TensorReduce not working here?

I would like to use TensorReduce to work on the tensor contraction $y_{ib}y_{ia}$ (where index $i$ is summed). However, ...
141 views

### How to faster map density matrix element to make differential equations

I have a time dependent matrix $M(t)$ of $L^n \times L^n$ size and want to write differential equations like D[M[i,j][t],t] = H[i,j][t] Here is my code: ...
100 views

### Evaluating the tensor product many times for a given list

I need to evaluate the tensor product 10 times in a given list( {g,e,r}) Here I have evaluated for 3 times... ...
73 views

### Why the tensor product of list of variable change the subscript position in products

{Subscript[g, 1],Subscript[e, 1]}\[TensorProduct]{Subscript[g, 2],Subscript[e, 2]}\[TensorProduct]{Subscript[g, 3],Subscript[e, 3]} I am expecting answer like ... ...
86 views

### How does TensorReduce use assumptions?

I would like to use TensorReduce by assuming that certain patterns of functions are tensors. From documentation of TensorReduce: ...
272 views

...
393 views

...
437 views

513 views

### Linearized Einstein Equations with Mathematica

I need to compute the linearised Einstein Equations around a fixed metric $g_{\mu \nu}$ which is not the flat metric. Someone knows any Mathematica package or a review that can help me?
I am interested in solving systems of ODEs symbolicly, keeping things with arbitrary dimensions for clarity. For example, assume that $x, f(x) \in R^N$ and $A \in R^{N \times N}$, how do I solve \$f'(...