I need to calculate the following derivative of the product of several matrices (one of which is the inverse of a product of matrices) with respect to one of the matrices in question:
$$\frac{\delta(\mathbf{a}^T(\text{diag}(\mathbf{\tau}) \mathbf{\Omega} \text{diag}(\mathbf{\tau}))^{-1}\mathbf{a})}{\delta\mathbf{\Omega}}$$
In the above, $\mathbf{a}$ and $\mathbf{\tau}$ are a vectors, $\text{diag}(\mathbf{\tau})$ is the diagonal matrix with elements of $\mathbf{\tau}$ on its diagonal, and $\mathbf{\Omega}$ is a symmetric matrix. The elements in vectors $\mathbf{a}$ and $\mathbf{\tau}$ don't rely on any element of $\mathbf{\Omega}$.
From the matrix cookbook, I can see rules such as
$$\frac{\delta\mathbf{a}^T\mathbf{X}^{-1}\mathbf{b}}{\delta\mathbf{X}}=-\mathbf{X}^{-T}\mathbf{ab}^T\mathbf{X}^{-T}$$
However, I'm having trouble finding a rule for when you are differentiating by a matrix which is only one of a product of matrices that is being inverted? Any guidance would be appreciated.
(Context - I am trying to calculate values for the derivatives of the log posterior of a model with respect to different parameters (in this case the correlation matrix $\mathbf{\Omega}$) in order to write a model fitting algorithm)