Consider the following matrix function (which is related to the Kalman filter associated with a Gauss-Markov dynamical system) $$ g(X) = X - XC^T \Gamma^T (\Gamma C X C^T \Gamma^T + R)^{-1} \Gamma C X $$ where
- $X$ is a symmetric and positive semi-definite matrix.
- $C$ is a diagonal matrix.
- $\Gamma = \text{diag}(\gamma_1,\dots,\gamma_n)$ is a diagonal matrix where the diagonal elements $\gamma_1,\dots,\gamma_n$ are either $0$ or $1$, such that $\Gamma = \Gamma^T$ and it is positive semi-definite.
- $R$ is a diagonal positive-definite matrix, such that $\Gamma C X C^T \Gamma^T + R$ is guaranteed to be invertible.
I'm trying to separate the matrix expression above into the following form (which makes it much easier to work with later on): $$ g(X) = f_1(\gamma_1,X,C,R) + \cdots + f_n(\gamma_n,X,C,R) $$ where the functions $f_i$ can transform $\gamma_i$ using the matrices $X,C,$ and $R$, but the functions $f_i$ cannot be functions of $\gamma_j$ for $j \neq i$. The goal here is to separate the matrix expression above into a sum of terms, where each term is a function of $\gamma_i$ and is independent of the other terms such that $\gamma_i$ does not appear in the other terms.
So far, my attempt to do this is as follows. First, we let $\Gamma = \sum_{i=1}^n \Gamma_i$, where $\Gamma_i = \text{diag}(0,\dots,\gamma_i,\dots,0)$. Then, the matrix expression above becomes $$ \begin{align} X - XC^T \Gamma^T (\Gamma C X C^T \Gamma^T + R)^{-1} \Gamma C X &= X - XC^T \left[\sum_{i=1}^n \Gamma_i\right] \left(\left[\sum_{j=1}^n \Gamma_j\right] C X C^T \left[\sum_{k=1}^n \Gamma_k\right] + R\right)^{-1} \left[\sum_{\ell=1}^n \Gamma_\ell\right] C X \\ &= X - \left[\sum_{i=1}^n XC^T\Gamma_i\left(\left[\sum_{j=1}^n \Gamma_j\right] C X C^T \left[\sum_{k=1}^n \Gamma_k\right] + R\right)^{-1} \left[\sum_{\ell=1}^n \Gamma_\ell\right] C X\right] \\ &= X - \left[\sum_{i=1}^n \left[\sum_{\ell=1}^n XC^T\Gamma_i\left(\left[\sum_{j=1}^n \Gamma_j\right] C X C^T \left[\sum_{k=1}^n \Gamma_k\right] + R\right)^{-1}\Gamma_\ell C X\right]\right] \\ &= X - \left[\sum_{i=1}^n \left[\sum_{\ell=1}^n XC^T\Gamma_i\left(\left[\sum_{j=1}^n \Gamma_j C X C^T \left[\sum_{k=1}^n \Gamma_k\right]\right] + R\right)^{-1}\Gamma_\ell C X\right]\right] \\ &= X - \left[\sum_{i=1}^n \left[\sum_{\ell=1}^n XC^T\Gamma_i\left(\left[\sum_{j=1}^n \left[\sum_{k=1}^n \Gamma_j C X C^T \Gamma_k\right]\right] + R\right)^{-1}\Gamma_\ell C X\right]\right] \\ &= X - XC^T\left[\sum_{i=1}^n \sum_{\ell=1}^n \Gamma_i\left(\sum_{j=1}^n \sum_{k=1}^n \Gamma_j C X C^T \Gamma_k + R\right)^{-1}\Gamma_\ell\right]C X \end{align} $$ However, it seems from the last line above that what I'm after is not possible, and I'm wondering if there is another way to approach this.