Represent matrix in einstein notation with kronecker deltas

matricesmatrix equationstensor-productstensor-ranktensors

Define an $(n \times m)$ matrix $E_{(i,j)}$ as the matrix which has one element, element $(i,j)$, that is equal to $1$ and the rest equal to $0$. Assume $A$ is an arbitrary matrix of shape $(m \times k)$. I am trying to write the following sum in einstein notation:

$$B = \sum_{i, j}E_{(i, j)} A$$

However I am getting confused. For arbitrary indices $(k, l, m, n)$ I know that element $(m, n)$ of $E_{(k, l)}$ equals $1$ if and only if $k=m$ and $l=n$.

From this I would assume that multiplication by $E_{(k, l)}$ would look something like $\delta^k_m\delta^l_n$ in Einstein notation, where $\delta$ is the kronecker delta.

However, in matrix form the kronecker delta is the identity matrix and $E_{(k, l)}$ is not a product of identity matrices. I am very confused, please could someone provide some intuition on how to represent $E_{(k, l)}$ in relation to einstein notation.

Best Answer

You situation is similar to that of this problem. Let $C$ denote the matrix whose entries are all equal to $1$. We can then write your sum as $$ \left[\sum_{i,j} E_{(i,j)} A\right]_{p,q} = \delta_{pi}\delta_{ij}C_{ij} A_{jq}. $$ Alternatively, you might prefer to use $1_{ij}$ to denote the entries of the matrix whose entries are all equal to $1$.