Invertibility of Set Intersection Signed matrix I am interested in looking at the following problem in combinatorial matrix theory. Since I could not find a reference related to this types of matrices, I hope someone here could help me.
Let $n \geq 1$ and $X=\{1, \ldots, n\}$. Assume that $\mathcal{F}(X)$ is the collection of all subsets of $X$. Now let $A$ be a matrix of size $2^n \times 2^n$ defined as follows:
$A_{S_1, S_2}=(-1)^{|S_1 \cap S_2|}$, 
where $S_1, S_2 \in \mathcal{F}(X)$.
Define $J_n$ as the matrix (size $n$) whose entries are $1$ everywhere.
Another related one is the matrix $B=(A+J_n)/2$, i.e., $B_{S_1, S_2}=1$ if $|S_1 \cap S_2|$ is even and $B_{S_1, S_2}=0$ if $|S_1 \cap S_2|$ is odd.
Question: My main concern is whether $A$ or $B$ is invertible.
Remark: We can define a matrix $C$ such that $C_{S_1, S_2}=|S_1 \cap S_2|$, where $S_1, S_2 \subseteq X$. This matrix $C$ is related to the incident matrix (see e.g., "Matrices and set intersections" by H. J. Ryser (1981))
Then our matrix $B$ can be regarded as the image of the matrix $J_n-C$ modulo $\mathbb{Z}_2$.
 A: The key is to order the subsets of $X$ (and thus the rows and columns of the corresponding matrix) in a "nice" way for the purpose of induction. I will write $A_n$ for the matrix $A$ corresponding to a set $X$ with $|X|=n$. Then $A_1=\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}$ if we order the subsets by $\emptyset,X$. For $A_2$, we want to have $A_1$ in the top left corner, which can be achieved by ordering the subsets of $X=\{a,b\}$ by $\emptyset,\{a\},\{b\},X$. In fact, with respect to this ordering, one sees that $A_2=\begin{pmatrix} A_1 & A_1 \\ A_1 & -A_1 \end{pmatrix}$. For $A_3$, we want to have $A_2$ in the top left corner so we order the subsets of $X=\{a,b,c\}$ by $\emptyset,\{a\},\{b\},\{a,b\},\{c\},\{a,c\},\{b,c\},X$. With respect to this ordering, one sees that $A_3=\begin{pmatrix} A_2 & A_2 \\ A_2 & -A_2 \end{pmatrix}$. Continuing in this way, one shows by induction that $A_n$ is invertible for all $n\geq 1$.
Now writing $B_n$ for the matrix $B$ when $|X|=n$, $B_n$ is invertible if and only if $A_n+J_n$ is invertible. For this, we can use the matrix determinant lemma: If we let $u=v=(1,1,\ldots,1)^T$, then $A_n+J_n=A_n+uv^T$ so $\det(A_n+J_n)=\det(A_n+uv^T)=(1+v^T A_n^{-1}u)\det(A_n)=(1+v^Te_1)\det(A_n)=2\det(A_n)$ where $e_1=(1,0,0,\ldots,0)^T$. Hence $A_n+J_n$ is invertible, and so $B_n$ is invertible for all $n\geq 1$.
