I am studying the reverse mode of automatic differentiation.
The reverse mode of automatic differentiation allows the efficient computation of a the derivative of a single dependent variable $y$ with respect to as many independent variables $x_i$ as you want. One assigns to each intermediate variable $v$ an adjoint variable $\bar{v}$ which is the derivative of a chosen dependent variable with respect to the subexpression $$\bar{v} \rightarrow \bar{v} = \frac{\partial y}{\partial v}$$
so the assignment $$y = v_1 \sin(v_2)$$ corresponds to the adjoint assignments
\begin{eqnarray} \bar{v_1} &=& \bar{y} \sin(v_2) \\ \bar{v_2} &=& \bar{y} v_1 \cos(v_2) \end{eqnarray}
where $\bar{y} = 1$ .
I am interested in the situation where you solve a linear system in the program:
$$Ax = b$$
where $y$ might be another function of $x$: $$y(x)$$
According to this tutorial of the CoDiPack software, the corresponding adjoint statements are
\begin{eqnarray} \bar{A} &=& - \lambda x^T \\ \bar{b} &=& \lambda \\ \end{eqnarray} where $\lambda$ is the the solution of the adjoint equation $$A^T \lambda = \bar{x}$$
I found the same algorithm in several other documents, for example here in section 7, Iteration and equation solving.
It is not clear to me how to arrive at these statements. I think the derivation must be similar as in the case where one wants to optimize $w(x)$ where $x$ is subject to the constraint $$Ax = b$$ See for example this document.