My book says the following
If you have two continuous random variables $X$ and $Y$ in a joint pdf $f(x,y)$ then
$f(y)$ = $\int_{-\infty}^\infty f(x,y)dx$
$f(x)$ = $\int_{-\infty}^\infty f(x,y)dy$
My question is, is this by definition or is there a proof or theorem that gives this result. I wish to know WHY this is true.