I am trying to calculate the following
$K^{-1}DK^{-1} * p$
Where $K$ is symmetric positive definite and $D$ is positive diagonal and $p$ is a vector. The problem is that p is very, very small so its rounded to zero by Matlab so I want to take the log of of the calculations of $p$ so that I can actually calculate the map above. However if I take the log I need to transform it back somehow.
Can this be done? $K^{-1}$ will naturally contain negative entries.
It seems like it can't be done. If the $K^{-1}DK^{-1}$ is a m-by-n matrix then the map can be seen as just $m$ scalar products. However the log of a scalar product can't be tampered with since $\log(a \cdot b) = \log(a_{1} b_{1} + a_{2} b_{2} +...)$. Further on if we take the log of the individual elements we get $\log a_{1} \log b_{1} + \log a_{2} \log b_{2} +...$ which in this case is not feasible since $b$ in our case contains negative elements.
Even if $b$ just contained positive element there's no easy way of transforming it back since in general
$\log(a_{1} b_{1} + a_{2} b_{2} +...) \neq \log a_{1} \log b_{1} + \log a_{2} \log b_{2} +...$
and we thus can't take the exp to transform back.