Make the entries of a matrix positive with linear algebra I am considering two slightly more relaxed version of the question asked here: Making the entries of a matrix positive.
The two questions are:
Question 1:
Consider a matrix $M\in\mathbb{R}^{m\times n}$. When does there exist either a matrix $P_M \in \mathbb{R}^{m\times m}$ such that
$$
P_M M = \text{abs}(M)
$$
or a matrix $Q_M  \in \mathbb{R}^{n\times n} $ such that
$$
M Q_M = \text{abs}(M).
$$
If these matrices exist, how would we compute them?
NOTE : by $\text{abs}(M)$ we mean the matrix formed by taking the entry wise absolute value of $M$.
Question 2:
Again, consider a matrix $M\in\mathbb{R}^{m\times n}$. Then by $\text{sgn}(M)$ denote the sign pattern matrix of $M$, that is,
$$ [\text{sgn}(M)](i,j) :=
\begin{cases}
-1 & \text{if} M(i,j) < 0,\\
1 & \text{if} M(i,j) > 0,\\
0 & \text{if} M(i,j) = 0,\\
\end{cases}
\ \ \ \forall\ 1\leq i\leq n, 1\leq j\leq m.  
$$
When does there exist either a matrix $P_M \in \mathbb{R}^{m\times m}$ such that
$$
P_M M = \text{sgn}(M)
$$
or a matrix $Q_M  \in \mathbb{R}^{n\times n} $ such that
$$
M Q_M = \text{sgn}(M).
$$
These matrices do not necessarily need to be invertible.
NOTE : None of the matrices are necessarily invertible.
EDIT : I should note, it would be very nice if a method exists that does not require $\text{abs}(M)$ or $\text{sgn}(M)$ to be computed
 A: Given an $m \times n$ matrix $A$ and an $m$-dimensional column vector $b$, asking whether there is an $n$-dimensional column vector $x$ such that
$$Ax=b$$
is fundamental question in linear algebra. You can use Gaussian elimination to work out whether $b$ is in the column space of $A$ and find a solution vector $x$ in the case that it is.
Seemingly more generally, you could start with $A$ an $m \times n$ matrix and $B$ an $m \times k$ matrix and ask whether there exists an $n \times k$ matrix $X$ such that
$$AX=B.$$
This isn't actually a more general question though. You just have to ask the above question $k$ times, once for each column of $B$. As long as all $k$ columns of $B$ belong to the column space of $A$, you just populate the columns of $X$ with any $k$ solution vectors.
It seems to me that your question fits into this framework.

Added: To spell things out a bit more, given $A$ and $B$, there exists $X$ such that $AX=B$ if and only if the column space of $B$ is contained in the column space of $A$. Similarly (this is the same statement, up to taking the transpose) there exists $X$ such that $XA=B$ if and only if the row space of $B$ is contained in the row space of $A$.
It's not always going to work out that way in the situations you interested in:
Example: The column space of $M=\begin{bmatrix}1 \\-1\end{bmatrix}$ does not contain the column space of $\operatorname{abs}(M) =\begin{bmatrix}1 \\1\end{bmatrix}$, so there does not exist $Q_M$ with $MQ_M=\operatorname{abs}(M)$.
Another example: the row space of $M=\begin{bmatrix}1 & 2 \end{bmatrix}$ does not contain the row space of $\operatorname{sgn}(M)=\begin{bmatrix} 1 & 1 \end{bmatrix}$, so there does not exist $P_M$ with $P_MM=\operatorname{sgn}(M)$.
