I'm trying to derive the ELBO as per CS229 Page 144, Eq 11.8.
For E-step, the LHS and RHS must be equal: $$ \begin{align} f\left(\mathbb{E}_{z\sim Q}\left[ \frac{p(x, z; \theta)}{Q(z)}\right]\right) \geq \mathbb{E}_{z\sim Q}\left[f\left( \frac{p(x, z; \theta)}{Q(z)}\right)\right] \end{align} $$
The value must be a constant random variable for equality to hold: $$ \begin{align} \frac{p(x, z; \theta)}{Q(z)} = c \end{align} $$
This can be accomplished by choosing $Q(z) \propto p(x, z; \theta)$. Also, $\sum_z Q(z) = 1$.
Part that is not clear: $$ \begin{align} Q(z) = \frac{p(x, z; \theta)}{\sum_z p(x, z; \theta)} \end{align} $$ I'm aware of the simplification that follows this equation. But how did they arrive at this? Which property am I missing?