<s>[INST] An $n\times n$ matrix that has exactly one $1$ and one $-1$ in each row and column and others are $0$ I came across the following Question

Assume an $n\times n$ matrix that has exactly one $1$ and one $-1$ in
each row and column and others are $0$. Prove that there is a way that
we can change the places of rows and columns in which it gives the
negative of the matrix.

MY TRY-
Call such matrix A.
All we need to do is to find some permutation matrices $P_{1}$ and $P_{2}$ such that $$P_{1}AP_{2} = -A$$
$A$ can be written as a difference of two permutation matrices i.e. $$A = P-Q$$
where P and Q are some permutation matrices
Example of one such matrix of order $3\times3$
$$ \begin{pmatrix}
1 & 0 & -1 \\
-1 & 1 & 0 \\
0 & -1 & 1
\end{pmatrix} = \begin{pmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
 0 & 0 & 1
\end{pmatrix}-\begin{pmatrix}
0 & 0 & 1 \\
1 & 0 & 0 \\
 0 & 1 & 0
\end{pmatrix}.$$
We could first turn every such matrix $A$ by multiplying
by appropriate permutation matrices to the form $I-R$ :-$$P^{T}A = P^{T}(P-Q) = I-R$$ Clearly the permutation matrix R shouldn't have $1$ at the same position as in $I$. R lies in the class of traceless permutation matrices. Now If we are able to find matrices permutation $P_{1}$ and $P_{2}$ such that $$P_{1}(I-R)P_{2} = (R-I) = -(I-R)$$ we'll have
$$P_{1}P^{T}AP_{2} = -P^{T}A \implies PP_{1}P^{T}AP_{2} = -A $$
and we would be done.
But how could I proceed now to find $P_{1}$ and $P_{2}$?
Would we need some extra equation from the fact that $R$ is a traceless permutation matrix?
It was great to see other approaches to solve the problem by Michael Hoppe and user1551.
But I am curious to see how would it be if we go this way?
 [/INST] Here's an algorithm to transform the matrices.  I'll explain by an example.
We want to transform
$$
\begin{pmatrix}
-1 & 0 & 1 & 0\\
0 & -1 & 0 & 1\\
0 & 1 & -1 & 0\\
1 & 0 & 0 & -1
\end{pmatrix}\quad\text{to}\quad
\begin{pmatrix}
1 & 0 & -1 & 0\\
0 & 1 & 0 & -1\\
0 & -1 & 1 & 0\\
-1 & 0 & 0 & 1
\end{pmatrix}.
$$
We may define the companion of the first matrix as
$$\begin{pmatrix}
1 & 2 & 3 & 4\\
4 & 3 & 1 & 2
\end{pmatrix}$$
where the companion's first column gives the position of $-1$ and $1$ in the first column of the matrix resp., that is $\left(\begin{smallmatrix}1\\4\end{smallmatrix}\right)$ and so on.
Now changing two columns in the matrix changes the correspondent columns in the companion; exchanging two rows $j$ and $k$ in the matrix exchanges all values of $j$ and $k$ in the companion.
We want to go from
$$\begin{pmatrix}
1 & 2 & 3 & 4\\
4 & 3 & 1 & 2
\end{pmatrix}\quad\text{to}\quad\begin{pmatrix}
4 & 3 & 1 & 2\\
1 & 2 & 3 & 4
\end{pmatrix}.$$
Start with exchanging the first and last column of the companion:
$$\begin{pmatrix}
4 & 2 & 3 & 1\\
2 & 3 & 1 & 4
\end{pmatrix}.$$
Now the first column should be $\left(\begin{smallmatrix}4\\1\end{smallmatrix}\right)$, hence we swap row $1$ and $2$ to obtain
$$\begin{pmatrix}
4 & 1 & 3 & 2\\
1 & 3 & 2 & 4
\end{pmatrix}.$$
Repeat the process with the companion's second column, that is switch columns $2$ and $3$:
$$\begin{pmatrix}
4 & 3 & 1 & 2\\
1 & 2 & 3 & 4
\end{pmatrix}$$
and we're done already. That was easily done, now another example for the systematic way
Take the companion
$$\begin{pmatrix}
2 & 3 & 1 & 5 & 4\\
4 & 5 & 3 & 1 & 2
\end{pmatrix}.
$$
Look for cycles in the permutation, there are two, namely $(3,5,1)$ and $(2,4)$.  Now first change $3$ to $5$, that is, exchange row $3$ with row $5$ in the corresponding matrix to get
$$\begin{pmatrix}
2 & 5 & 1 & 3 & 4\\
4 & 3 & 5 & 1 & 2
\end{pmatrix},
$$
then exchange $5$ and $1$:
$$\begin{pmatrix}
2 & 1 & 5 & 3 & 4\\
4 & 3 & 1 & 5 & 2
\end{pmatrix}
$$
and for the first cycle finally $1$ and $3$:
$$\begin{pmatrix}
2 & 3 & 5 & 1 & 4\\
4 & 1 & 3 & 5 & 2
\end{pmatrix}.
$$
For the second cycle exchange $2$ and $4$
$$\begin{pmatrix}
4 & 3 & 5 & 1 & 2\\
2 & 1 & 3 & 5 & 4
\end{pmatrix}.$$
Now change the columns for the correct order:
$$\begin{pmatrix}
4 & 5 & 3 & 1 & 2\\
2 & 3 & 1 & 5 & 4
\end{pmatrix}.$$
Done!
For the first example we could have perform the changes $1\leftrightarrow4$, $4\leftrightarrow2$, $2\leftrightarrow3$, and $3\leftrightarrow1$ and then switch the columns accordingly, but there obviously was an easier way.
</s>