# A Recursive Least-Squares Algorithm for the Identification of Trilinear Forms
## 2 Third-Order Tensors  
In this section, we provide a brief summary on tensors, outlining the main definitions and operations, while also establishing the notation. A tensor can be defined as a multidimensional array of data [22; 23]. For example, a matrix and a vector can be referred to as second- and first-order tensors, respectively. Tensors of order three or higher are called higher order tensors. In the following, the notation used for a tensor, a matrix, a vector, and a scalar is \(\mathbf{\mathcal{A}}\), \(\mathbf{\mathbf{A}}\), \(\mathbf{\mathbf{a}}\), and \(\mathbf{\mathbf{a}}\), respectively. In this work, we are focusing only on real-valued third-order tensors, i.e., \(\mathbf{\mathcal{A}}\in\mathbb{R}^{L_{1}\times L_{2}\times L_{3}}\), so that the array dimension is \(L_{1}\times L_{2}\times L_{3}\). The entries of a tensor can be referred to by using multiple indices. In our case, for a third-order tensor, the first and second indices \(l_{1}\) (with \(l_{1}=1,2,\ldots,L_{1}\)) and \(l_{2}\) (with \(l_{2}=1,2,\ldots,L_{2}\)) correspond to the row and column, respectively (like in a matrix); in addition, the third index \(l_{3}\) (with \(l_{3}=1,2,\ldots,L_{3}\)) corresponds to the tube and describes its depth. Consequently, these three indices describe the three different modes. In terms of notation, the entries of the different order tensors are denoted by \((\mathbf{\mathcal{A}})_{l_{1}l_{2}l_{3}}=a_{l_{1}l_{2}l_{3}}\), \((\mathbf{\mathbf{A}})_{l_{1}l_{2}}=a_{l_{1}l_{2}}\), and \((\mathbf{\mathbf{a}})_{l_{1}}=a_{l_{1}}\). In the case of a matrix, the vectorization operation leads to a vector that contains the concatenated columns of the original matrix. In the case of a third-order tensor, the so-called matricization operation concatenates the \"slices\" of the tensor and produces a large matrix. Of course, the result depends on which index, all the elements of which are considered first. Thus, the matricization can be performed along three different modes [8; 9]. For example, considering the mode row and then varying the columns and the tubes, we obtain:  
\[\mathbf{A}_{[1]} =\mathbf{A}_{:1:L_{2},1:L_{3}}\] \[=\left[ \begin{array}{cc}\mathbf{A}_{:1}&\cdots&\mathbf{A}_{:L_{ 3}}\end{array} \right],\]  
where \(\mathbf{A}_{[1]}\in\mathbb{R}^{L_{1}\times L_{2}L_{3}}\) and the matrices \(\mathbf{A}_{:L_{3}}\in\mathbb{R}^{L_{1}\times L_{2}}\) with \(l_{3}=1,2\ldots,L_{3}\) denote the frontal slices. Similarly, we can take the mode column and then vary the lines and the tubes, which results in \(\mathbf{A}_{[2]}=\mathbf{A}_{1:L_{1},:1:L_{3}}\), with \(\mathbf{A}_{[2]}\in\mathbb{R}^{L_{2}\times L_{1}L_{3}}\). Finally, we can take the mode tube and then vary the rows and the columns, in order to obtain \(\mathbf{A}_{[3]}=\mathbf{A}_{1:L_{1},1:L_{2},:}\), where \(\mathbf{A}_{[3]}\in\mathbb{R}^{L_{3}\times L_{1}L_{2}}\). The ranks of \(\mathbf{A}_{[1]}\), \(\mathbf{A}_{[2]}\), and \(\mathbf{A}_{[3]}\) represent the mode-1, mode-2, and mode-3 ranks of the tensor, respectively. Furthermore, the vectorization of a tensor (e.g., following mode-1) is  
\[\mathrm{vec}\left(\mathbf{\mathcal{A}}\right) =\mathrm{vec}\left(\mathbf{A}_{[1]}\right)\] \[=\left[ \begin{array}{c}\mathrm{vec}\left(\mathbf{A}_{::1}\right) \\ \vdots\\ \mathrm{vec}\left(\mathbf{A}_{::L_{3}}\right)\end{array} \right]\in\mathbb{R}^{ L_{1}L_{2}L_{3}}.\]  
Nevertheless, there are some fundamental differences between the rank of a matrix \(\mathbf{A}\in\mathbb{R}^{L_{1}\times L_{2}}\) and the rank of a tensor \(\mathbf{\mathcal{A}}\in\mathbb{R}^{L_{1}\times L_{2}\times L_{3}}\). For example, the rank of \(\mathbf{A}\) can never be larger than \(\min\{L_{1},L_{2}\}\), while the rank of \(\mathbf{\mathcal{A}}\) can be greater than \(\min\{L_{1},L_{2},L_{3}\}\).