Theorem (independence iff joint pdf factorises)
Let $\v X=(X_1, \ldots, X_n)$ be a random variable in $\R^n$, and $f_1, \ldots, f_n$ be density functions.
$X_1, \ldots X_n$ are independent and have marginal density functions $f_1, \ldots, f_n$ iff $X$ has density function $f_X$ given by $$ \begin{align*} f_{\v X}(x) = \prod_{i=1}^{n} f_i(x_i). \end{align*} $$