Unit content
Decibels and logarithmic power ratios
The decibel, or dB, expresses a ratio on a logarithmic scale.
For two powers $P_2$ and $P_1$,
$$G_{\mathrm{dB}}=10\log_{10}\frac{P_2}{P_1}.$$
A factor of $10$ in power is $10,\mathrm{dB}$, a factor of $2$ is approximately $3,\mathrm{dB}$, and a factor of $1/2$ is approximately $-3,\mathrm{dB}$.
When a physical quantity has associated power proportional to the square of its amplitude, an amplitude ratio can be written
$$G_{\mathrm{dB}}=20\log_{10}\left|\frac{A_2}{A_1}\right|.$$
The factor $20$ is not a different definition: it comes from applying the power-ratio definition to a squared amplitude ratio.
Logarithms turn cascaded multiplicative gains and losses into sums. For example, a $12,\mathrm{dB}$ gain followed by a $5,\mathrm{dB}$ loss gives a net gain of $7,\mathrm{dB}$.