# Why $1/(1+e^{-x}) = e^x/(1+e^x)$

I am currently learning the sigmoid/logistic function and have completely forgotten how the maths behind this equivalence works:

$$\dfrac{1}{1+ e^{-x}} = \dfrac{e^{x}}{1+e^{x}}$$

By this I mean how the left side equates with the right side. I know that the left side is simply multiplied by (1/exp(x)) but what are the rules governing this? Any help would be much appreciated, especially the rules so that I can revisit them.

• $\dfrac a b =\dfrac ab \times \dfrac cc = \dfrac{ac}{bc}$ for $b,c \not=0$ Jul 6, 2021 at 11:04

It is easy.

$$\dfrac{1}{1+ e^{-x}} = \dfrac{e^{x}}{1+e^{x}}$$

Consider lhs

$$\dfrac{1}{1+ \frac{1}{e^{x}}}$$

which is equal to

$$\dfrac{e^{x}}{e^{x}+ 1}$$

• Multiply by $e^x/e^x$ To get to the final line.
– Dave
Jul 6, 2021 at 4:07

\begin{align} \dfrac{1}{1+ e^{-x}} &=\dfrac{1}{1+ e^{-x}} \\ &= \dfrac{1}{1+ e^{-x}} \cdot \frac{e^x}{ e^x} \\ &= \dfrac{e^{x}}{e^x+1} \end{align}

• Multiplying a number by 1 doesn't change its value, and $$\frac{e^x}{ e^x}$$ is just one way to write 1.

• Multiplication adds exponents of a common base: $$a^b \cdot a^c = a^{b+c}$$. We use this in the final line to get $$e^x \cdot e^{-x}=e^0 = 1$$.