# Substitution Rule for Matrices

## Theorem

Let $\mathbf A$ be a square matrix of order $n$.

Then:

$(1): \quad \ds \sum_{j \mathop = 1}^n \delta_{i j} a_{j k} = a_{i k}$
$(2): \quad \ds \sum_{j \mathop = 1}^n \delta_{i j} a_{k j} = a_{k i}$

where:

$\delta_{i j}$ is the Kronecker delta
$a_{j k}$ is element $\tuple {j, k}$ of $\mathbf A$.

### Using Einstein Summation Convention

The Substitution Rule for Matrices can be expressed using the Einstein summation convention as:

$(1): \quad \delta_{i j} a_{j k} = a_{i k}$
$(2): \quad \delta_{i j} a_{k j} = a_{k i}$

where:

$\delta_{i j}$ is the Kronecker delta
$a_{j k}$ is element $\tuple {j, k}$ of $\mathbf A$.

The index which appears twice in these expressions is the element $j$, which is the one summated over.

## Proof

By definition of Kronecker delta:

$\delta_{i j} = \begin {cases} 1 & : i = j \\ 0 & : i \ne j \end {cases}$

Thus:

$\delta_{i j} a_{j k} = \begin {cases} a_{i k} & : i = j \\ 0 & : i \ne j \end {cases}$

and:

$\delta_{i j} a_{k j} = \begin {cases} a_{k i} & : i = j \\ 0 & : i \ne j \end {cases}$

from which the result follows.

$\blacksquare$