\begin{aligned} \sigma^{\prime}(x) &=\frac{\partial}{\partial x} \frac{1}{1+e^{-x}} \\ &=\frac{e^{-x}}{\left(1+e^{-x}\right)^{2}} \\ &=\frac{1}{1+e^{-x}} \cdot \frac{e^{-x}}{1+e^{-x}} \\ &=\sigma(x)(1-\sigma(x)) \end{aligned}
I do not understand what is the last step in this derivative. How can you factor out the last term?
\begin{aligned} \sigma(x)(1-\sigma(x)) \end{aligned}