# Deriving a Dilution of Precision Indicator for GNSS Factor Graph Optimization Solutions +
## Appendix B Computation of the Denominator of the Elements of \(\mathbf{P}_{j}^{(batch)}\)  
The denominator \(D\) of the elements of \(\mathbf{P}^{(batch)}\) is equal to the determinant of \((\mathbf{P}^{(batch)})^{-1}\). This comes directly from the Laplace formula to compute the inverse of a matrix.  
This section reveals how to compute the determinant of matrix \((\mathbf{P}^{(batch)})^{-1}\). The particular shape of \((\mathbf{P}^{(batch)})^{-1}\) allows to have interesting expressions to compute its determinant. Indeed, \((\mathbf{P}^{(batch)})^{-1}\) is a tri-diagonal matrix, i.e., a banded matrix with 3 non-zero diagonals elements. For such matrix, a recurrence formula exist to compute its determinant.  
**Theorem A1** (Determinant of a tri-diagonal matrix).: _([PERSON], 1960) [8]_  
_Let us consider the following \(K\times K\) tri-diagonal matrix_  
\[\begin{bmatrix}a_{1}&b_{1}&0&\dots&0&0\\ c_{1}&a_{2}&b_{2}&\dots&0&0\\ 0&c_{2}&a_{3}&\dots&0&0\\ \vdots&\vdots&\vdots&\ddots&\vdots&\vdots\\ 0&0&0&\dots&a_{K-1}&b_{K-1}\\ 0&0&0&\dots&c_{K-1}&a_{K}\end{bmatrix}\]_The determinant of such matrix, noted \(d_{K}\), can be computed with the following recurrence relation:_  
\[d_{0} =1,\quad d_{1}=a_{1}\] \[d_{k} =a_{k}d_{k-1}-b_{k-1}c_{k-1}d_{k-2}\quad,\text{for $2\leq k\leq K$}\]  
When applying this theorem to \((\mathbf{P}^{(batch)})^{-1}\), we obtain a ratio of 2 expressions where the denominator is always \(q^{2(K-1)}\prod_{n=1}^{K}\sigma_{n}^{2}\). Therefore, noting the numerator \(p_{K}\), we have:  
\[d_{K}=\frac{p_{K}}{q^{2(K-1)}\prod_{n=1}^{K}\sigma_{n}^{2}}\]  
As we may have to evaluate this expression for \(\sigma_{n}=0\), it is more convenient to work with \(p_{K}=d_{K}q^{2(K-1)}\prod_{n=1}^{K}\sigma_{n}^{2}\).  
**Lemma A1** (recurrence relation considering the sequence \(s_{k}=d_{k}\prod_{j=1}^{k}(q^{2}\sigma_{j}^{2})\)).: \[s_{0} =1,\quad s_{1}=q^{2}+\sigma_{1}^{2}\] \[s_{k} =(q^{2}+2\sigma_{k}^{2})s_{k-1}-\sigma_{k}^{2}\sigma_{k-1}^{2}s_ {k-2}\quad,\text{for $2\leq k<K$}\] \[s_{K} =(q^{2}+\sigma_{K}^{2})s_{K-1}-\sigma_{K}^{2}\sigma_{K-1}^{2}s_ {K-2}\]  
Proof.: \[s_{k} =d_{k}\prod_{j=1}^{k}(q^{2}\sigma_{j}^{2})=(a_{k}d_{k-1}-b_{k-1}c _{k-1}d_{k-2})\prod_{j=1}^{k}(q^{2}\sigma_{j}^{2})\quad\text{(using Theorem A1)}\] \[=a_{k}q^{2}\sigma_{k}^{2}\underbrace{d_{k-1}\prod_{j=1}^{k-1}(q^ {2}\sigma_{j}^{2})}_{s_{k-1}}-b_{k-1}c_{k-1}q^{4}\sigma_{k}^{2}\sigma_{k-1}^{ 2}\underbrace{d_{k-2}\prod_{j=1}^{k-2}(q^{2}\sigma_{j}^{2})}_{s_{k-2}}\] \[=a_{k}q^{2}\sigma_{k}^{2}s_{k-1}-\sigma_{k}^{2}\sigma_{k-1}^{2}s_ {k-2}\quad\text{(replacing $b_{k}$ and $c_{k}$ by their values)}\]  
Theorem A1 provides the initial values of the sequence \(d_{k}\), which are used to define the initial values of \(s_{k}\).  
The term \(p_{K}\) is actually equal to \(p_{K}=d_{K}/q^{2}\prod_{j=1}^{K}(q^{2}\sigma_{j}^{2})=s_{K}/q^{2}\). The common factor to all terms \(1/q^{2}\) is applied to the initial values of a new sequence \(p_{k}\). Finally, we can also replace by the values of \(a_{k}\). Then, we have:  
\[p_{0} =d_{0}/q^{2}=1/q^{2},\quad p_{1}=d_{1}\sigma_{1}^{2}=1+\sigma_{1 }^{2}/q^{2}\] \[p_{k} =(q^{2}+2\sigma_{k}^{2})p_{k-1}-\sigma_{k}^{2}\sigma_{k-1}^{2}p_ {k-2},\quad\text{ for $2\leq k<K$}\] \[p_{K} =(q^{2}+\sigma_{K}^{2})p_{K-1}-\sigma_{K}^{2}\sigma_{K-1}^{2}p_ {K-2}\]