6
votes
2answers
185 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 ...
1
vote
1answer
99 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 ...
1
vote
1answer
84 views

Mathematica does not respect tensor order?

I'm trying to verify an identity involving symmetric traceless tensors over the reals. What I tried was: ...
2
votes
1answer
458 views

Contracting with Levi-Civita (totally antisymmetric) tensor

I have an array $v_{ijk}$ which is effectively a rank-$3$ tensor with dimensions $3\times3\times3$, and I need to contract it with $e^{ijk}$, i.e. evaluate $v_{ijk} e^{ijk}$ (see Einstein ...
0
votes
1answer
93 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: ...
3
votes
2answers
177 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 ...
3
votes
1answer
288 views

How can I get Mathematica to recognize equality of symbolic matrix expressions?

I have two matrix expressions: X.Transpose[T].Transpose[X] and X.T.Transpose[X] I want Mathematica to recognize that ...
3
votes
3answers
193 views

Matrix multiplication that includes a tensor

How would I best express the following in Mathematica: $\begin{pmatrix}2 & 4\end{pmatrix} \begin{pmatrix}r_1 & r_2\\r_3 & r_4\end{pmatrix} \begin{pmatrix}6 \\ 8\end{pmatrix}$, where $r_i$ ...
6
votes
1answer
489 views

TensorContract of inverse matrix

Matrix inverse in mathematica If $A$ is an invertible $n \times n$ matrix, then $A\cdot A^{-1} = I$. To get this statement in Mathematica, you need the assumption ...
8
votes
1answer
186 views

inverse of abstract matrix

If you assume the matrix $A$ is invertible, then $A^{-1} \cdot A = I$. Is there an assumption for invertibility in Mathematica 9? How can one make the following evaluate to the identity matrix $I_3$? ...
9
votes
1answer
251 views

Verifying and deriving basic (block) matrix identities

How can I use the new symbolic matrix/tensor capabilities to verify matrix identities, such as (1) or (2) Even better, how can I ask Mathematica to derive expressions for X, Y, Z, and U like ...
10
votes
1answer
593 views

Nesting Parallel processes

I just attempted to run code that had nested ParallelMap[] functions. It generates the error message: ParallelMap::subpar: Parallel computations cannot be nested; proceeding with sequential ...