# matrices – Find the matrix P with all \$P_{ij} geq 0\$ that satisfies the equation \$PX=Y\$?

For a project, I have to find the matrix $$P$$ with all non-negative entries $$P_{ij} geq 0$$ that satisfies the equation $$PX=Y$$. All of the entries $$P_{ij}$$ of the matrix $$P$$ must be non-negative real numbers. The entries of $$X$$ and $$Y$$ are all non-negative real numbers. Matrix $$P$$ is $$m$$ by $$n$$, matrix $$X$$ is $$n$$ by $$r$$, and matrix $$Y$$ is $$n$$ by $$q$$.
I tried the solution: $$P$$=$$Y$$($$XX’$$)^$$-1$$ but this solution does not always satisfy the $$P_{ij} geq 0$$ condition. There should be a solution that always satisfies the condition.