This is my first question on the site, so I apologise in advance if it isn't very good. I've recently learnt about the Einstein summation convention and I'm somewhat familiar with the basics of the rules governing it - you sum over any repeated indices, and the rest are all free indices, and free indices should balance, lest you'd have inhomogeneity.
My issue is in being able to apply certain results in different contexts:
For example, the result $$ \delta_{ij}\delta_{jk} = \delta_{ik} $$ makes sense to me, but I can't quite justify to myself why you can use it to show that $$ \delta_{ij}\delta_{ji} = \delta_{ii} = 3 $$ The first result involves 2 free indices, but the second doesn't have any, and is a double sum over i and j - they're fundamentally different, but the former still applies to the latter.
Another example that confused me was using $$ \varepsilon_{ijk}\varepsilon_{ipq} = \delta_{jp}\delta_{kq} - \delta_{jq}\delta_{kp} $$ to show that $$ \varepsilon_{ijk}\varepsilon_{ij\ell} = \delta_{jj}\delta_{k\ell} - \delta_{j\ell}\delta_{jk} = 3\delta_{k\ell} - \delta_{k\ell} = 2\delta_{k\ell} $$ To me, this all just feels like a convenient coincidence, and I can't convince myself that applying these rules across different contexts is justified, though it is rather convenient for sure. As such, I'd really appreciate if anybody could help me find some better intuitions for the convention, or at least let me know for sure that doing the above is always justified, because it does seem to always work out.
The first case is easy to get an intuition through matrix algebra. In the matrix language, the identity $\delta_{ij}\delta_{jk}=\delta_{ik}$ means that $I_{3}I_{3}=I_{3}$, where $I_{3}$ denotes the identity matrix of size $3$. Thus, $\delta_{ij}\delta_{jk}=\delta_{ik}$ implies $\delta_{ij}\delta_{ji}=\delta_{ii}=3$ means that $I_{3}I_{3}=I_{3}$ implies $\text{Tr}\left(I_{3}I_{3}\right)=\text{Tr}\left(I_{3}\right)=3$, where $\text{Tr}$ denotes the trace of a square matrix.
Unfortunately, the second case is harder to translate into the matrix language.