How do I use logarithms?
Logarithms (logs) in the Earth sciences
This module is undergoing classroom implementation with the Math Your Earth Science Majors Need project. The module is available for public use, but it will likely be revised after classroom testing.
The pH scale showing the inverse relationship between hydrogen ion concentration and pH value.
Provenance: Original Creator: North Carolina School of Science and Mathematics Modified from original version to include [H+] instead of [H3O+] Original File: https://www.flickr.com/photos/ncssm/9424562130/in/photostream/
Reuse: https://creativecommons.org/licenses/by-nc-sa/2.0/
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:
Solar system body volume data from NASA
Provenance: Kelly Deuerling, University of Nebraska at Omaha
Reuse: This item is offered under a Creative Commons Attribution-NonCommercial-ShareAlike license http://creativecommons.org/licenses/by-nc-sa/3.0/ You may reuse this item for non-commercial purposes as long as you provide attribution and offer any derivative works under a similar license.
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!
Provenance: Kelly Deuerling, University of Nebraska at Omaha
Reuse: This item is in the public domain and maybe reused freely without restriction.
Logarithms can be transformed into exponential expressions, and are commonly described as 'undoing' each other.
- `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:
Provenance: Kelly Deuerling, University of Nebraska at Omaha
Reuse: This item is in the public domain and maybe reused freely without restriction.
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 log10, is called the common log and the subscript 10 is rarely written out. If you see a problem with log and no subscript, assume log10. The log of base e is called the natural log and written as ln, ln=loge.
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
Example earthquake magnitudes and energy release equivalents
Provenance: EarthScope Consortium adapted from original by Gavin Hayes.
Reuse: This item is offered under a Creative Commons Attribution-NonCommercial-ShareAlike license http://creativecommons.org/licenses/by-nc-sa/3.0/ You may reuse this item for non-commercial purposes as long as you provide attribution and offer any derivative works under a similar license.
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 (Mo) in joules given the following relationship:
`M_w=2/3 * log(M_o) - 10.7`
Step 1. Identify the base of the logarithm
The base of the logarithm in this equation is 10. Because there is no explicit base, it is implied that the base is 10.
Step 2. Identify the known and unknown variables in the equation
There are two variables in this problem: `M_w` and `M_o`. `M_w` is known (=7.8) and `M_o` is unknown.
Step 3. Rearrange and/or rewrite the equation to isolate the unknown variable as a log term
Start with: `2/3 * log(M_o)-10.7=M_w`
Add 9.1 to both sides: `2/3 * log(M_o)=M_w + 10.7` - notice the -10.7 and +10.7 cancel out on the left side of the equation
Multiply both sides by `3/2`: `log(M_o)=3/2 (M_w+10.7)` - notice the 2/3 and 3/2 cancel out on the left side of the equation
Step 4. Plug the known values into the equation and simplify
The equation to use is:
`log(M_o)=3/2 (M_w+10.7)`
Plugging in the known `M_w` value:
`log(M_o)=3/2 (7.8+10.7)=3/2 (18.5)=27.75`
Step 5. Solve for the unknown variable
Start with `log(M_o)=27.75`
Convert to exponent form using the relationship `log_b(a)=c leftrightarrow b^c=a`:
`log(M_o)=27.75 leftrightarrow M_o=10^(27.75)`
Now, solve for `M_o`
` M_o=10^(27.75)=5.6xx10^27` joules
You can compute this on a scientific calculator using the 10
x button. Be careful of parentheses!
Press the 10x button then enter the following on your calculator: 10(27.75)
The answer is `M_o=5.6xx10^27` joules
Click on any box (called a cell) in the spreadsheet.
Type the following expression in the cell to solve the equation:
`=10^27.75` Press Enter to reveal your answer in the cell.
The answer is `M_o=5.6xx10^27` joules
Dealing with log bases other than 10 or e
Sediment sieve
Provenance: https://oceanexplorer.noaa.gov/explorations/12lophelia/background/animals/media/sieve.html
Reuse: This item is in the public domain and maybe reused freely without restriction.
While the log bases 10 and
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
`φ=-log_(2)(d)` uses log base 2.
Step 2. Identify the known and unknown variables in the equation
We know the grain size (d), but φ is unknown.
Step 3. Rearrange and/or rewrite the equation to isolate the unknown variable as a log term
φ is already isolated. It does not need to be transformed into a log term because φ is what you are evaluating.
Step 4. Plug the known values into the equation and simplify
In this case,
d=0.05 mm
` φ=-log_(2)(d)=-log_(2)(0.05)`
Step 5. Solve for the unknown variable
You cannot solve for a log base 2 equation directly on most scientific calculators. Instead, you must convert this expression to a common log base using the association: `log_(b)(a)=((log_(10)(a))/(log_(10)(b)))`.
`φ=-log_(2)(0.05)=-((log_(10)(0.05))/(log_(10)(2)))`
You can compute this on a scientific calculator using the "log" buttons. Make sure to use parentheses!
The input on a calculator should be: "-(log(0.05)/log(2))"
The answer is φ = 4.32
You can directly solve for log base 2 in Excel/Sheets using the function =LOG(base, number) where base is the log base and number is the log argument.
Your input to solve `φ=-log_(2)(0.05)` would be:
=-LOG(0.05, 2) where 0.05 is the log argument and 2 is the log base
The answer is φ = 4.32
Logs with compound arguments - using the Rules of Logs
Satellite image Green Bay, Wisconsin
Provenance: https://commons.wikimedia.org/wiki/File:Green_Bay_satellite_map.jpg
Reuse: This item is offered under a Creative Commons Attribution-NonCommercial-ShareAlike license http://creativecommons.org/licenses/by-nc-sa/3.0/ You may reuse this item for non-commercial purposes as long as you provide attribution and offer any derivative works under a similar license.
At times, you will be faced with a log equation where there are two variables in the argument that are either multiplied
`log(xy)`, divided
`log(x/y)`, or with an exponent
`log(x^y)`. You need additional 'rules' to simplify these equations and isolate variables of interest.
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 Ksp is the solubility product for the mineral. Gypsum (CaSO4∙2H2O) is known to dissolve in Green Bay waters that have an average saturation index of -3.2.
Given that the Ksp 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
In the equation `Ω=log(Q/K_(sp))`, the base of the logarithm is 10. Because there is no explicit base, it is implied that the base is 10.
Step 2. Identify the known and unknown variables in the equation
Known variables include:
- Ksp, the solubility product of gypsum (10-4.6)
- Ω, the saturation index of gypsum in Green Bay (-3.2)
The unknown variable is the ion activity product, Q
Step 3. Rearrange and/or rewrite the equation to isolate the unknown variable as a log term
Start with the saturation index equation:
`log(Q/K_(sp))=Ω`
Use the log quotient rule to separate the variables in the log argument:
`log(Q)-log(K_(sp))=Ω`
Isolate the expression containing the unknown variable (Q):
`log(Q)=Ω+log(K_(sp))`
Step 4. Plug the known values into the equation and simplify
Now plug in the known values from step 1.
`log(Q)=Ω+log(K_(sp))=-3.2+log(10^(-4.6))`
Simplify the log term using the identity `log(10^x)=x`
`log(Q)=Ω+log(K_(sp))=-3.2+ -4.6=-7.8`
Step 5. Solve for the unknown variable
Starting with `log(Q)=-7.8`
Convert to log form using the relationships `log_b(a)=c and b^c=a`:
If `log(Q)=-7.8`, then `Q=10^(-7.8)`
Solving for Q gives:
`Q=10^(-7.8)=`1.6x10-8
Using the 10
x (or x
y) function buttons, your input should be: 10
(-7.8)
The answer is 1.6x10-8 ≈ 10-7.8
Click on any cell in the spreadsheet.
Type the following expression in the cell to solve the equation:
"=10^(-7.8)"
Press Enter to reveal your answer in the cell.
The answer is 1.6E-08, which is the engineering notation for 1.6x10-8 ≈ 10-7.8
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
I am ready to PRACTICE!
If you think you have a handle on the steps above, click on this bar to try practice problems with worked answers.
Or, if you want even more practice, see 'More help' below.More help (resources for students)
Pages written by Kelly Deuerling (University of Nebraska Omaha) and Alex Manda (East Carolina University).