the cost function represents the contribution from the data. The second term represents the contribution from the prior knowledge. If the data is of good quality (high S/N, and high R) then the data term will dominate. Since the product of two Gaussians is a Gaussian, equation (8) can be equivalently written as $$J({\bf x})=({\bf x}-{\bf \hat{x}})^{T}{\bf \hat{S}^{-1}}({\bf x}-{\bf \hat{x}})$$ where ${\bf \hat{x}}$ and $\bf{\hat{S}}$ are the mean and covariance, respectively, of the posterior probability distribution. A diagonal element of $\bf{\hat{S}}$ is the variance in the $j^{th}$ component of the state vector, $\hat{S}_{jj}=\hat{\sigma}^2_j$, where $\hat{\sigma_j}$ is the retrieval uncertainty in the $j^{th}$ parameter.

The goal of any retrieval is to obtain the most likely set of atmospheric parameters given the data. This is achieved when (7) is maximized which occurs at the mean of the posterior probability function. Equating (8) and (9) we can solve for $\bf {\hat{x}}$ and ${\bf \hat{S}}$ to get $${\bf \hat{x}}={\bf x_a+ G(y-Kx)}$$ where [**G**]{} is the gain matrix that describes the sensitivity of the retrieval to the observations (if [**G=0**]{}, no sensitivity, then the measurements do not contribute towards the retrieved state) , given by $${\bf G}=\frac{\partial {\bf \hat{x}}}{\partial {\bf y}}={\bf \hat{S}K^TS_e^{-1}}$$ with $${\bf \hat{S}}={\bf 