I have a problem that makes me very confused...
I have two tensors that must be multiply.
A is second order tensor and B is fourth order tensor.
I know when multiplying two tensor with double dot product (:) that means inner product, the order of result will be decrease two times. So now we must have a second order tensor for result.
but when I write this code in Matlab it has an error: Matrix dimensions must agree.
So how can I solve this problem?
Please Help me if you know anything about this.
Thanks for your attention.
I agree with your general idea. Let me introduce some notation, let $T_{ij}$ be the components of the type $(2,0)$ tensor and $S^{ijkl}$ be the components of the type $(0,4)$ tensor. We can contract these as follows: $$ T_{ij}S^{ijkl} = T_{11}S^{11kl}+ \cdots + T_{nn}S^{nnkl} $$ assuming this is over an $n$-dimensional space. As you can see the resulting tensor is rank $(0,2)$ since it has two free contravariant indices. I'm not sure this helps, but perhaps some of the words I use here will help you locate the desired Matlab code.