Hadamard Product Calculator
Test cases replayed : 2 of 2 match · Methodology · No outside source listed
Enter two 3×3 matrices to get their Hadamard product, where each entry is the product of the entries in the same position.
Result
(A ∘ B) row 1, column 1
(A ∘ B) row 1, column 2
- (A ∘ B) row 1, column 3
- (A ∘ B) row 2, column 1
- (A ∘ B) row 2, column 2
- (A ∘ B) row 2, column 3
- (A ∘ B) row 3, column 1
- (A ∘ B) row 3, column 2
- (A ∘ B) row 3, column 3
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- A row 1, column 1: enter a number.
- A row 1, column 2: enter a number.
- A row 1, column 3: enter a number.
- A row 2, column 1: enter a number.
- A row 2, column 2: enter a number.
- A row 2, column 3: enter a number.
- A row 3, column 1: enter a number.
- A row 3, column 2: enter a number.
- A row 3, column 3: enter a number.
- B row 1, column 1: enter a number.
- B row 1, column 2: enter a number.
- B row 1, column 3: enter a number.
- B row 2, column 1: enter a number.
- B row 2, column 2: enter a number.
- B row 2, column 3: enter a number.
- B row 3, column 1: enter a number.
- B row 3, column 2: enter a number.
- B row 3, column 3: enter a number.
- Read the result: (A ∘ B) row 1, column 1; the panel also shows (A ∘ B) row 1, column 2, (A ∘ B) row 1, column 3, (A ∘ B) row 2, column 1, (A ∘ B) row 2, column 2, (A ∘ B) row 2, column 3, (A ∘ B) row 3, column 1, (A ∘ B) row 3, column 2 and (A ∘ B) row 3, column 3.
How this calculator works
The Hadamard product (also called the Schur or element-wise product) of two matrices of the same size is (A ∘ B)ᵢⱼ = Aᵢⱼ × Bᵢⱼ.
Unlike the ordinary matrix product, it is commutative (A ∘ B = B ∘ A) and needs both matrices to have exactly the same dimensions. Its identity element is the matrix of all ones.
The formula
| Symbol | Meaning |
|---|---|
| A row 1, column 1 | |
| B row 1, column 1 | |
| (A ∘ B) row 1, column 1 |
Worked example
| A row 1, column 1 | 1 |
|---|---|
| A row 1, column 2 | 2 |
| A row 1, column 3 | 3 |
| A row 2, column 1 | 4 |
| A row 2, column 2 | 5 |
| A row 2, column 3 | 6 |
| A row 3, column 1 | 7 |
| A row 3, column 2 | 8 |
| A row 3, column 3 | 9 |
| B row 1, column 1 | 9 |
| B row 1, column 2 | 8 |
| B row 1, column 3 | 7 |
| B row 2, column 1 | 6 |
| B row 2, column 2 | 5 |
| B row 2, column 3 | 4 |
| B row 3, column 1 | 3 |
| B row 3, column 2 | 2 |
| B row 3, column 3 | 1 |
| (A ∘ B) row 1, column 2 | 16 |
|---|---|
| (A ∘ B) row 1, column 3 | 21 |
| (A ∘ B) row 2, column 1 | 24 |
| (A ∘ B) row 2, column 2 | 25 |
| (A ∘ B) row 2, column 3 | 24 |
| (A ∘ B) row 3, column 1 | 21 |
| (A ∘ B) row 3, column 2 | 16 |
| (A ∘ B) row 3, column 3 | 9 |
(A ∘ B) row 1, column 1 9
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is the Hadamard product of [[1, 2, 3], [4, 5, 6], [7, 8, 9]] and [[9, 8, 7], [6, 5, 4], [3, 2, 1]]?
[[9, 16, 21], [24, 25, 24], [21, 16, 9]].
Is the Hadamard product the same as matrix multiplication?
No. Matrix multiplication combines rows with columns; the Hadamard product only multiplies entries in the same position.