Mathematical Derivation of Residual Risk

I understand the difference between Excess, Residual and Active Returns.

I also understand what Active Risk; defined as: $\sigma_{r_P-r_B}$ (i.e. standard deviation of the difference in returns between our portfolio and benchmark).

Now, what exactly is Residual Risk? I often see it defined (e.g. here) as:

$\omega_p = \sqrt{\sigma^ 2_p-\beta^2_p\sigma^2_B}$

with $\beta_P = \frac{\text{Cov}(r_p, r_B)}{Var(r_B)}$

Where does this derivation come from? What is residual risk exactly?

Note that $\beta$ is the coefficient of the portfolio regressed on the benchmark. That is \begin{align*} r_P = \alpha+\beta r_B + \varepsilon, \end{align*} where $\varepsilon$ is the residual. The standard deviation of the residual is called the residual risk. Specifically, \begin{align*} std(\varepsilon) &= \sqrt{var(r_P-\beta r_B-\alpha)}\\ &=\sqrt{\sigma_P^2 + \beta^2 \sigma_B^2 - 2 \beta \rho(r_P, r_B) \sigma_P\sigma_B}\\ &=\sqrt{\sigma_P^2 + \beta^2 \sigma_B^2 - 2 \beta\, \beta\, var(r_B)}\\ &= \sqrt{\sigma_P^2 - \beta^2 \sigma_B^2}, \end{align*} since $cov(r_P, r_B) = \rho(r_P, r_B)\sigma_P \sigma_B =\beta\, var(r_B)$.