Hadamard (element-wise) product
Say it “a element-wise times b”
Multiply matching entries and keep them as a vector/matrix — no summing.
Example
In code
a * ba * bWhere you’ll see it in ML
Gates in LSTMs/GRUs, masking, dropout.
Don’t confuse it with
- dot product Multiply matching entries and add them up. Gives one number that's large when the vectors point the same way.
- tensor / outer / Kronecker product Combines two vectors into a matrix of all pairwise products (outer product), or two matrices into a bigger block matrix (Kronecker).
- composition Apply g first, then f to the result: (f∘g)(x) = f(g(x)).