0
$\begingroup$

How do I write the function given below as a mathematical function:

$\Sigma^{8}_{i=1}\Sigma^{8}_{j=1}c_{ij}\lambda_i \otimes\lambda_j$

I have the values of $\lambda_i$ and $\lambda_j$.They are 3x3 matrices.

$\endgroup$
1
  • 1
    $\begingroup$ why are you using cross product between two matrices? $\endgroup$
    – Nasser
    Nov 4, 2023 at 11:33

1 Answer 1

4
$\begingroup$

I am assuming $\otimes$ means normal matrix multiplication. In that case

n=8;
mat=Table[ResourceFunction["RandomMatrix"][Integer,{0,10},{3,3}],{n}];
sum=Sum[Sum[c[i,j]* (mat[[i]].mat[[j]]),{j,1,n}],{i,1,n}];

If normal matrix product is not what you meant, then try instead tensor product

Sum[Sum[c[i, j]*KroneckerProduct[mat[[i]], mat[[j]]], {j, 1, n}],{i, 1, 8}];

Or may be you meant

Sum[Sum[c[i,j]* TensorProduct[mat[[i]],mat[[j]]],{j,1,n}],{i,1,8}];

You can try them and see which one is what you had in mind.

You really should make it clear what $\otimes$ means here.

$\endgroup$
1
  • $\begingroup$ $\otimes$ means tensor product between matrices $\endgroup$
    – Lelouch
    Nov 6, 2023 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.