Einstein Notation
Notation
The summation sign $\sum$ is omitted when a subscript is repeated two or more times.
Description
Also referred to as the Einstein summation convention. It’s not really a formula but rather a rule. When doing vector calculations, there are often cases where one needs to write the summation sign $\sum$ multiple times in a single formula, which can make the equation look cluttered and is very annoying to write by hand. Hence, it is a convention to omit the summation sign when a subscript is repeated more than twice. Of course, care must be taken to avoid confusion in its meaning.
If confused, check the left side for what indices are present. If index $i$ is clearly not on the left side, then on the right side, $\sum \limits_{i}$ is omitted due to the Einstein notation. Conversely, if the index $j$ is on the left side, then on the right side, the summation over $j$ is not just omitted; it is not there at all.
Examples
Let’s say $1,2,3$ each represent $x,y,z$. Suppose vectors $\mathbf{A} = (A_{1}, A_{2}, A_{3})$ and $\mathbf{B} = (B_{1}, B_{2}, B_{3})$ are given.
Vector
$$ \begin{align*} \mathbf{A} &= \hat{\mathbf{e}}_{1}A_{1} + \hat{\mathbf{e}}_{2}A_{2} + \hat{\mathbf{e}}_{3}A_{3} \\ &= \sum \limits_{i=1}^{3} \hat{\mathbf{e}}_{i}A_{i} \\ &= \hat{\mathbf{e}}_{i}A_{i} \end{align*} $$
Inner Product of Two Vectors
$$ \begin{align*} \mathbf{A} \cdot \mathbf{B} &= A_{1}B_{1} + A_{2}B_{2} + A_{3}B_{3} \\ &= \sum \limits_{i=1}^{3} A_{i}B_{i} \\ &= A_{i}B_{i} \end{align*} $$
It can be expressed using the Kronecker delta as follows.
$$ \mathbf{A} \cdot \mathbf{B} = A_{i}B_{i} = \delta_{ij}A_{i}B_{j} $$
Divergence of a Vector Function
Let’s say $\dfrac{\partial }{\partial x_{i}} = \nabla_{i}$. Then, a similar result to the inner product of two vectors is obtained.
$$ \begin{align*} \nabla \cdot \mathbf{A} &= \dfrac{\partial A_{1}}{\partial x_{1}} + \dfrac{\partial A_{2}}{\partial x_{2}} + \dfrac{\partial A_{3}}{\partial x_{3}} \\ &= \nabla_{1} A_{1} + \nabla_{2} A_{2} + \nabla_{3} A_{3} \\ &= \sum \limits_{i=1}^{3} \nabla_{i} A_{i} \\ &= \nabla_{i}A_{i} \\ &= \delta_{ij}\nabla_{i}A_{j} \end{align*} $$
Cross Product of Two Vectors
$$ \begin{align*} & \mathbf{A} \times \mathbf{B} \\ =&\ \hat{\mathbf{e}}_{1} \left( A_{2} B_{3} - A_{3} B_{2} \right) + \hat{\mathbf{e}}_{2} \left( A_{3} BA_{1} - A_{1} B_{3} \right) + \hat{\mathbf{e}}_{3} \left( A_{1} B_{2} - A_{2} B_{1} \right) \\ =&\ \hat{\mathbf{e}}_{1} A_{2} B_{3} - \hat{\mathbf{e}}_{1} A_{3} B_{2} + \hat{\mathbf{e}}_{2} A_{3} B_{1} - \hat{\mathbf{e}}_{2} A_{1} B_{3} + \hat{\mathbf{e}}_{3} A_{1} B_{2} - \hat{\mathbf{e}}_{1} A_{2} B_{1} \\ =&\ \epsilon_{123} \hat{\mathbf{e}}_{1} A_{2} B_{3} + \epsilon_{132} \hat{\mathbf{e}}_{1} A_{3} B_{2} + \epsilon_{231} \hat{\mathbf{e}}_{2} A_{3} B_{1} + \epsilon_{213} \hat{\mathbf{e}}_{2} A_{1} B_{3} + \epsilon_{312} \hat{\mathbf{e}}_{3} A_{1} B_{2} + \epsilon_{321} \hat{\mathbf{e}}_{3} A_{2} B_{1} \\ =&\ \sum\limits_{i=1}^{3} \sum\limits_{j=1}^{3} \sum\limits_{k=1}^{3} \epsilon_{ijk} \hat{\mathbf{e}}_{i} A_{j} B_{k} \\ =&\ \epsilon_{ijk} \hat{\mathbf{e}}_{i} A_{j}B_{k} \end{align*} $$
Here, $\epsilon_{ijk}$ is the Levi-Civita symbol. By the above result, the following equation holds.
$$ (\mathbf{A} \times \mathbf{B} )_{i} = \epsilon_{ijk} A_{j}B_{k} $$
Curl of a Vector Function
Let’s say $\dfrac{\partial }{\partial x_{i}} = \nabla_{i}$ again. Then, a similar result to the cross product of two vectors is obtained.
$$ \begin{align*} & \nabla \times \mathbf{A} \\ =&\ \hat{\mathbf{e}}_{1} \left( \nabla_{2} A_{3} - \nabla_{3} A_{2} \right) + \hat{\mathbf{e}}_{2} \left( \nabla_{3} A_{1} - \nabla_{1} A_{3} \right) + \hat{\mathbf{e}}_{3} \left( \nabla_{1} A_{2} - \nabla_{2} A_{1} \right) \\ =&\ \hat{\mathbf{e}}_{1} \nabla_{2} A_{3} - \hat{\mathbf{e}}_{1} \nabla_{3} A_{2} + \hat{\mathbf{e}}_{2} \nabla_{3} A_{1} - \hat{\mathbf{e}}_{2} \nabla_{1} A_{3} + \hat{\mathbf{e}}_{3} \nabla_{1} A_{2} - \hat{\mathbf{e}}_{1} \nabla_{2} A_{1} \\ =&\ \epsilon_{123} \hat{\mathbf{e}}_{1} \nabla_{2} A_{3} + \epsilon_{132} \hat{\mathbf{e}}_{1} \nabla_{3} A_{2} + \epsilon_{231} \hat{\mathbf{e}}_{2} \nabla_{3} A_{1} + \epsilon_{213} \hat{\mathbf{e}}_{2} \nabla_{1} A_{3} + \epsilon_{312} \hat{\mathbf{e}}_{3} \nabla_{1} A_{2} + \epsilon_{321} \hat{\mathbf{e}}_{3} \nabla_{2} A_{1} \\ =&\ \sum\limits_{i=1}^{3} \sum\limits_{j=1}^{3} \sum\limits_{k=1}^{3} \epsilon_{ijk} \hat{\mathbf{e}}_{i} \nabla_{j} A_{k} \\ =&\ \epsilon_{ijk} \hat{\mathbf{e}}_{i} \nabla_{j} A_{k} \end{align*} $$
Here, it’s important always to remember that $\nabla_{i}$ represents differentiation. Normally, swapping the order of vector components doesn’t cause any problems.
$$ A_{1}A_{2}A_{3} = A_{2}A_{1}A_{3} $$
However, since $\nabla_{i}$ is a differentiation, you must never swap the order of vector components with it.
$$ A_{1}\nabla_{2}A_{3} \ne \nabla_{2}A_{1}A_{3} $$
For example, if $\mathbf{A} = (y,xy,xyz)$, the following result is obtained.
$$ A_{1}\nabla_{2}A_{3} = y \dfrac{\partial (xyz)}{\partial y} = xyz \ne 2xyz = \dfrac{\partial (xy^{2}z)}{\partial y} = \nabla_{2}A_{1}A_{3} $$
Of course, since $\dfrac{\partial^{2} }{\partial x\partial y} = \dfrac{\partial^{2} }{\partial y\partial x}$, $\nabla_{1}\nabla_{2}=\nabla_{2}\nabla_{1}$ holds true.