# Unfold a tensor into a matrix to do inversion/pseudoinversion?

Posted 25 days ago
261 Views
|
6 Replies
|
0 Total Likes
|
 Dear Wolfram Community:I have been trying without success in the last week to do some tensor operations on arrays (like the array example at the end). The tensor operations tried include dot product and especially inverse/pseudoinverse. The (pseudo)inverses cannot be done just applying the built-in function into the array, as they are designed just for matrices.At first I was worried that such operations simply are undefined for arrays other than matrices. Then I found some papers suggesting the following procedure:1) Do something called "unfolding" to turn the IJK tensor into a (m,n) matrix2) Invert the matrix3) Do the inverse operation "fold" to obtain the inverted tensor from the inverted matrixUnfortunately the notation used for the mapping called "fold" and "unfold" is given by the following, cryptic formulas (taken from Kolda(2006)):  Finally, a code is given, unfortunately in MATLAB and not in Mathematica: Do someone knows how to "translate" the cryptic formulas of Kolda (2006) or her MATLAB code into a Wolfram Mathematica code?Thank you in advance.APPENDIX: 1) References:*) Tamara G. Kolda (2006); "Multilinear operators for higher-order decompositions "; SANDIA REPORT SAND2006-2081 SANDIA report link*) Mao-lin Liang, Bing Zheng & Rui-juan Zhao (2018): Tensor inversion and its application to the tensor equations with Einstein product, Linear and Multilinear Algebra2) Code of the example array I wish to invert: "1) Example array" array[T_, m_, v_] := SparseArray[Flatten[{Table[{1 + i, 1, 1} -> T[i, 0, 0], {i, 0, m}], Table[{i + 1, i + 1, 1 + k} -> T[i, i, k], {i, 1, m}, {k, 1, v}]}]] A4 = array[T, 2, 2]; A4 // MatrixForm Answer
6 Replies
Sort By:
Posted 25 days ago
 May be you find some ideas herehttps://community.wolfram.com/groups/-/m/t/1651695(the link may be not complete)Especially in the notebooks at the end Answer
Posted 25 days ago
 Thank you for your early answer, but the link is not working. Answer
Posted 25 days ago
 Actually it is working, Alberto. Simply use copy and paste. Answer
Posted 25 days ago
 Done, thank you for the clue. Answer
Posted 24 days ago
 I just found the relevant community group. The attached notebooks and papers there are very interesting. Where is better to continue the discussion with additional questions (if needed)?1) Here2) At the discussion you linked: Stan Gianzero question && answers 3) At the related review discussion: Inverse of a (m,m)-Matrix whose elements are (n,n)-MatricesBest regards,Alberto Answer
Posted 24 days ago
 1) Here Answer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments