Suppose I have a pdf $f(\vec{v})$ over $\vec{v}$ and define $\vec{u}=T(\vec{v})$, i.e. a transformation of $\vec{v}$. Would sampling $f(\vec{u})$ be the same as taking samples $\vec{v}_i$ from $f(\vec{v})$ and transforming them according to $T(\cdot)$? The answer intuitively feels like it should be yes, but it would be nice to have a more rigorous way to show this.
Would this still apply if $T(\cdot)$ is not bijective, i.e. if $\vec{v}$ has more elements than $\vec{u}$? As a concrete example, suppose $$ \vec{u}=T(\vec{v})=\begin{bmatrix} 2 & 0 & 1 & 4 \\ 0 & 3 & 0 & 2 \\ \end{bmatrix}\vec{v}. $$ Is there a sampling method for which this transformation of samples is a basis?