# 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.

15 views

### Permute indices of a large sparse array

I'm starting with a very large rank 3 tensor, F, that is stored as a SparseArray, and I need to permute its indices. I first tried using ArrayRules to get the positions of the non-zero elements, to ...
39 views

### SymmetrizedArray of stiffness/compliance tensor

The stiffness and compliance tensors of a material are 3x3x3x3 tensors relating stress and strain. ...
51 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?
46 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 ...
72 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 ...
102 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 ...
115 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 ...
476 views

### Proving the hairy ball theorem using xAct

I would like to formally prove the hairy ball theorem in Mathematica, initially just for $S^2$, and then see about generalizing. An approach I thought about to use the xAct package to define $S^2$ ...
296 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$ ...
126 views

### xCoba: evaluate tensor quantities, given an explicit metric

I am new to xAct packages and I'm having some problems to compute tensor quantities with xCoba. I defined a manifold and a metric. I computed All quantities of ...
144 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 ...
93 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: ...
48 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. ...
41 views

### Get rid of external library dependency

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. ...
206 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 ...
95 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 ...
81 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 ...
109 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 ...
125 views

112 views

### Programming Multipolar Expansions in Spherical Tensors

We have that a density matrix can be written in a basis of spherical tensors: $\rho =\sum _{K=0}^S\sum_{q=-K}^K \rho _{\text{Kq}}^{(S)} T_{\text{Kq}}^{(S)}$ for example for a 3x3 matrix, $S=1$, ...
466 views

### How to solve a “tensor equation”?

I am trying to solve equations which looks like this: $$T_{ab} - T_{bc} = a_1 T_{ab} + a_2 T_{ac} + a_3 T_{bc},$$ where $T_{xy}$ are tensors. I want to get the $a_i$'s (in this simple example ...
186 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 some Mathematica package or some review that can help me?
147 views

### How to apply a tensor to a list of arguments

The problem I have is the following: Let C be a list of coordinates, say, C = {x1, x2, ..., xn} and ...
97 views

### How to solve system of differential equations of arbitrary order (symbolic tensors)?

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 ...
244 views

### Symbolic linear algebra

I would like to know how I can ask Mathematica to expand (and simplify) such an expression : $$(\alpha A + \beta B)^\top (\alpha A + \beta B)$$ where $\alpha,\beta$ are two real numbers and $A,B$ ...
195 views

### Mixed product identity between tensors in Mathematica 9

How can we simplify tensor expressions in Mathematica 9 using the mixed-product identity $(A\otimes B)(C \otimes D) \equiv AC \otimes BD$ ? Is it possible to implement this kind of evaluations using ...