Question about your statement

From your saying "which are NOT necessarily the marginals,

AND the support is a rectangle, then the two rvs are independent."

, you mean it's not necessary to find the marginals?

Because I've seen this from books and lectures and didnt know the reason. They just found joint density and it seems they assume when this joint density can be factored as h(z1)g(z2), then it's independent.

What's the reasoning for that?

What should I look it up if I do not understand this?

Thanks.