Thursday, June 21, 2018

What is a Hadamard (Matrix) Product?

Hadamard Product is obtained by taking two matrices of the same dimension (n x n) to produce another matrix of the same dimension where each element of the new matrix is the product of corresponding elements of the two matrices.

Here is how the new Hadamard product is calculated.


Hadamard_0

Source: https://en.wikipedia.org/wiki/Hadamard_product_(matrices)

Using R you can calculate Hadamard product as shown.

Here are the two matrices.


Hadamard_1


Here is the Hadamard Product.


Hadamard_2

No comments: