Tensor algebra in nonlinear optics In nonlinear optics, the polarization is written in tensor form as
$$ P = \varepsilon_0 \left(
\chi^{(1)} E
+ \chi^{(2)} E^2
+ \chi^{(3)} E^3
+ \dots
\right)$$
where $\chi^{(n)}$ is a tensor of rank n+1 and P and E are vector (with 3 elements). In all the textbooks (for example New's Introduction to Nonlinear Optics, Eq. 1.9, p.15 ), the explicit expression is also given:
$$ P_i = \varepsilon_0 \left(
\sum_j \chi^{(1)}_{ij} E_j
+ \sum_{jk} \chi^{(2)}_{ijk} E_jE_k
+ \sum_{jkl} \chi^{(3)}_{ijkl} E_jE_kE_l
\right).$$
I am trying to understand how to find the explicit form from the tensor form. The summation seems easy to generalize but it would be nice to understand why it's like this. I didn't find a single textbook / course explaining what is exactly going on between the tensor and vectors. Specifically: in which order are the elements supposed to be multiplied, and by which kind of product? And in addition, what is the correct way to write the tensor form to make it mathematically unambiguous?
I'm not familiar at all with tensor algebra, but I pieced the following together:

*

*$\chi^{(1)}E$ is equivalent to a normal matrix × vector multiplication.


*The multiplication probably starts from the left since textbooks also separate the last $E$ to define $\chi = \chi^{(1)} + \chi^{(2)} E+ \chi^{(3)} E^2$.


*Sometimes (this lecture, on wikipedia) the equation is written as $ P = \varepsilon_0 \left(
\chi^{(1)} \cdot E
+ \chi^{(2)} : E^2
+ \chi^{(3)}\ \vdots\ E^3
+ \dots
\right)$. I found some references to the $:$ symbol (this course page 3) but none to the $\vdots$ one. Those represent dot, double dot and (I guess) triple dot products, which give a result with respectively 2, 4 and (I guess) 6 ranks less than the initial values.


*At this point my first guess was that one should first take the outer product of all the $E$ to get a tensor of rank n, then take the "n-th dot product" of $\chi^{(n)}$ with the new tensor to obtain a vector.


*Tensor algebra writes products differently than what I know from vectors and matrices: $ab$ without any sign is an outer product (at least for one matrix and one vector, not sure if it's the case in general), and $a \cdot b$ means to first do the outer product, and then take the contraction of the result.


*Answers to this question about the same equation say it we should contract $\chi^{(n)}$ with $E$, then contract the result with the next $E$, etc. But the equation would be ambiguous even written $\left((\chi^{(n)} \cdot E)\cdot E\right)\cdot E$ because it doesn't say which indices to contract, hence my question about the correct way to write the tensor form.


*So now my understanding is that one should successively take the outer product $\chi^{(n)} \otimes E$, which gives a tensor of rank n+1, contract it (but how do I know along which dimension?), which always removes 2 dimensions so the rank is n-1, take the outer product with the next E, etc. Each contraction with $E$ removes a dimension so that at the end only a vector is left. But I have trouble figuring out what $:$ and $\vdots$ mean in this context.
So that's it, I'd appreciate if anyone could shine light on the kind of products going on there, whether it's $\left((\chi^{(3)} \cdot E)\cdot E\right)\cdot E$, or $\chi^{(3)} \vdots \left(E \otimes E \otimes E\right)$ or maybe something else.
 A: The polarization matrix is symmetric, so it does not matter in which order you multiply. Hence why the notation is not considered ambiguous. In physics, it is customary to work in index notation because that is in the end how you'll practically do computations. An outer product of two vectors $a$ and $b$ is thus a tensor:
$$(a\otimes b)_{ij} = a_ib_j \, .$$
While an inner product of two vectors is a scalar:
$$a\cdot b = \sum_i a_ib_i \, .$$
In case you have $\chi^{(1)}\cdot E$ where the first one is a tensor and the second one a vector, then the result is a vector:
$$(\chi^{(1)}\cdot E)_i = \sum_j \chi^{(1)}_{ij} E_j \, .$$
$\chi^{(2)}: E^2$ is indeed the same as $(\chi^{(2)} \cdot E) \cdot E$ and likewise for further extensions. And as said before, because of symmetry of the $\chi$, order does not matter.
$$(\chi^{(2)} : E^2)_i = \sum_{jk} \chi^{(2)}_{ijk} E_j E_k = \sum_j \left(\sum_k \chi^{(2)}_{ijk} E_k\right) E_j = \sum_j (\chi^{(2)} \cdot E)_{ij} E_j = (\chi^{(2)} \cdot E) \cdot E \, .$$
