Let $X$ be a random variable taking values in $\mathbb R^n$ with a probability distribution $\mathbb P$ that has a density $p$.

Consider further a linear mapping $\pi: \mathbb R^n \to \mathbb R^m$, i.e. $\pi$ is an $m \times n$ matrix. We assume $m<n$, i.e. the linear transformation is in general non-invertible!

Now the distribution of the new random variable given by $Y = \pi X$ is given by

$$ \mathbb P_Y (B \subset \mathbb R^m) := \mathbb P(\pi^{-1}(B)) = \int_{\pi^{-1}(B)} p \; dx$$

where $\pi^{-1}(B)$ denotes the pre-image of $B$ under $\pi$. 


Question: How does the $\textit{density}$ of the random variable $Y$ look like?
Is it simply:

$$ p_Y(y) = \int_{\pi^{-1}(\{y\})} p \; dS$$

or do I need some scaling?

Initially I had the following:

$$ \int_{B} p_Y(y) \; dy = \int_{B} \int_{\pi^{-1}(\{y\})} p \; dS \, dy = \int_{\pi^{-1}(B)} p \; dx = \mathbb P_Y(B)$$,

but there seems some scaling missing. Could you please tell me where my mistake is? Thank you