Questions tagged [tensors]

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.

Filter by
Sorted by
Tagged with
-2
votes
0answers
15 views

In simple terms, what is a Tensor Space? [closed]

I've heard of tensor spaces, and they sound intriguing to my non-mathematically educated mind. I was wondering if anyone could give a, "Tensor Space for Dummies," rundown. If not possible to ...
1
vote
0answers
50 views

How can I make NDSolve aware of vectorial nature of an ODE?

I am trying to solve the equilibrium equation $\text{DIV } \mathbf P(\textbf{u}(x,y)) = \mathbf{f}$, where $\mathbf P$ is the stress tensor defined by $$ \mathbf P = \mathbf F + (1-\det\mathbf F)^...
3
votes
1answer
66 views

execute a summation involving a differential operator

Below is an operator $\hat{D}=\sum_{i,j}^2 \frac{\partial}{\partial u^i}\sqrt{g}g^{ij}\frac{\partial}{\partial u^j}$ where $g_{ij}=\begin{pmatrix}p(x,y) & q(x,y)\\\ q(x,y) & r(x,y)\end{pmatrix}...
4
votes
2answers
80 views

Commutation, symmetrizer and duplication matrices

The following 3 matrices are useful when viewing matrices as vectors, known as commutation $K_n$, symmetrizer $N_n$ and duplication $G_n$. They are usually defined by their matrix relations below. $$ \...
0
votes
0answers
63 views

Transforming a tensor expression

I have the expression $\qquad\sqrt{\det[\gamma^{\mu \nu} F_{\mu \nu}]}$ Basiclly, I need to expand this expression in some form like : $trF^4 + (trF^2)^2 + \sqrt{\det[F_{\mu \nu}]}$, where $\gamma^{\...
2
votes
1answer
79 views

Tensor Algebra Problem

I am just getting started with tensor algebra using Mathematica. I could use some help with a simple problem I am starting with at my website: http://www.tifis.org/mathematicaproblem.pdf An ...
1
vote
0answers
32 views

diagonalisation of tensors [closed]

$$H_{(ab),(cd)} =p_{lmno}F_{lm}^{ab}G_{no}^{cd}$$ $$=p_{lmno} \left(n_{do}n_{nc}+\delta_{do}\delta_{nc}\right)\left(n_{bm}\delta_{la}-\delta_{bm}n_{la}\right)$$ Is there a way to diagonalize the above ...
0
votes
0answers
25 views

Shorten a sum of many terms by introducing a rule for scalar product and Kronecker deltas and using repeated replacements

There is a sum of many terms that I would like to simplify by introducing a notation for scalar product of two vectors. Each term is a product of constants and of several components of 3D vectors: <...
3
votes
1answer
77 views

Implementing Tensors

Please see the below question. This is what I need to implement in Mathematica.
4
votes
0answers
40 views

Pair-wise antisymmetric tensor

I am trying to define a tensor $T$ which is antisymmetric under pair-wise exchange of its indices: $T = \delta_{a],[b}\,\delta_{c],[d}\,\delta_{e],[f}\,\delta_{g],[h}$ where $T$ is antisymmetric under ...
0
votes
0answers
37 views

What is a good way to describe all kinds of basic equations in elasticity by tensor [duplicate]

I see here that we can use tensors to represent the fundamental equations in elasticity. But I don't know how to use the tensor operation in MMA to reproduce these equations. If you can, please ...
0
votes
0answers
20 views

Coordinate transformation on the Christoffel tensor Xcoba

I have to compute the Christoffel Symbols on a basis which is not the coordinate basis of the chart in mathematica. I should do this contraction: ...
1
vote
1answer
78 views

How to associate a tetrad as a basis of a metric mathematica

It's my first time here, and it's the first time that I try to work with Mathematica, so I am a bit lost! If somebody could help me I'll always be grateful! I need to define a generale basis for a ...
5
votes
2answers
126 views

Array reshaping without explicitly specifying one dimension

In NumPy a function numpy.reshape can leave at most one dimensional specification unspecified and it will be automatically calculated. So is there a similar functionality in MMA? As a simplest example ...
0
votes
0answers
37 views

Write Tensor Product in Matrix Form

I want to write the tensor product A $\otimes$ B in matrix form, where\begin{equation} A= \left[ {\begin{array}{cc} 1 & 2 & 3\\ 4 & 5 &6 \\ 7 & 8 &9 \\ \end{array} } \...
2
votes
0answers
29 views

How to define tensors similar to Riemann tensor in xAct xTensor xTras

I'm working on a project where we deal with objects very similar to Riemann tensor. In fact they are Christoffel symbols for higher spins. I'm using xTras for modeling problems in wolfram mathematica. ...
12
votes
4answers
737 views

How to rewrite a tensor as a matrix

I put {TensorProduct[{1, 0}, {0, 1}, {0, 1}, {0, 1}, {0, 1}]}/Sqrt[2]//MatrixForm and I got $$ \left( \begin{array}{cc} \left( \begin{array}{cc} \left( \begin{...
5
votes
1answer
132 views

Derivative of real antisymmetric matrix in mathematica

Is it possible to find the derivative of components of a real antisymmetric matrix using index notation? Eg: I have a very large real antisymmetric matrix. Then from Matrix Cookbook, we know the ...
2
votes
1answer
44 views

Fancy Indexing of a 4D array (tensor)

I'm trying to mimic the CoefficientArrays function, which I can't get to work for my symbolic equations. The CoefficientList ...
3
votes
2answers
111 views

Klein-Gordon Equation: how can I write the summation?

I would like to write a program that gives me the Klein Gordon Equations given a metric. I will explain. My code is in the following: I) Standard Quantities I have no doubt here the first part is ...
8
votes
3answers
308 views

How is Grad defined for array particularly in non-Cartesian coordinates?

This question can be viewed as a follow-up of What is the definition of Curl in Mathematica? First argument of Grad can be an array, but what definition does ...
0
votes
1answer
32 views

Building an array of T NxM matrices where one item in each matrix changes

As I do not use Mathematica often enough, I am a bit rusty. I need to work on an array of T matrices and each of those NxM matrices has the following pattern: $$ \begin{equation} A(t):= \left( ...
1
vote
1answer
65 views

Tensorial functions

I need to solve a system of ODEs for a function that has a complicated tensorial structure. I believe that NDSolve can deal with this scenario since version 9. Yet, ...
2
votes
1answer
71 views

How to identify specific Christoffel symbols and Riemann Tensor components from a general solution [closed]

I want to learn how to identify specific Christoffel Symbols and Riemman Tensor components from the general solution provided by Mathematica. Let us work out an example to see what I mean clearly. ...
4
votes
1answer
122 views

Computing Christoffel symbols of the second kind [duplicate]

I want to compute the Christoffel-symbol for a given metric. I am using the code here, but I am missing something. The Chrisfoffel-symbol formula is $\Gamma^{\mu}_{\phantom{\mu}\nu\sigma}=\frac{1}{2}g^...
2
votes
1answer
63 views

Best way to work with Tensor Networks

I have to write a script in which I have to work with a very simple tensor network but I can't find a nice scalable way to make this work. The basic object I am working with is a tensor more or less ...
1
vote
0answers
56 views

LeviCivitaTensor contraction indices

My computer has problems when I try to perform a calculation with TensorContract. In particular, with the second answer to my previous question Contracting indices ...
2
votes
0answers
26 views

Optimising tensor operations under memory constraints

Let riem is a free variable with riem ∈ Arrays[{4, 4, 4, 4} as assumption. Let: ...
6
votes
2answers
182 views

Contracting indices in lists

Using an answer to this question (Working with Dirac Gamma Matrices using FeynCalc - A simple problem), I defined ...
2
votes
1answer
58 views

Expanding Determinant as Multilinear Alternating Function

I am working with the expression $$\det\big{|}f(-kx), f(-(k-1)x),\cdots,f(0),\cdots, f((k-1)x), f(kx), g(x)\big{|},$$ where $f,g\colon\mathbb{R}\mapsto \mathbb{R}^{2k+2}$, and want to use the Taylor ...
0
votes
0answers
46 views

Does Solve work with symbolic tensors?

I am considering the usefulness of Mathematica's symbolic tensors to handle algebra which I encounter in acoustics of solids. Is there a way to solve equations written in symbolic tensors? This is ...
2
votes
1answer
31 views

How to state nontrivial tensor symmetry assumptions?

For example dddg, the third derivative of the metric tensor, in dimension $4$. I need to state that it is symmetric in the first two indices and symmetric in the ...
0
votes
1answer
28 views

Hypothetical aplication of rules/restricting rules to a given context?

I have the code TensorDimensions[TensorContract[c, {{1, 2}}]]. It is in normal form. But if I add the rules: ...
0
votes
1answer
49 views

Correct syntax for tensor operators?

So I have an operator $A_0$ whose matrix representation is given by $$A_0 = \begin{pmatrix} 0 & -i \\ -i & 0\end{pmatrix},$$ and I also have two vector states $|0\rangle$ and $|1\rangle$ ...
4
votes
1answer
216 views

Fourth Order Tensor rotation [duplicate]

What is the easiest way to perform Rotation for Higher Order Tensors in Mathematica ? For Instance 4th order tensor $C_{ijkl} = \lambda_{im}\lambda_{jn}\lambda_{ko}\lambda_{lp} C_{mnop}$
4
votes
0answers
50 views

speed up tensor expand

I am using the following code ...
5
votes
1answer
77 views

A simple problem on TensorTranspose

In the "Applications" part of TensorTranspose, it is given an example on the calculation of Christoffel according to metrics. I am confused about the definition of <...
-2
votes
1answer
291 views

How to reproduce this tensor calculation with Mathematica [closed]

The tensor operation shown in the red box is used in the textbook(P117-P120) to prove that there are only 9 independent constants for orthotropic materials: I want to use MMA to reproduce the ...
-1
votes
1answer
194 views

How to use Mathematica to show why engineering strain is not a tensor [closed]

One of the most classical examples in the mechanics of materials is that engineering strain is not tensor. I want to use Mathematica to show why it doesn't meet the tensor requirements. ...
7
votes
3answers
617 views

How to implement Einstein summation convention with differential operators

Statement of this problem: In the textbook, the following differential equilibrium equations can be expressed by tensors: Using Einstein's summation convention, the formula in the figure above can be ...
2
votes
4answers
125 views

Calculate dot product of two tensor products in mathematica as tensorproduct

I would like to calculate $$(\mathbb{1} \otimes \mathbb{1} \otimes \sigma^+)(\mathbb{1} \otimes \mathbb{1} \otimes \sigma^-) = (\mathbb{1} \otimes \mathbb{1} \otimes \left( \begin{array} \\ 1 &0 ...
0
votes
0answers
29 views

What should I do to get a fourth-order tensor with only two independent components

I see this example in help SymmetrizedIndependentComponents, We can see that matrix A has only four independent components: <...
0
votes
0answers
69 views

How to prove that isotropic materials have only two independent constants by tensor operation rules [duplicate]

I want to use tensor method to prove that there are only two independent elastic constants for isotropic materials. But I can' t get two independent results after reading related posts. The following ...
1
vote
0answers
55 views

Determinant of the tensor matrix in Mathematica? [closed]

I have a data: As an example, it looks like this: Then, when I try to take Det[]: How we can find determinant value of these kind of matrices ?
3
votes
0answers
166 views

Spin Connection using Mathematica

Hello I want to use Mathematica in order to calculate the spin connection of a metric, specifically of the metric \begin{equation} \left(\begin{array}{cccc} -1 & 0 & 0 & 0 \\ 0 & \...
2
votes
2answers
104 views

Tensor contraction

How do I let mathematica compute a tensor contraction like $\delta_{ab}\delta_{bc}$ with an output $\delta_{ac}$ efficiently? I tried TensorContract and TensorReduce but they were not helpful. ...
0
votes
0answers
53 views

How do I apply assumptions to a table of functions

I have a table, really its a tensor but anyways I would like to apply an assumption to it, i.e. 1 - 2 phi[t,x,y,z] == 1 and have it print the tensor after it has ...
0
votes
0answers
56 views

Use Mathematica to draw a tensor-like network

What are the Mathematica ways to draw this seemly delicate figure? Such that we can output a PDF file in the end.
2
votes
1answer
65 views

xAct working with an unspecified function

I am trying to use xCoba with a diagonal metric depending on an unspecified function f[r], but I get the errors: CTensor::...
3
votes
2answers
141 views

How to understand the symmetry of MMA's tensor

tensor = {{{2, 9}, {9, 2}}, {{9, 2}, {2, 4}}}; TensorDimensions[tensor] TensorSymmetry[tensor] How can I understand the symmetry of the output ...

1
2 3 4 5
8