A construction of a Hadamard matrix Let $H_n$ be a $2^n \times 2^n$ matrix indexed by all subsets of $[n] = \{1,\ldots,n\}$ and let the entry at the intersection of the row and column indexed by the sets $X$ and $Y$ be $$(-1)^{ |X \cap Y|}.$$
A book that I am reading states that this is a Hadamard matrix but it isn't straightforward for me to see it. 
In order to prove the claim we have to show that for distinct subsets $X,Y$ of $[n]$ the identity $$\sum_{S \subseteq [n]} (-1)^{ |X \cap S| + |Y \cap S|} = 0,$$ holds but I do not see an easy way to show it.
Can someone explain how to manipulate the above sum in order to obtain the stated identity?
 A: UPDATE: A simpler proof of Proposition 3 below (which is a restatement of your claim) can be found in the solution to Exercise 2 in Drexel Fall 2019 Math 222 midterm #2.

ORIGINAL POST: Here is a complete answer based on my comments.
If $X$ and $Y$ are two sets, then the symmetric difference $X\bigtriangleup
Y$ of $X$ and $Y$ is defined to be the set $\left(  X\setminus Y\right)
\cup\left(  Y\setminus X\right)  $. We shall use the following standard fact:

Proposition 1. Let $X$ and $Y$ be two sets.
(a) We have $X\bigtriangleup Y=\left(  X\cup Y\right)  \setminus\left(
X\cap Y\right)  $. (This is often used as an alternative definition of
  $X\bigtriangleup Y$.)
(b) We have $\left(  X\cap S\right)  \bigtriangleup\left(  Y\cap S\right)
=\left(  X\bigtriangleup Y\right)  \cap S$ for any set $S$.
(c) If $X$ and $Y$ are finite, then $\left\vert X\bigtriangleup
Y\right\vert \equiv\left\vert X\right\vert +\left\vert Y\right\vert
\operatorname{mod}2$.
(d) If $X\neq Y$, then $X\bigtriangleup Y\neq\varnothing$.

Proof of Proposition 1. Parts (a) and (b) of Proposition 1 are easy
to prove (either using Boolean algebra, or constructively by showing that each
side of the equality is a subset of the other). Part (d) is almost
trivial. It remains to prove part (c). Assume that $X$ and $Y$ are finite.
Then, $X\bigtriangleup Y=\left(  X\setminus Y\right)  \cup\left(  Y\setminus
X\right)  $, so that
$\left\vert X\bigtriangleup Y\right\vert =\left\vert \left(  X\setminus
Y\right)  \cup\left(  Y\setminus X\right)  \right\vert =\underbrace{\left\vert
X\setminus Y\right\vert }_{=\left\vert X\right\vert -\left\vert X\cap
Y\right\vert }+\underbrace{\left\vert Y\setminus X\right\vert }_{=\left\vert
Y\right\vert -\left\vert X\cap Y\right\vert }$ (since the sets $X\setminus Y$
and $Y\setminus X$ are disjoint)
$=\left(  \left\vert X\right\vert -\left\vert X\cap Y\right\vert \right)
+\left(  \left\vert Y\right\vert -\left\vert X\cap Y\right\vert \right)
=\left\vert X\right\vert +\left\vert Y\right\vert -2\cdot\left\vert X\cap
Y\right\vert $
$\equiv\left\vert X\right\vert +\left\vert Y\right\vert \operatorname{mod}2$.
This proves Proposition 1 (c). $\blacksquare$

Proposition 2. Let $U$ be a finite set. Let $V$ be a nonempty subset of
  $U$. Then,
$\sum\limits_{S\subseteq U}\left(  -1\right)  ^{\left\vert S\cap V\right\vert }=0$.

We notice that Proposition 2 generalizes the well-known fact that
$\sum\limits_{S\subseteq U}\left(  -1\right)  ^{\left\vert S\right\vert }=0$ for
every nonempty finite set $U$ (indeed, this fact is recovered from Proposition
2 by setting $V=U$); conversely it is easy to derive Proposition 2 from said
fact. But let us prove it in a self-contained way.
Proof of Proposition 2. The set $V$ is nonempty. Hence, there exists some
$v\in V$. Consider such a $v$.
Let $\Phi$ be the map $\left\{  S\subseteq U\ \mid\ v\notin S\right\}
\rightarrow\left\{  S\subseteq U\ \mid\ v\in S\right\}  ,\ S\mapsto
S\cup\left\{  v\right\}  $.
This map $\Phi$ is a bijection (indeed, its inverse is the map $\left\{
S\subseteq U\ \mid\ v\in S\right\}  \rightarrow\left\{  S\subseteq
U\ \mid\ v\notin S\right\}  ,\ S\mapsto S\setminus\left\{  v\right\}  $).
Hence, we can substitute $S\cup\left\{  v\right\}  $ for $S$ in the sum
$\sum\limits_{\substack{S\subseteq U;\\v\in S}}\left(  -1\right)  ^{\left\vert S\cap
V\right\vert }$. Thus we obtain
(1) $\sum\limits_{\substack{S\subseteq U;\\v\in S}}\left(  -1\right)
^{\left\vert S\cap V\right\vert }=\sum\limits_{\substack{S\subseteq U;\\v\notin
S}}\left(  -1\right)  ^{\left\vert \left(  S\cup\left\{  v\right\}  \right)
\cap V\right\vert }$.
Now, let $S\subseteq U$ be such that $v\notin S$. Then, $\left\{  v\right\}
\cap V=\left\{  v\right\}  $ (since $v\in V$) and $v\notin S\cap V$ (since
otherwise we would have $v\in S\cap V\subseteq S$, which would contradict
$v\notin S$). But $\left(  S\cup\left\{  v\right\}  \right)  \cap V=\left(
S\cap V\right)  \cup\underbrace{\left(  \left\{  v\right\}  \cap V\right)
}_{=\left\{  v\right\}  }=\left(  S\cap V\right)  \cup\left\{  v\right\}  $,
so that $\left\vert \left(  S\cup\left\{  v\right\}  \right)  \cap
V\right\vert =\left\vert \left(  S\cap V\right)  \cup\left\{  v\right\}
\right\vert =\left\vert S\cap V\right\vert +1$ (since $v\notin S\cap V$).
Hence, $\left(  -1\right)  ^{\left\vert \left(  S\cup\left\{  v\right\}
\right)  \cap V\right\vert }=\left(  -1\right)  ^{\left\vert S\cap
V\right\vert +1}=-\left(  -1\right)  ^{\left\vert S\cap V\right\vert }$.
Let us now forget that we fixed $S$. Thus we have shown that $\left(
-1\right)  ^{\left\vert \left(  S\cup\left\{  v\right\}  \right)  \cap
V\right\vert }=-\left(  -1\right)  ^{\left\vert S\cap V\right\vert }$ for
every $S\subseteq U$ satisfying $v\notin S$. Hence, (1) becomes
(2) $\sum\limits_{\substack{S\subseteq U;\\v\in S}}\left(  -1\right)
^{\left\vert S\cap V\right\vert }=\sum\limits_{\substack{S\subseteq U;\\v\notin
S}}\underbrace{\left(  -1\right)  ^{\left\vert \left(  S\cup\left\{
v\right\}  \right)  \cap V\right\vert }}_{=-\left(  -1\right)  ^{\left\vert
S\cap V\right\vert }}=-\sum\limits_{\substack{S\subseteq U;\\v\notin S}}\left(
-1\right)  ^{\left\vert S\cap V\right\vert }$.
Now,
$\sum\limits_{S\subseteq U}\left(  -1\right)  ^{\left\vert S\cap V\right\vert }
=\sum\limits_{\substack{S\subseteq U;\\v\in S}}\left(  -1\right)  ^{\left\vert S\cap
V\right\vert }+\sum\limits_{\substack{S\subseteq U;\\v\notin S}}\left(  -1\right)
^{\left\vert S\cap V\right\vert }=0$
(by (2)). This proves Proposition 2. $\blacksquare$
We can now prove your claim:

Proposition 3. Let $U$ be a finite set. Let $X$ and $Y$ be two subsets of
  $U$ such that $X\neq Y$. Then,
$\sum\limits_{S\subseteq U}\left(  -1\right)  ^{\left\vert X\cap S\right\vert
+\left\vert Y\cap S\right\vert }=0$.

Proof of Proposition 3. We have $X\bigtriangleup Y\neq\varnothing$ (by
Proposition 1 (d)). Let $V=X\bigtriangleup Y$. Then, $V=X\bigtriangleup
Y\neq\varnothing$. Hence, Proposition 2 yields
(3) $\sum\limits_{S\subseteq U}\left(  -1\right)  ^{\left\vert S\cap V\right\vert
}=0$.
Now, let $S\subseteq U$ be arbitrary. Then, Proposition 1 (b) yields
$\left(  X\cap S\right)  \bigtriangleup\left(  Y\cap S\right)
=\underbrace{\left(  X\bigtriangleup Y\right)  }_{=V}\cap S=V\cap S=S\cap V$. Hence,
$\left\vert \left(  X\cap S\right)  \bigtriangleup\left(  Y\cap S\right)
\right\vert =\left\vert S\cap V\right\vert $.
Thus, $\left\vert S\cap V\right\vert =\left\vert \left(  X\cap S\right)
\bigtriangleup\left(  Y\cap S\right)  \right\vert \equiv\left\vert X\cap
S\right\vert +\left\vert Y\cap S\right\vert \operatorname{mod}2$ (by
Proposition 1 (c), applied to $X\cap S$ and $Y\cap S$ instead of $X$ and
$Y$). Hence, $\left(  -1\right)  ^{\left\vert S\cap V\right\vert }=\left(
-1\right)  ^{\left\vert X\cap S\right\vert +\left\vert Y\cap S\right\vert }$.
Thus, (3) rewrites as $\sum\limits_{S\subseteq U}\left(  -1\right)  ^{\left\vert
X\cap S\right\vert +\left\vert Y\cap S\right\vert }=0$. Proposition 3 is proven.
$\blacksquare$
