I am dealing with a system of equations $$ \left[\begin{array}[c]\\d_1\\d_2\\d_3\end{array}\right] = \mathbf{A} \left[\begin{matrix}u_1\\u_2\\u_3\end{matrix}\right]~, $$ where $\sum_i d_i=0$ and $\sum_i u_i=0$ and $\mathbf{A}$ is known. I wish to find the matrix $\mathbf{B}$ that satisfies $$ ~ \left[\begin{matrix}d_1\\d_2\end{matrix}\right] = \mathbf{B} \left[\begin{matrix}u_1\\u_2\end{matrix}\right]~, $$ in terms of the elements of $\mathbf{A}$. I have done so successfully using a pseudoinverse method using the projection $$ \mathbf{P} = \left[\begin{matrix}1&0\\0&1\\-1&-1\end{matrix}\right]~, $$ and its pseudoinverse, $\mathbf{P}^+$ such that $\mathbf{P}^+\mathbf{P}=\mathbf{I}$. With these, I can then write $$ \mathbf{P}\left[\begin{matrix}d_1\\d_2\end{matrix}\right] = \mathbf{A}\mathbf{P}\left[\begin{matrix}u_1\\u_2\end{matrix}\right]\\ \left[\begin{matrix}d_1\\d_2\end{matrix}\right] = \mathbf{P}^+\mathbf{A}\mathbf{P}\left[\begin{matrix}u_1\\u_2\end{matrix}\right]~. $$ I then have my answer $$\mathbf{B}=\mathbf{P}^+\mathbf{A}\mathbf{P}~,$$ provided I can determine $\mathbf{P}^+$.
I have the inkling that there must be an equivalent way of determining $\mathbf{B}$ that doesn't require explicit calculation of the pseudoinverse $\mathbf{P}^+$. What would that be? And for more general knowledge, is there a name for systems like my first system that can be reduced to the second system?