I've got a bipartite graph where the left side corresponds to points $X = \{x_1,\ldots,x_n\}$ and the right side corresponds to subsets $\mathcal F = \{A_1,\ldots,A_m\}$ of $X$. There's an edge between the left and right side if a point is a member of a subset. $d(x)$ is the out-degree of a vertex on the left side of the graph, and indicates the number of members of $\mathcal F$ that contain $x$.
While it's easy to count the bipartite graph in two ways and show:
$$\sum_{A\in \mathcal F}^m\big| A \big| = \sum_{x\in X}d(x)$$
I'm trying to show that:
$$\sum_{i,j=1}^m\big| A_i\cap A_j \big| = \sum_{x\in X}d(x)^2$$
This seems intuitive, but where do I start to get a more rigorous proof?