一、矩阵乘法 (Matrix Multiply)
用于矩阵相乘,A,B均为矩阵,A的维度为m*p,B的维度为p*n,则A*B的结果为m*n的矩阵。
二、点乘 (Pointwise Multiply)
其他名称:Hadamard product,element-wise product, entrywise product, Schur product.
用于矩阵相乘,A,B为维度大小相同的矩阵,即A的行数=B的行数,A的列数=B的列数。在运算时,AB矩阵的对应位置的元素相乘。若AB均为mn的矩阵,则其点乘的结果仍为一个mn的矩阵。
latex 符号:\odot --> ⊙\odot⊙
三、点积 (Dot Product)
其他名称:点积、内积、数量积
dot product = inner product = scalar product
用于向量相乘,A,B均为向量,相乘以后,得到一个标量。
经常用于相似度计算。原因是在几何意义上,
A⋅B=∣A∣∣B∣cosθA\cdot B=|A||B|\cos\thetaA⋅B=∣A∣∣B∣cosθ,
而∣A∣cosθ|A|\cos\theta∣A∣cosθ可以看成是A在B上的投影大小,结果越大越相似,所以点积经常被用来计算相似度。
latex符号:\cdot --> ⋅\cdot⋅
四、叉积 (Cross Product)
用于向量相乘,结果为矢量。
当前还没用到,等用到了再来补充。
其他常用latex符号:
×\times× -------- (\times) – 叉积或笛卡尔积。
∗*∗ -------- (*) 卷积。
⋅\cdot⋅ -------- (\cdot) – 点积
∙\bullet∙ -------- (\bullet) – 点积
⊗\otimes⊗ -------- (\otimes) – 张量积。
∘\circ∘ -------- (\circ) – 函数组合。
参考:
https://math.stackexchange.com/questions/20412/element-wise-or-pointwise-operations-notation