Einstein Notation 

*

*Evaluate $$\delta^{i}_{j}\delta^{j}_{i}$$when $1\leq i,j \leq n$


*Simplify $$\delta^{a}_{b}g_{ca}g^{bd}\delta^{c}_{d}$$ when $a,b,c,d\in \{1,2,...,n\}$


*

*in Einstein notation a matrix as a linear transformation is written as $$A=a^{i}_{j}$$
So $$\delta^{i}_{j}\delta^{j}_{i}=I$$ when I is the identity matrix.
But on the other hand the index $j$ is used for summation so the answer will be  $$\delta^{i}_{j}\delta^{j}_{i}=\delta^{i}_{i}+\delta^{i}_{i}+...+\delta^{i}_{i}(\text{n times})=1+1+...+1=n$$
What is the correct answer?


*$$\delta^{a}_{b}g_{ca}g^{bd}\delta^{c}_{a}=\delta_{b}g_{c}g^{b}\delta^{c}$$
How should I continue?
 A: Mainly, the Kronecker delta makes sums collapse, making the two indexes equal everywhere else in the expression. For example: $$\delta_j^i \delta^j_i = \delta_i^i = n,$$and $$\delta^{\color{red}{a}}_{\color{blue}{b}}g_{c\color{red}{a}}g^{bd}\delta^{c}_{d} = g_{c\color{blue}{b}}g^{bd}\delta^c_d.$$I'll use colors again to ilustrate how this computation proceeds: $$g_{\color{red}{c}b}g^{bd}\delta_{\color{blue}{d}}^{\color{red}{c}} = g_{\color{blue}{d}b}g^{bd} \stackrel{(\ast)}{=} \delta_d^d = n,$$where in $(\ast)$ I used the definition of the inverse metric tensor.
A: *

*Indexes are completely saturated, you end up with a scalar, so $n$ is the only correct answer.

*$\delta^{a}_{b}g_{ca}g^{bd}\delta^{c}_{d}=g_{cb}g^{bc}=\delta_c^c=n
$
$\delta$ is $1$ iff indexes assume the same value, $0$ otherwise, so it has the "effect" of replacing the saturated index with the other. For example: $\delta_a^b p^a = p^b$ (as Ivo says: "$a$ out, $b$ in"). Note that the index is replaced where it was: here it was an upper one at there it remains.
$g$ has a somewhat similar behaviour, but it "moves" indexes up/down: $g^{ab}p_a=p^b$. Moreover $g^{ab}g_{bc}=\delta^a_c$ (in fact you are free to choose what index to saturate first, e.g. you can do $g^{ab}g_{bc}p^c=g^{ab} p_b=p^a$ or $g^{ab}g_{bc}p^c=\delta^a_c p^c=p^a$)
