# How is momentum conservation valid in the vertical direction in this scenario?

In the given situation, a small block of mass $m$ is projected horizontally with a speed $u$ on a large curved wedge of mass $M$. According to one of my books, the block will gain both horizontal velocity $V_x$ and vertical velocity $V_y$ as shown in the picture.

My questions are:

• How does the block possibly attain a vertical velocity upward, though initially the momentum is $0$ in vertical direction ? How is momentum conserved in vertical direction even though the larger wedge cannot move vertically downward ?
• Does it depend upon whether wedge is free to move or not ? (In this situation the wedge is said to be free to move).

Assume all surfaces to be friction-less.