Omni Calculator logo

Hadamard Product Calculator

Created by Anna Szczepanek, PhD
Reviewed by Rijk de Wet
Last updated: Jan 18, 2024


Welcome to Omni's Hadamard product calculator, where you can discover what the Hadamard product is and what properties it has — for instance, how the matrix rank behaves under this matrix operation. We'll also explain how to find the Hadamard product of vectors, and what the link is between the Hadamard and Kronecker product of matrices.

⚠️ The Hadamard matrix product, which this tool covers, is different to the matrix product resulting from matrix multiplication. If you want to discover more matrix products, make sure to visit:

What is the Hadamard product?

The idea behind the Hadamard product is to take two matrices of the same dimensions (whether rectangular or square) and to multiply their corresponding entries — i.e., multiply the element (i,j) in the first matrix with the element (i,j) in the second matrix. The result is a matrix with the same dimensions as the initial matrices. The operation itself is most often denoted by a small circle: A ∘ B.

🔎 As you might have guessed, the Hadamard product owes its name to the mathematician Jacques Hadamard. However, this matrix operation is also known as entrywise product or element-wise product (due to how it is defined) as well as the Schur product, because sometimes it is attributed to the Russian-German mathematician Issai Schur.

How do I find the Hadamard product?

To calculate the Hadamard product of two matrices with the same dimensions:

  1. Multiply together the elements that lie at the intersection of the first row and the first column of each matrix.
  2. Write down the result in the same location in the resulting matrix.
  3. Do this for each of the remaining element-pairs.
  4. Have you finished the right-most element in the last row? Congrats, you've found the Hadamard product!

Now that we know what the Hadamard product is and how to calculate it by hand, let's discuss some of its most important properties.

What are the properties of Hadamard product?

The properties of the Hadamard product of matrices are:

  • Commutativity (unlike the standard matrix product): A ∘ B = B ∘ A.
  • The Hadamard product is associative and distributive over the addition of matrices:
    A ∘ (B∘C) = (A∘B) ∘ C
    A ∘ (B+C) = (A∘B) + (A∘C)
  • The neutral (identity) element of the Hadamard product is a matrix whose elements are all 1. This matrix Hadamard-producted with any other matrix A will deliver A. Note that this is not the standard identity matrix, where we have 1 on the diagonal and 0 elsewhere.

How to use this Hadamard product calculator?

This tool is very straightforward to use: just pick the matrix size and then enter the elements into their fields. The result will appear immediately at the bottom of our Hadamard product calculator.

Note that empty fields will be interpreted as zeros, which will save you some work if your matrices contain lots of zeros.

FAQ

How do I compute the Hadamard product of vectors?

To find the Hadamard product of vectors you need to multiply together the corresponding elements of your two vectors. That is:

  • In the case of column vectors, multiply together the elements in the first row and write down the result in the first row of the resulting vector. The same for the second row etc, proceeding downwards.
  • In the case of row vectors, start from the first column and proceed to the right.

What is the matrix rank under Hadamard product?

The rank of the Hadamard product of two matrices A and B cannot exceed the product of the ranks of the input matrices. That is, the Hadamard product satisfies the condition rank(A ∘ B) ≤ rank(A) × rank(B).

Is Hadamard product the same as tensor product?

No, the Hadamard matrix product and tensor (Kronecker) product are different matrix operations. However, these two matrix products are linked by the following equation:

(A⊗B) ∘ (C⊗D) = (A∘C) ⊗ (B∘D)

where:

  • is the Hadamard matrix product;
  • is the Kronecker matrix product;
  • A and C have the same dimensions; and
  • B and D have the same dimensions.
Anna Szczepanek, PhD
Choose matrix sizes and enter the coeffients into the appropriate fields. Blanks are interpreted as zeros.
Number of rows
2
Number of columns
2
Matrix A
A=
a1a2
b1b2
a₁
a₂
b₁
b₂
Matrix B
B=
x1x2
y1y2
x₁
x₂
y₁
y₂
Hadamard product A ∘ B
00
00
Check out 35 similar linear algebra calculators 🔢
Adjoint matrixCharacteristic polynomialCholesky decomposition… 32 more
People also viewed…

Average

Calculate the average (mean) of up to 30 numbers with our user-friendly tool. Discover how to find averages or perform quick calculations effortlessly.

Black hole collision

The Black Hole Collision Calculator lets you see the effects of a black hole collision, as well as revealing some of the mysteries of black holes, come on in and enjoy!

Circumcenter of a triangle

With the circumcenter calculator you'll discover how to use the coordinates of a triangle's vertices to get the coordinates of the circumcenter.

Lost socks

Socks Loss Index estimates the chance of losing a sock in the laundry.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service