## 3 Uncertainty Evaluation
\right]=\mathbf{x}^{\mathrm{T}}\mathbf{\mathrm{B}}^{\prime}\mathbf{y}, \tag{15}\]  
where the matrices \(\mathbf{\mathrm{A}}\) and \(\mathbf{\mathrm{B}}^{\prime}\) contain the undetermined coefficients of the fitted bivariate polynomials. As noted from Equations (14) and (15), here the set of \(n\)-degree bivariate polynomials are used to fit the form errors of the scale grating. In addition, the highest degree for \(x\) and \(y\) coordinates is not necessary to be identical, but it depends on the actual fitting performance. With Equations (14) and (15), the \(e_{Z}(x/\alpha,y)\) and \(e_{X}(x,y)\) can be obtained, as follows:  
\[e_{Z}(x/\alpha,y)=\mathbf{x}^{\mathrm{T}}\mathbf{\mathrm{A}}^{\prime}\mathbf{y}, \tag{16}\]  
\[e_{X}(x,y)=\mathbf{x}^{\mathrm{T}}\mathbf{\mathrm{B}}\mathbf{y}, \tag{17}\]  
where  
\[\mathbf{\mathrm{A}}^{\prime}=\left[ \begin{array}{ccccc}1&&&&\\ &1/\alpha&&&&\\ &&1/\alpha^{2}&&&\\ &&&\ddots&\\ &&&&1/\alpha^{n}\end{array} \right]\left[ \begin{array}{ccccc}A_{00}&A_{01}&A_ {02}&\cdots&A_{0,n}\\ A_{10}&A_{11}&\cdots&A_{1,n-1}&\\ A_{20}&\cdots&A_{2,n-2}&&\\ \vdots&&&&\\ A_{n0}&&&0\end{array} \right], \tag{18}\]  
\[\mathbf{\mathrm{B}}=\left[ \begin{array}{ccccc}1&&&&\\ &\alpha&&&\\ &&\alpha^{2}&&\\ &&&\ddots&\\ &&&\alpha^{n}\end{array} \right]\left[ \begin{array}{ccccc}B^{\prime}_{00}&B^{ \prime}_{01}&B^{\prime}_{02}&\cdots&B^{\prime}_{0,n}\\ B^{\prime}_{10}&B^{\prime}_{11}&\cdots&B^{\prime}_{1,n-1}&\\ B^{\prime}_{20}&\cdots&B^{\prime}_{2,n-2}&&\\ \vdots&&&&\\ B^{\prime}_{n0}&&&0\end{array} \right] \tag{19}\]  
According to Equations (14), (16), and (18), once the matrix \(\mathbf{\mathrm{A}}\) is obtained, the \(e_{Z}(x/\alpha,y)\), \(\partial e_{Z}(x/\alpha,y)/\partial\alpha\), \(\sigma^{2}[e_{Z}(x/\alpha,y)]\) can also be calculated successively, and finally \(\sigma^{2}[e_{X}(x/\alpha,y)]\) by Equation (12), \(e_{Z}(x/\alpha,y)\) by Equation (16), \(e_{X}(x,y)\) by Equations (17) and (19), and also \(\sigma^{2}[e_{X}(x,y)]\). With the obtained \(e_{Z}(x,y)\), \(\sigma^{2}[e_{Z}(x,y)]\), \(e_{X}(x,y)\), and \(\sigma^{2}[e_{X}(x,y)]\), evaluation of the PV values and the associated uncertainty for both \(e_{Z}(x,y)\) and \(e_{X}(x,y)\) can also be conducted. Since the procedures for obtaining the matrices \(\mathbf{\mathrm{A}}\) and \(\mathbf{\mathrm{B}}^{\prime}\) are similar, only the determination of the matrix \(\mathbf{\mathrm{A}}\) is presented in the following. Taking the vectorization operator on both sides of Equation (14) leads to  
\[\mathrm{vec}[e_{Z}(x,y)]=(\mathbf{y}^{\mathrm{T}}\otimes\mathbf{x}^{\mathrm{T}}) \mathrm{vec}(\mathbf{\mathrm{A}}), \tag{20}\]  
where \(\mathrm{vec}(\cdot)\) signifies the vectorization operator that converts a matrix into a column vector, and the symbol \(\otimes\) represents the Kronecker product. Discarding the zero elements in \(\mathrm{vec}(\mathbf{\mathrm{A}})\) and denoting the processed \(\mathrm{vec}(\mathbf{\mathrm{A}})\) as a vector \(\mathbf{a}=[a_{0},\,a_{1},\,a_{2},\,\ldots,\,a_{K-1}]^{\mathrm{T}}\) (\(K=(n+1)(n+2)/2\)) and then choosing new basis functions \(\Xi_{k}\) (\(k=0,\,1,\,2,\,\ldots,\,K-1\)), where \(\Xi_{k}\) {\(1,\,x,\,y,\), \(x^{2},\,xy,\,y^{2},\,\ldots,\,xy^{n-1},\,y^{n}\)}, the Equation (20) can be rewritten, as follows:  
\[\eta(\xi)=a_{0}\Xi_{0}(\xi)+a_{1}\Xi_{1}(\xi)+a_{2}\Xi_{2}(\xi)+\cdots+a_{K-1} \Xi_{K-1}(\xi), \tag{21}\]  
where the variable \(\xi\) represents the value of the terms \(x,y,\,x^{2},\,xy,\,y^{2},\,\ldots,\,xy^{n-1},\,y^{n}\) at any pixel position \((x_{i}y_{j})\) (\(i=1,\,2,\,\ldots,\,M;j=1,\,2,\,\ldots,\,N\)), and \(\eta(\xi)\) represents the value of \(\mathrm{vec}[e_{Z}(x,y)]\) at the corresponding pixel position.