# How do I use logarithms?

*Logarithms (logs) in the Earth sciences*

## An introduction to logarithms

Many concepts in the Earth sciences incorporate changes over many orders of magnitude. We use logarithms in the Earth sciences to easily quantify and show very large ranges of data in a manageable form. Take the pH scale which measures the concentration of hydrogen ions in solution. Each whole number change in pH represents a 10-fold change in the concentration of hydrogen ions. Similarly, the energy released during earthquakes is measured by the moment magnitude scale - a logarithmic scale. On this scale, a whole number change in the magnitude of the earthquake represents a 32-fold change in the energy that is released by the earthquake.

But what does that mean? And what is a "manageable form"? Take a look at the bar graphs of solar system body volume:

In the top graph, the volume of the Sun dwarfs all the other planets so you can't even estimate their volume. On the bottom graph, we can see the power of logarithms: by adjusting the scale to logarithmic form (left scale) or by taking the log of the volumes (right scale) we can easily examine the relationship of volume between celestial bodies of very different sizes. And we can actually see them on the graph!

Thus, we use logarithms to be able to deal with variables of vastly different scales! Which brings us to a very important characteristic of logarithms - the relationship between logs and exponents. The examples of pH and planetary volume above all rely on logs in base 10. These multiples of 10 can be expressed as exponents, which can also be expressed as logs:

## Logarithms and exponents are related!

- `log_b(a)=c` is a logarithmic equation stated as "log base-
*b*of*a*equals*c*". - `a=b^c` is an exponential equation stated as "
*a*equals*b*to the power of*c*" - Logarithms are related to exponents in the following way. `log_(b)(a)=c leftrightarrow b^c=a`

where*a*is the log argument,*b*is the base, and*c*is the exponent in the logarithmic equation. - Specifically, `log_b(a)` asks, what exponent do I need on
*b*so that `b^c=a`

Here are some basic examples of the relationship between logs and exponents:

The two most frequently used logarithms are the log of base 10 and the log of *e (where e = 2.718)*_{.} The log of base 10, written as log_{10}, is called the common log and the subscript *10* is rarely written out. If you see a problem with log and no subscript, assume log_{10}. The log of base *e* is called the natural log and written as ln, ln=log_{e}.

## How do I use logarithms?

### Basic logarithm problems

There are many instances in the Earth sciences where logarithms are used (e.g., the pH scale in water quality assessments or the moment-magnitude scale describing ground motion). Most of these cases generally call for a 'plug and chug' approach where you enter the log argument (and base) in a calculator/spreadsheet and execute the expression. Here is an example of a problem involving the use of logarithms (you will need a calculator or Excel/Sheets).

Earthquake magnitudes

**On February 6, 2023, a magnitude 7.8 earthquake occurred along the strike-slip East Anatolian Fault in Turkey that caused immense destruction and loss of life. A series of aftershocks up to magnitude 7.6 occurred along other faults in the Turkey-Syria region over the next few days, as well. In areas near the epicenter, there was enough surface ground motion to cause up to 5 meters of offset, indicating the immense amount of energy released during the earthquakes.**

**Given the magnitude of the intial, largest earthquake (Mw=7.8), calculate the seismic moment (M _{o}) in joules given the following relationship:**

`M_w=2/3 * log(M_o) - 10.7`

**Step 1.** Identify the base of the logarithm

**Step 2.** Identify the known and unknown variables in the equation

**Step 3.** Rearrange and/or rewrite the equation to isolate the unknown variable as a log term

**Step 4.** Plug the known values into the equation and simplify

**Step 5.** Solve for the unknown variable

### Dealing with log bases other than 10 or *e*

*e*are by far the most common in the Earth Sciences, there are instances where logarithms with other bases are used such as particle size distributions (log base 2) and calculating the length of time to guarantee the probability of a certain event occurring like a major earthquake or a flood (log base is variable based on the probability of the event occurring). The steps to evaluating these logs are the same as described above, you just need to take into account the different base when evaluating using a calculator or Excel/Sheets.

Here is an example problem:

**Logarithms are used in sedimentology to show particle size distribution of sediment samples. A sediment sample has an average grain size of 0.05 mm. What is the equivalent phi (φ) value given the following relationship,** `φ=-log_(2)(d)`**, where d is the diameter of the sediment in millimeters?**

**Step 1.** Identify the base of the logarithm

**Step 2.** Identify the known and unknown variables in the equation

**Step 3.** Rearrange and/or rewrite the equation to isolate the unknown variable as a log term

**Step 4.** Plug the known values into the equation and simplify

**Step 5.** Solve for the unknown variable

### Logs with compound arguments - using the Rules of Logs

**Saturation indices (Ω) are used in water chemistry and soil science to understand whether a specific mineral will dissolve (Ω<0) or precipitate (Ω>0) in a given aquatic environment. It is the comparison of current to equilibrium conditions for a given mineral and is characterized by the equation:** `Ω=log(Q/K_(sp))` **where** **Q****is the ion activity product for and** **K _{sp}**

**is the solubility product for the mineral. Gypsum (CaSO**

_{4}∙2H_{2}O) is known to dissolve in Green Bay waters that have an average saturation index of -3.2.**Given that the** **K _{sp}**

**of gypsum is 10**

^{-4.6}, calculate the average ion activity product,

**Q****, of these waters in Green Bay, WI.**Note:

*Q*,

*K*, and Ω are all ratios, so have no units.

**The Rules of Logarithms**

For compound log arguments where *b* is the log base and *x* and *y* are variables.

**Product Rule:**If there is*multiplication*in the log argument, separate it as the*sum*of the logs:

`log_(b)(xy)=log_(b)(x)+log_(b)(y)`**Quotient Rule:**If there is*division*in the log argument, separate it as the*difference*of logs:

`log_(b)(x/y)=log_(b)(x)-log_(b)(y)`**Exponent Rule:**If there is an*exponent*in the argument of the log, the exponent can be*pulled outside*the log argument:

`log_(b)(x^y)=ylog_(b)(x)`

**Step 1.** Identify the base of the logarithm

**Step 2.** Identify the known and unknown variables in the equation

**Step 3.** Rearrange and/or rewrite the equation to isolate the unknown variable as a log term

**Step 4.** Plug the known values into the equation and simplify

**Step 5.** Solve for the unknown variable

## Where do you use logarithms in Earth science?

- Seismology - Determining earthquake moment magnitudes
- Hydrogeology - Analysis of aquifer test data
- Hydrology - Determining pH of solutions
- Sedimentology - Analysis of grain size distributions
- Geochronology - Determining age of earth materials using radioactive decay
- Structural Geology - Scaling of fractures
- Geochemistry - Determining equilibrium conditions

## Next steps

## More help (resources for students)

*Pages written by Kelly Deuerling (University of Nebraska Omaha) and Alex Manda (East Carolina University).*