## 3 Tensor Decomposition of Near-Field HRTF  
Tensor decomposition can be applied to HRTF magnitudes, complex-valued HRTFs, minimum-phase HRTFs, HRIRs, and minimum-phase HRIRs. Here, we discuss the tensor decomposition of HRIRs or minimum-phase HRIRs, which is equivalent to the tensor decomposition of complex-valued HRTFs or minimum-phase HRTFs, respectively, because HRIRs and HRTFs are related by Fourier transformation. Suppose that there is a full set of near-field HRIRs for a given set of ears, involving the data of \(D\) distances, \(M\) directions at each distance, and \(N\) discrete time samples for each distance and direction. The data of a discrete distance index \(d\), direction \(m\), and time \(n\) are denoted by \(h(d,m,n)\) with \(d=1,2\ldots D\), \(m=1,2\ldots M\), and \(n=1,2\ldots N\). To decompose the HRIRs with tensor effectively, the mean of HRIRs across distances, directions, and times should be theoretically subtracted from each data, e.g., the following mean-subtracted data should be used to substitute the original HRIR data in analysis:  
\[h^{\prime}(d,m,n)=h(d,m,n)-\frac{1}{DMN}\sum_{d=1}^{D}\sum_{m=1}^{M}\sum_{n=1} ^{N}h(d,m,n). \tag{4}\]  
The dimensionality of the mean-subtracted dataset is \(D\times M\times N\), and the mean-subtracted dataset constitutes a three-order tensor \(h_{D\times M\times N}\) with entries \(h_{dmn}=h^{\prime}(s,m,n)\). Because practical calculation in the example of the present work indicates that the mean of HRIRs is trivial, there is little difference between original and mean-subtracted HRIRs. Therefore, we omit the subtraction of the mean in the following discussion. According to the Tucker decomposition of tensor [13], the three-order tensor \(\mathbf{h}_{D\times M\times N}\) can be decomposed as the inner product of a core tensor \(\mathbf{w}_{D^{\prime}\times M^{\prime}\times N^{\prime}}\) and three matrixes \(\mathbf{u}_{D\times D^{\prime}}^{d}\mathbf{u}_{M\times M^{\prime}}^{m}\) and \(\mathbf{u}_{N\times N^{\prime}}^{n}\):  
\[\mathbf{h}_{D\times M\times N}=\mathbf{w}_{D^{\prime}\times M^{\prime}\times N^{ \prime}}\times_{D^{\prime}}\mathbf{u}_{D\times D^{\prime}}^{d}\times_{M^{\prime}} \mathbf{u}_{M\times M^{\prime}}^{m}\times_{N^{\prime}}\mathbf{u}_{N\times N^{\prime} }^{n}\, \tag{5}\]  
where subscript represents the dimensionality of the tensor or matrix. Notation \(\times_{D^{\prime}}\), \(\times_{M^{\prime}}\) and \(\times_{N^{\prime}}\) denote the tensor/matrix product with respect to distance-related mode variable \(D^{\prime}\), direction-related mode variable \(M^{\prime}\), and time-related mode variable \(N^{\prime}\), respectively. In Equation (5), the full set of HRIR data are represented by three sets of independent variations of modes, e.g., distance-related modes, direction-related modes, and time-related modes. \(\mathbf{u}_{D\times D^{\prime}}\) is a \(D\times D^{\prime}\) matrix of distance-related modes, with each row corresponding to a distance and each column corresponding to an eigen distance-related mode. \(\mathbf{u}_{M\times M^{\prime}}^{m}\) is a \(M\times M^{\prime}\) matrix of the direction-related modes, with each row corresponding to a direction and each column corresponding to an eigen direction-related mode. \(\mathbf{u}_{N\times N^{\prime}}\) is a \(N\times N^{\prime}\) matrix of time-related modes, with each row corresponding to a time and each column corresponding to an eigen time-related mode. Because the number of eigen modes associated with an independent variable should not exceed the dimensionality of that discrete variable, it generally has \(D^{\prime}\leq D,M^{\prime}\leq M,N^{\prime}\leq N\).