$AA^T=J_n-I_n$ has a solution over $\mathbb{F}_2$ iff $n$ is odd. I came across a combinatorics problem, which I turned into a Linear Algebra problem. In the end, it boiled down to the following problem:
\begin{align*}
 AA^T=J_n-I_n\pmod 2
\end{align*}
has a solution iff  $n$ is odd.

*

*Here we are working over the field $\mathbb{F}_2$

*$J_n$ denotes the matrix with all elements $1$.

*$A$ is a $n\times n$ matrix.

My attempt: If $n$ is odd, it is not hard to see that $A=J_n-I_n$ itself is a solution. I am not sure if my "proof" for the even $n$ part is correct. Throughout the rest of the solution we will be working over $\mathbb{F}_2$.
Let us denotes the $i$-th row vector of $A$ as $v_i$. Then the equation basically translates to
\begin{equation*}
v_i\cdot v_j=
\begin{cases}
0 & i=j \\
1 & \text{otherwise} 
\end{cases}
\end{equation*}
For even $n$, $\det(J_n-I_n)=1\pmod 2$(see circulant matrix). Thus we conclude that $\det(A)=1\pmod 2\implies A$ is invertible $\implies$ $v_i$'s$(1\le i\le n)$ are linearly independent$\implies$ $v_i$'s form a basis pf $\mathbb{F}^n_2$. Now consider
\begin{equation}
v=\sum_{i=1}^{n}\lambda_iv_i\implies v^2= \sum \lambda_i^2v_i^2 + 2 \sum \lambda_i\lambda_j(v_i\cdot v_j )=0\pmod  2
\end{equation}
But this is a contradiction, because $e_1\cdot e_1=1$, here $e_1$ is the first standard basis vector of $\mathbb{F}_2^n$.


*

*This whole proof seems a little bit weak to me, in the sense there seems to be no key observation/key step in the proof.

*Also defining the dot product seems a bit iffy to me. After all, this does not make $\mathbb{F}_2^n$ into a inner product space.

 A: If you are uncomfortable using dot products in your proof, I can provide a proof that does not use dot products.
First of all, the condition $AA^T=J_n-I_n$ implies that each row of $A$ has an even numbers of ones. To see this, note that the diagonal entries of $AA^T$ encode the parity of the number of ones in each row of $A$, while the diagonal entries of $J_n-I_n$ are zero.
Let $\newcommand{\one}{{\bf 1}}\one=[1\;\;1\;\cdots\;1]^\top$ be the $n\times 1$ column vector of all ones. The previous paragraph implies $A\one\equiv \vec 0$, so that $\newcommand{\rank}{\operatorname{rank}}\rank A\le n-1$, which further implies $\rank AA^T\le n-1$.
Now, assume $n$ is even. In this case, $\rank(J_n-I_n)=n$, since $J_n-I_n$ is its own inverse. This contradicts the previous paragraph.
A: 
This whole proof seems a little bit weak to me, in the sense there seems to be no key observation/key step in the proof.

For a different view, consider $G:=J_n-I_n$ as representing a skew symmetric bilinear form $V\times V \longrightarrow \mathbb F_2$ i.e. $g_{i,j}=\langle v_i, v_j\rangle$ where $\langle, \rangle$ denotes said form and $\big\{v_1,...,v_n\big\}$ provide a basis for $V$. Since we work over characteristic 2 we need to be careful and insist on defining skew-symmetry as isotropy, i.e. that $\langle v, v\rangle = 0$ for all $v\in V$.
With respect to OP's concern about a key observation, it is that $G$ implies a skew-symmetric bilinear form so all vectors are isotropic.  However the form is non-degenerate when $n$ is even, so the existence of a factorization $AA^T$ tells us that $G$ is congruent to the identity matrix, i.e. up to a change of basis our form is equivalent to the dot product which is not an isotropic form and this is impossible.

Mechanically, I'd write this as :
Assume $n$ is even and $AA^T = G = J_n-I_n$ exists.
The matrix determinant lemma tells us that $\det\big(J_n-I_n\big) = \det\big(I_n\big)\cdot (1+\mathbf 1_n^T\mathbf 1_n)=\det\big(I_n\big)\cdot (1+0) = 1$ thus the form is non-degenerate (which implies $\det\big(A\big)=1$).
Yet selecting $\mathbf x:= A^{-T}\mathbf e_k$ (with $\mathbf e_k$ being the kth standard basis vector)  gives
$1 = \mathbf x^TAA^T\mathbf x =  \mathbf x^TG\mathbf x=\sum_{k=1}^n\sum_{j=1}^n x_k\cdot x_j \cdot\langle v_k, v_j\rangle=\sum_{k=1}^n\sum_{j=1}^n \langle x_k \cdot v_k,x_j \cdot v_j\rangle=  \big\langle\big( \sum_{k=1}^n x_k \cdot v_k\big),\big(\sum_{k=1}^n x_k \cdot v_j\big)\big\rangle=0$
Conclude $0=1$ which is a contradiction.
