Tensor Algebra

Warmup with 2D matrix

Create space to store original (d2), final traceless (bigD2) and identity (i2) tensors

d2=Table[0, {α, 3}, {β, 3}];
bigD2=Table[0, {α, 3}, {β, 3}];
i2=Table[KroneckerDelta[α,β], {α, 3}, {β, 3}];
d2//MatrixForm
bigD2//MatrixForm
i2//MatrixForm
[Graphics:Images/Tensors_gr_1.gif]
[Graphics:Images/Tensors_gr_2.gif]
[Graphics:Images/Tensors_gr_3.gif]
[Graphics:Images/Tensors_gr_4.gif]
[Graphics:Images/Tensors_gr_5.gif]
[Graphics:Images/Tensors_gr_6.gif]

[Graphics:Images/Tensors_gr_7.gif]

[Graphics:Images/Tensors_gr_8.gif]
[Graphics:Images/Tensors_gr_9.gif]
bigD2 = d2-(1/3)*Tr[d2]*i2
[Graphics:Images/Tensors_gr_10.gif]
[Graphics:Images/Tensors_gr_11.gif]
[Graphics:Images/Tensors_gr_12.gif]
[Graphics:Images/Tensors_gr_13.gif]
[Graphics:Images/Tensors_gr_14.gif]
Table[bigD2[[α,β]]=d2[[α,β]]-(1)*Sum[d2[[α,μ]],{μ,1,3}]*KroneckerDelta[α,β]-(1)*Sum[d2[[ν,β]],{ν,1,3}]*KroneckerDelta[β,α], {α, 3}, {β, 3}]
[Graphics:Images/Tensors_gr_15.gif]

Now the 3D tensor

Create space to store original (d3), final traceless (bigD3) and identity (i3) tensors

d3=Table[0, {α, 3}, {β, 3}, {γ, 3}]
bigD3=Table[0, {α, 3}, {β, 3}, {γ, 3}]
i3=Table[KroneckerDelta[α,β,γ], {α, 3}, {β, 3}, {γ, 3}]
d3//MatrixForm
bigD3//MatrixForm
i3//MatrixForm
[Graphics:Images/Tensors_gr_16.gif]
[Graphics:Images/Tensors_gr_17.gif]
[Graphics:Images/Tensors_gr_18.gif]
[Graphics:Images/Tensors_gr_19.gif]
[Graphics:Images/Tensors_gr_20.gif]
[Graphics:Images/Tensors_gr_21.gif]
[Graphics:Images/Tensors_gr_22.gif]
[Graphics:Images/Tensors_gr_23.gif]
[Graphics:Images/Tensors_gr_24.gif]
[Graphics:Images/Tensors_gr_25.gif]
[Graphics:Images/Tensors_gr_26.gif]
[Graphics:Images/Tensors_gr_27.gif]
[Graphics:Images/Tensors_gr_28.gif]
[Graphics:Images/Tensors_gr_29.gif]
[Graphics:Images/Tensors_gr_30.gif]

[Graphics:Images/Tensors_gr_31.gif]

[Graphics:Images/Tensors_gr_32.gif]
[Graphics:Images/Tensors_gr_33.gif]
bigD3=d3-(1/3)*Tr[d3]*i3
[Graphics:Images/Tensors_gr_34.gif]
[Graphics:Images/Tensors_gr_35.gif]
[Graphics:Images/Tensors_gr_36.gif]
[Graphics:Images/Tensors_gr_37.gif]
[Graphics:Images/Tensors_gr_38.gif]

Element-by element way

[Graphics:Images/Tensors_gr_39.gif]
[Graphics:Images/Tensors_gr_40.gif]
Table[bigD3[[α,β,γ]] = d3[[α,β,γ]]-(1/3)*Sum[d3[[μ,μ,μ]],{μ,1,3}]*KroneckerDelta[α,β,γ], {α, 3}, {β, 3}, {γ, 3}]
[Graphics:Images/Tensors_gr_41.gif]
[Graphics:Images/Tensors_gr_42.gif]
[Graphics:Images/Tensors_gr_43.gif]
[Graphics:Images/Tensors_gr_44.gif]
[Graphics:Images/Tensors_gr_45.gif]

Another formula?

Table[bigD3[[α,β,γ]] = d3[[α,β,γ]]-(1/5)*Sum[d3[[α,μ,μ]],{μ,1,3}]*KroneckerDelta[β,γ]-(1/5)*Sum[d3[[ν,β,ν]],{ν,1,3}]*KroneckerDelta[γ,α]-(1/5)*Sum[d3[[ρ,ρ,γ]],{ρ,1,3}]*KroneckerDelta[α,β], {α, 3}, {β, 3}, {γ, 3}]
[Graphics:Images/Tensors_gr_46.gif]
[Graphics:Images/Tensors_gr_47.gif]
[Graphics:Images/Tensors_gr_48.gif]


Converted by Mathematica      November 22, 2005