# Hadamard Product Calculator

URL: https://speedycalculator.com/calculators/math/hadamard-product/
Last updated: 2026-10-30

> The Hadamard product calculator multiplies two matrices of the same size element by element, A ∘ B.

## Inputs

- Matrix size (rows × columns)
- a₁
- b₁
- c₁
- d₁
- a₂
- b₂
- c₂
- d₂
- a₃
- b₃
- c₃
- d₃
- a₄
- b₄
- c₄
- d₄
- B: x₁
- B: y₁
- B: z₁
- B: w₁
- B: x₂
- B: y₂
- B: z₂
- B: w₂
- B: x₃
- B: y₃
- B: z₃
- B: w₃
- B: x₄
- B: y₄
- B: z₄
- B: w₄

## Results

- A ∘ B

## Formula

```
(A ∘ B)ᵢⱼ = aᵢⱼ × bᵢⱼ
```

## Explanation

The Hadamard (element-wise) product is what most people first expect matrix multiplication to be. It is used in image masking, neural networks (gates in LSTMs), statistics and the Schur product theorem.

### How to use the Hadamard Product Calculator

- Choose the **matrix size** – the matching grid of fields appears.
- Enter the entries **row by row** (a₁ b₁ c₁ is the first row, a₂ b₂ c₂ the second, and so on).
- Read the result; integer matrices give exact fractions.

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

Corresponding entries are multiplied. Both matrices must have the same dimensions.

## Worked example

Inputs — Matrix size (rows × columns): 2 × 2; a₁: 4; b₁: 1; a₂: 1; b₂: 3; B: x₁: 1; B: y₁: 2; B: x₂: 0; B: y₂: 1.

Results — **A ∘ B = ⎡ 4 2 ⎤
⎣ 0 3 ⎦**.

## Key terms

- **Hadamard product**: Element-wise matrix multiplication.

## FAQ

**Is the Hadamard product the same as matrix multiplication?**
No – it multiplies entry by entry.

**Do the matrices need the same size?**
Yes.

**Is it commutative?**
Yes, A ∘ B = B ∘ A.

**What is the identity for the Hadamard product?**
The matrix of all ones.


## Sources

- [Wolfram MathWorld – Hadamard product](https://mathworld.wolfram.com/HadamardProduct.html)
- [MIT OpenCourseWare – 18.06 Linear Algebra (Gilbert Strang)](https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/)
- [Jim Hefferon – Linear Algebra (free textbook)](https://hefferon.net/linearalgebra/)
