# Multinomial logistic algebraic explanation

I'm trying to understand the explanation of how multinomial logistic regression works from the point of view of a set of independent binary regressions.

The wikipedia page seems to provide a fairly good explanation. However, I'm stuck on an algebra step that I can't seem to get.

Namely, how do we go from 1-sum product of p(y = k) and e^coef to the next step?

https://en.wikipedia.org/wiki/Multinomial_logistic_regression

I realize it may be an easy solution that I'm just missing.

$\Pr(Y_i = K)$ can be taken out of the sum as
\begin{align}\Pr(Y_i =k)&= 1 - \Pr(Y_i =k)\, \sum_{k = 1}^{K-1}\,e^{\beta_k\cdot X_i}\\[2ex] 1&=\Pr(Y_i =k) + \Pr(Y_i =k)\, \sum_{k = 1}^{K-1}\,e^{\beta_k\cdot X_i}\\[2ex] 1 &=\Pr(Y_i =k)\,\left(1+\sum_{k = 1}^{K-1}\,e^{\beta_k\cdot X_i}\right)\\[2ex] &\implies \Pr(Y_i =k) =\frac{1}{1+\sum_{k = 1}^{K-1}\,e^{\beta_k\cdot X_i}} \end{align}