I am relatively new to Mathematica. Suppose I have a matrix
M = {{a^2, a b, 0}, {a b, b^2, 0}, {0, 0, 0}}
How can I get Mathematica to decompose this into an outer product of the vector
v = {a,b,0}
with itself? I assume it has something to do with the function TensorReduce but I am not sure. In general if I know that a tensor T can be written in the form $T = A \otimes B$ and I know T and B how can I use mathematica to find A?
Related:
Symbolic tensor simplifications and the identity matrix
How do I simplify a vector expression?
Simplify vector expression - is there something like "Factor" for vectors, dot products etc.?
Thank you!
Update: I think the function CoefficientArray may be useful here but I can't quite figure it out fully.
With[{z = Array[x, Length@M]}, z /. Solve[M == TensorProduct[z, z], z]]? – kglr Nov 20 '18 at 16:59M = {{a c, a d, 0}, {b c, b d, 0}, {0, 0, 0}}and I knew the form ofzhow could I use your answer to solve fory = {c,d,0}? – Takoda Nov 21 '18 at 11:43With[{y = Array[x, Length@M]}, y /. Solve[M == TensorProduct[z, y], y]]work? – kglr Nov 27 '18 at 01:58