Foundational – DSP NOTES: MATH OVERVIEW (PART II)

In Part I of our DSP Math Overview, we covered complex numbers and the closed-form solution for geometric series. Now, we will turn our attention to logarithms, their properties, and metric prefixes.

I’d like to begin part two of the math review with a section on logarithms and their properties. We will also cover some of the history of logarithms and their applications in DSP. Multiplying real numbers manually, and especially on early computational systems, can often be complex and tedious. Logarithms were originally developed to simplify calculations long before the computer was built. To explore this further, here’s an in-depth video on logarithms by Welch Labs:

As we can see, logarithms were originally developed in the 17th century as a powerful computational tool, particularly for simplifying complex calculations in navigation. This video illustrated how their fundamental utility lies in transforming multiplication into addition, a property given by the logarithmic identity:

\log{(ab)} = \log{a} + \log{b}

for a, b > 0

Further mathematical exploration revealed that logarithms are the inverse of general exponential functions. More precisely, given the exponential relation:

f(x) = b^{x}

we define the logarithm base b, denoted by \log_{b}, as the function which retrieves the exponent:

\log_{b}f(x) = x

Therefore the logarithm answers the question: to what power must b be raised to yield f(x)?. Here are a few examples of logarithmic functions \log_{b}x:

Python Code for Logarithm Examples
#importing libraries

import numpy as np
import matplotlib
import matplotlib.pyplot as plt
matplotlib.style.use('ggplot')

# Generating plots

n = 3 # Number of plots
k = 5 # Scaling for b
N = [k*i for i in range(1, n+1)]
x = np.linspace(0, 15, 100)

for i in N:
  y = np.log(x)/np.log(i)
  plt.plot(x, y, '--')

plt.axhline(y=0,  color='gray') # designing the y axis
plt.axvline(x=0, color='gray') # designing the x axis

plt.title("Logarithm Functions: $y = log_b(x)$")
plt.xlabel("x")
plt.ylabel("y")
legend = plt.legend([f"$b = {s}$" for s in N])
legend.get_frame().set_facecolor('white')
plt.savefig("logarithms.jpg")


Observe in the graph that for any chosen base b, we have \log_{b}(1) = 0. This follows from the fundamental identity b^{0} = 1, which holds for all b \in \mathbb{R}. Furthermore, since b^{x} \neq 0 for any b \neq 0, it follows that \log_{b}(0) is undefined.

By convention, unless explicitly stated otherwise, the notation \log(x) refers to the common logarithm, meaning the base is implicitly b = 10. Similarly, the natural logarithm is denoted by \ln(x), where the base is Euler’s number e.

Several key properties of logarithms follow from their definition:

\log_{b}(x) = \frac{\log (x)}{\log (b)}

\log_{b}(xy) = \log(x) + \log(y)

\log_{b}(x^{n}) = n \log_{b}(x)

These properties are essential in simplifying logarithmic expressions and solving exponential equations. Combining the Power and Product rules together, we have another rule:

\log_{b}(\frac{x}{y}) = \log_{b}(xy^{-1}) = \log_{b}(x) + \log_{b}(y^{-1})

= \log_{b}(x) + (-1) \log_{b}(y)

= \log_{b}(x) - \log_{b}(y)

Now lets investigate scaling. Surely you heard of the statement: “King Henry Died by Drinking Chocolate Milk,” which is commonly used for interpreting orders of magnitude. This mnemonic device corresponds to the metric prefixes:

“King”“Henry”“Died”“by”“drinking”“chocolate”“milk”
Kilo –Hecto –Deca –basedeci –centi –milli –
khDdcm
10^{3}10^{2}10^{1}10^{0}10^{-1}10^{-2}10^{-3}

Physical measurements, which quantify various properties and are expressed in units, can be conveniently modified with prefixes to indicate orders of magnitude. For instance, rather than stating that a signal has a frequency of one thousand Hertz (Hz), one can simply say it operates at one kilohertz (kHz).

Building upon this principle, I have developed an extended mnemonic system. Allow me to introduce The Great Monkey King:

Copyright Considerations


This image was shared with me, and I do not claim copyright ownership. If you are the copyright owner and would like credit or removal, please contact me at 410-279-9935. This use is intended for educational and illustrative purposes under fair use considerations.


Clearly, this regal primate has a taste for pancakes… perhaps as much as he enjoys “borrowing” unattended luggage at the airports. Thus, The Great Monkey King corresponds to the following table:

“The”“Great”“Monkey”“King”
Tera – Giga –Mega –Kilo –
TGMK
10^{12}10^{9}10^{6}10^{3}

From left to right, they scale down by 3 orders of magnitude for each prefix. Altogether, so far we have…

The Great Monkey King Henry Dreamt by drinking cold milk.”

Notice the shift from “Died” to “Dreamt”, and from “chocolate” to “cold”. While some might speculate whether Henry met his end while sipping this not so chocolatey libation, the evidence clearly suggests he merely drifted into slumber in his cradle of bamboo and wicker…

It seems like he dozed off through the morning, so in the end, he made no pancakes…

“milk.”“Made”“no”“pancakes.”
milli – micro – nano – pico –
m\munp
10^{-3}10^{-6}10^{-9}10^{-12}

This is our final metric prefix table, summarizing the prefixes that, from left to right, decrease by three orders of magnitude. To help remember them, we have altogether:

The Great Monkey King Henry Dreamt by drinking cold milk. Made no pancakes.”

If this mnemonic doesn’t resonate with you, try coming up with your own! Mnemonics are a great way to reinforce what we learn, and different people find different devices more effective. If you have a creative one, feel free to share it in the comments!

2 thoughts on “Foundational – DSP NOTES: MATH OVERVIEW (PART II)

Leave a Reply

Your email address will not be published. Required fields are marked *