Suppose I have a square matrix, $\textbf{A}$. I want to know whether I can represent it, it up to a permutation of the columns, using a symmetric or triangular matrix instead, since these only have ${n}\choose{2}$ entries instead of $n^2$.
In other words, what properties would $\textbf{A}$ need to have for a solution to exist for the following equation?
$$\textbf{A P} = \textbf{B},$$
where $\textbf{P}$ is a permutation matrix and $\textbf{B}$ is either triangular or symmetric (whichever is easier to write an answer about).
I don't need to actually find $\textbf{B}$ or compare individual pairs of $\textbf{A}$ and $\textbf{B}$, so this may be simpler than some previous questions such as this one or this one.