Number of possible matrices using given conditions I have a question, that goes as follows:
The number of all matrices $A=[a_{ij}], 1 \leq i,j \leq 4$ such that $a_{ij}= \pm1 $ and $\sum_{i=1}^4a_{ij}= \sum_{j=1}^4a_{ij}=0$ is?
So, I think this question means to say that the sum of all elements in a row, and all elements in a column is zero, and the possible value of the elements being only $+1,-1$. How do I form the combinations in this case?
I tried to find the number of solutions to the equation $a_{11}+a_{12}+a_{13}+a_{14}=0$ and then repeating the same process for every row and column but that didn't get me anywhere.
The answer says 90 and I cannot seem to be able to get there. I have seen another question asking the same, but the answer isn't very clear to me, and that question being 4 years old, I am posting again.

The problem is same as placing two $1$s and two $0$s in each row and column.
Put two $1$s in a row. $\binom{4}{2}$ ways. Pick one of the columns in which a $1$ is placed and place another $1$. $\binom{3}{1}$ ways.
There is a $2 \times 2$ submatrix in which three $1$s are placed now. If fourth square also contains a $1$, entire matrix is determined. Thus one matrix is obtained.
$$
\begin{bmatrix}
1 & 0 & 1 & 0 \\
0 &   &  & \\
1 & & (1,0)& \\
0 & & &
\end{bmatrix}
$$
If the fourth square contains a zero, there are two ways to place a $1$ in that particular row (containing the zero in place of fourth $1$).
$$
\begin{bmatrix}
1 & 0 & 1 & 0 \\
0 &   &  & \\
1 & 1& 0& 0\\
0 & & &
\end{bmatrix}
$$
Now in the untouched column (fourth one above), there is only one way to put two $1$s. The remaining $2\times2$ submatrix can be filled in two ways by choosing a position for $1$.
$$
\begin{bmatrix}
1 & 0 & 1 & 0 \\
0 &   &  & 1 \\
1 & 1 & 0 & 0\\
0 &   & & 1
\end{bmatrix}
$$
Hence final answer $$\binom{4}{2}\cdot\binom{3}{1}\cdot(1+2\cdot2)=90$$
