如何在Mathematica中将列向量乘以行向量?

时间:2018-10-30 05:30:09

标签: 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.

1 个答案:

答案 0 :(得分:0)

布莱恩,

您需要使用Dot,而不是Times。参见docs

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}}