Consider two random variables $X$ and $Y$ such that $\mathbb{E}[X]=\mathbb{E}[Y]=0$. I want to show that $$(\mathbb{E}[XY])^2\leq \mathbb{E}[X^2]\mathbb{E}(Y^2).$$
I've considered the following so far:
\begin{equation} \begin{split} (\mathbb{E}[XY])^2 & = \Big(\sum_i\sum_jx_iy_jP(X=x_i, Y=y_j)\Big)^2 \\ & = ... + \sum_i\sum_jx_i^2y_j^2P(X=x_i, Y=y_j)^2 ... \\ \implies (\mathbb{E}[XY])^2 & \geq \sum_i\sum_jx_i^2y_j^2P(X=x_i, Y=y_j)^2. \end{split} \end{equation}
Also,
$$\mathbb{E}(X^2)\mathbb{E}(Y^2) = \sum_ix_i^2P(X=x_i)\sum_jy_j^2P(Y=y_j).$$
I can't see whether or not this has actually got me anywhere. Some help would be appreciated.
$Var(X) = \mathbb{E}(X-\mathbb{E}X)^2 = \mathbb{E} [X ^ 2]$, same for the $Y$, $Var(Y) = \mathbb{E} [Y ^ 2]$. Also recall that $$ f_X(x)=\int_{\mathbb{R}}f_{X,Y}(x,y)dy $$ and $$ \int_{\mathbb{R^2}}f_{X,Y}(x,y)dxdy = \int_{\mathbb{R}} dx\int_{\mathbb{R}}f_{X,Y}(x,y)dy = \int_{\mathbb{R}}f_X(x)dx \, . $$ So, by the Cauchy-Schwartz inequality \begin{align} (\mathbb{E}XY)^2 &= \left( \int_{\mathbb{R}^2}xyf(x,y)dxdy \right) ^ 2\\ &\le \int_{\mathbb{R}^2}x ^ 2 f(x,y)dxdy \int_{\mathbb{R}^2}y ^ 2 f(x,y)dxdy\\ &\le\int_{\mathbb{R}} x ^ 2f(x)dx \int_{\mathbb{R}} y ^ 2f(y)dx\\ &= \mathbb{E}[X^2]\mathbb{E}[Y^2]. \end{align}
Basically, you don't even need these integrals, the conclusion is just a straightforward application of the inequality.
Another approach. Define the inner product $\langle X, Y \rangle =\mathbb{E}XY $, hence by Cauchy-Schwartz inequality you have $$ (\mathbb{E}XY)^2 = |\langle X, Y \rangle | ^ 2 \le \langle X, X \rangle \langle Y, Y \rangle = \mathbb{E}( X ^ 2 ) \mathbb{E} (Y ^ 2) . $$