Hadamard Product Calculator — Element-wise Matrix Multiplication
The Hadamard product (also called the Schur product or entrywise product) multiplies two matrices of the same size by multiplying their corresponding elements individually — unlike standard matrix multiplication, which takes dot products of rows and columns. Enter two 2×2 matrices to compute C = A ⊙ B with a step-by-step breakdown.
C[1,1] = A[1,1] × B[1,1]
C[1,2] = A[1,2] × B[1,2]
C[2,1] = A[2,1] × B[2,1]
C[2,2] = A[2,2] × B[2,2]
How does this calculator work?
The Hadamard product C = A ⊙ B multiplies matching entries: C[i,j] = A[i,j] × B[i,j] for all positions (i, j). Enter the 8 values of two 2×2 matrices to get the 4 entries of the result with step-by-step working. Unlike standard matrix multiplication, the matrices must be the same size and no dot products are computed.
Formula
How this is calculated
Unlike standard matrix multiplication (where C = AB requires A's column count to equal B's row count, and each entry is a dot product), the Hadamard product simply multiplies each element of A by the element at the same position in B. If A and B are both m × n matrices, then C = A ⊙ B is also m × n, and every entry C[i,j] = A[i,j] × B[i,j]. This calculator handles the 2 × 2 case.
The Hadamard product is commutative (A ⊙ B = B ⊙ A), associative, and distributive over matrix addition. It is used extensively in machine learning — most notably in the element-wise step of LSTM and GRU gate operations, in the gradient computation of neural network layers, and in attention mechanisms. In signal processing it corresponds to pointwise multiplication in the frequency domain (analogous to convolution in the time domain by the convolution theorem), and in statistics it appears in the Khatri–Rao product and covariance computations.
Note that the Hadamard product is NOT the same as standard matrix multiplication: the notation A ⊙ B (or A ∘ B) is used specifically to distinguish it. The result here is the 2 × 2 matrix where each of the four entries is the product of the corresponding pair of entries from A and B.
Frequently asked questions
Regular matrix multiplication C = AB computes each entry as a dot product of a row of A with a column of B, requiring A to be m × k and B to be k × n. The Hadamard product C = A ⊙ B simply multiplies matching entries, so A and B must have exactly the same size and the result is the same size. For 2 × 2 matrices, regular multiplication produces 4 dot products of 2 terms each; the Hadamard product produces 4 simple scalar multiplications.
The Hadamard product appears in LSTM and GRU gates (element-wise multiplication of gate activations with candidate values), in attention mechanism weight application, in dropout (masking activations element-wise with a binary mask), and in Adam/AdaGrad optimizers (element-wise operations on gradient moments). Frameworks like TensorFlow and PyTorch use the * operator for element-wise multiplication to distinguish it from the @ operator for matrix multiplication.
No — the Hadamard product is defined for any two matrices with identical dimensions (both m × n for any m and n). This calculator uses 2 × 2 for clarity, but the same element-wise rule applies to rectangular matrices, 1-D vectors (element-wise multiplication), or higher-dimensional tensors of the same shape.
Also known as
TG we-Calculate Editorial Team. (2026). Hadamard Product Calculator — Element-wise Matrix Multiplication [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/hadamard-product-calculator
TG we-Calculate Editorial Team. "Hadamard Product Calculator — Element-wise Matrix Multiplication." TG we-Calculate. 2026. https://we-calculate.com/calculator/hadamard-product-calculator.
TG we-Calculate Editorial Team, "Hadamard Product Calculator — Element-wise Matrix Multiplication," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/hadamard-product-calculator
@misc{wecalculate_hadamard_product_calculator, title = {Hadamard Product Calculator — Element-wise Matrix Multiplication}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/hadamard-product-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
