Suppose we have a matrix $A\in \mathbb R^{n\times n}$ such that $\mathbf{1}\in \text{range}(A)$, where $\mathbf{1}$ is the all-ones vector. I want to find, explicitly with respect to the entries of $A$, any vector $x$ such that $Ax=\mathbf 1$. I am equally interested in the case where $A$ is symmetric/positive-semidefinite.
Attempt 1:
The first thing I've tried is to just calculate each $x_i$ by hand.
For each $i$ we have $$\sum_{j}x_j a_{ij}=1,$$
so $x_1=-\frac{1}{a_{11}}\sum_{j>1} x_j a_{1j}$, and
\begin{align}
x_2&=\frac{1}{a_{22}}\sum_{j\not=2} x_ja_{2j}\\
&=\frac{a_{21}}{a_{22}}\sum_{j>1}x_ja_{1j}-\frac{1}{a_{22}}\sum_{j>2}x_ja_{j},
\end{align}
solving for $x_2$ and so on. However, it seems like this will not yield the easiest description of $x$.
Attempt 2:
Let $A^+$ denote the pseudo-inverse of $A$. It suffices to let $x=A^+\mathbf{1}$. That means $x_i$ is just the sum of the $i$th row of the pseudo-inverse of $A$. Since we don't know the eigenvalues of $A$ in general, we do not explicitly know $A^+$, but maybe there's a relationship between the row sums of a matrix and that of its pseudo-inverse? I found this post related to this, but I have not been able to adapt it to my setting.