# Derivative of Sigmoid
Let's denote the sigmoid function as $\sigma(x)=\frac{1}{1+e^{-x}}$.
Then:
$
\begin{aligned}
\frac{d}{d x} \sigma(x) & =\frac{d}{d x}\left[\frac{1}{1+e^{-x}}\right] \\
& =\frac{d}{d x}\left(1+\mathrm{e}^{-x}\right)^{-1} \\
& =-\left(1+e^{-x}\right)^{-2}\left(-e^{-x}\right) \\
& =\frac{e^{-x}}{\left(1+e^{-x}\right)^2} \\
& =\frac{1}{1+e^{-x}} \cdot \frac{e^{-x}}{1+e^{-x}} \\
& =\frac{1}{1+e^{-x}} \cdot \frac{\left(1+e^{-x}\right)-1}{1+e^{-x}} \\
& =\frac{1}{1+e^{-x}} \cdot\left(\frac{1+e^{-x}}{1+e^{-x}}-\frac{1}{1+e^{-x}}\right) \\
& =\frac{1}{1+e^{-x}} \cdot\left(1-\frac{1}{1+e^{-x}}\right) \\
& =\sigma(x) \cdot(1-\sigma(x))
\end{aligned}
$
---
## References