标签: wolfram-mathematica
我想将列向量中的每个值乘以相同的向量,但转置为行。输出应该是一个乘法表矩阵。 Like the third example in this picture。
I tried multiplying a column vector by its transposed form but Mathematica only gives me this which is not a Matrix.
答案 0 :(得分:0)
布莱恩,
您需要使用Dot,而不是Times。参见docs。
Dot
Times
m = {{a}, {b}, {c}} m.Transpose[m]
{{{a ^ 2,a b,a c},{a b,b ^ 2,b c},{a c,b c,c ^ 2}}