In mathematics, the Hadamard product (also known as the element-wise product, entrywise product or Schur product) is a binary operation that takes in two matrices of the same dimensions and returns a matrix of the multiplied corresponding elements. This operation can be thought as a "naive matrix multiplication" and is different from the matrix product. It is attributed to, and named after, either French mathematician Jacques Hadamard or Russian mathematician Issai Schur. The Hadamard product is associative and distributive. Unlike the matrix product, it is also commutative.
History Entrywise multiplication first appeared as a relevant concept in Hadamard's 1899 work on power series, where he proved the Hadamard multiplication theorem. Paul Halmos is credited for the earliest use of the term "Hadamard product" in the context of matrices, and helped popularize it. Halmos later reported that the name was suggested to him by John von Neumann and it is conjectured that it was because of the analogy with the well-known theorem of Hadamard.
Definition For two matrices A and B of the same dimension m × n, the Hadamard product A ⊙ B {\displaystyle A\odot B} (machine learning convention) or A ∘ B {\displaystyle A\circ B} (matrix analysis convention) is a matrix of the same dimension as the operands, with elements given by
( A ⊙ B ) i j = ( A ) i j ( B ) i j . {\displaystyle (A\odot B)_{ij}=(A)_{ij}(B)_{ij}.}
For matrices of different dimensions (m × n and p × q, where m ≠ p or n ≠ q), the Hadamard product is undefined. An example of the Hadamard product for two arbitrary 2 × 3 matrices:
[ 2 3 1 0 8 − 2 ] ⊙ [ 3 1 4 7 9 5 ] = [ 2 × 3 3 × 1 1 × 4 0 × 7 8 × 9 − 2 × 5 ] = [ 6 3 4 0 72 − 10 ] . {\displaystyle {\begin{bmatrix}2&3&1\\0&8&-2\end{bmatrix}}\odot {\begin{bmatrix}3&1&4\\7&9&5\end{bmatrix}}={\begin{bmatrix}2\times 3&3\times 1&1\times 4\\0\times 7&8\times 9&-2\times 5\end{bmatrix}}={\begin{bmatrix}6&3&4\\0&72&-10\end{bmatrix}}.}
… excerpt ends here. Continue reading the full article.



