Math You Need > Rearranging Equations

# How do I isolate x (or P or T...) in a formula? Rearranging equations to solve for a given variable

## Equations as important geological tools

A professor speaking "Math", which can seem like another language! photo by Jennifer M. Wenner.
Sometimes, it may seem like your geoscience instructor is speaking another language when he/she talks about equations or formulae. Especially if he/she expects you to "manipulate" or rearrange them! But, equations can provide powerful tools for describing the natural world. In the geosciences, we can describe the behavior of many natural phenomena by writing an equation for a line (y = mx + b), or with exponential functions (y = ext). And with a little algebra, we can rearrange those equations to solve for ANY of the variables in them.

Although this may seem like magic, you don't have to be a "mathemagician" to do this. This page is designed to give you some tools to call upon to help you to learn some simple steps to help you to solve an equation for any of the variables (letters that represent the element or quantity of interest).

## Why should I manipulate equations?

Photo of Ken Andrews (scientist at JPL) juggling. Modified by Jen Wenner.

Believe it or not, there are many good reasons to develop your ability to rearrange equations that are important to the geosciences. It can save time, help you with units and save some brain space! Here are some reasons to develop your equation manipulation skills (in no particular order):

• Equations are easier to handle before inserting numbers! And, if you can isolate a variable on one side of the equation, it is applicable to every similar problem that asks you to solve for that variable!
• If you know how to manipulate equations, you only have to remember one equation that has all the variables of question in it - you can manipulate it to solve for any other variable! This means less memorization!
• Manipulating equations can help you keep track of (or figure out) units on a number. Because units are defined by the equations, if you manipulate, plug in numbers and cancel units, you'll end up with exactly the right units (for a given variable)!

## Where is this used in the geosciences?

To be honest, equation manipulation occurs in almost every aspect of the geosciences. Any time you see a P or T or ρ or x (or even =), there is an equation that you could manipulate. Because equations can be used to describe lots of important natural phenomena, being able to manipulate them gives you a powerful tool for understanding the world around you!

See the Practice Manipulating Equations page for just a few examples.

## A Review of Important Rules for Rearranging Equations

Solving for y by Jennifer M. Wenner.

You probably learned a number of rules for manipulating equations in a previous algebra course. It never hurts to remind ourselves of the rules. So let's review:

• RULE #1: you can add, subtract, multiply and divide by anything, as long as you do the same thing to both sides of the equals sign. In an equation, the equals sign acts like the fulcrum of a balance: if you add 5 of something to one side of the balance, you have to add the same amount to the other side to keep the balance steady. The same thing goes for an equation - doing the same operation to both sides keeps the meaning of the equation from changing.
Let's use the equation for a line to illustrate an example of how to use Rule #1. The general equation for a line is:

If we wish to solve for b in this equation, we must subtract mx from both sides.

If we perform the math on each side (that is, subtract mx from mx on the right), we end up with an equation that looks like this:

This equation can also be written b = y - mx, if you prefer to have the solved variable on the left.
• RULE #2: to move or cancel a quantity or variable on one side of the equation, perform the "opposite" operation with it on both sides of the equation. For example if you had g-1=w and wanted to isolate g, add 1 to both sides (g-1+1 = w+1). Simplify (because (-1+1)=0) and end up with g = w+1.
Let's use a more complicated equation that geologists can use to figure out the relationship of thickness to density of substances that are floating (e.g., the crust in the mantle, icebergs in water):

where Habove = the height of an object above the surface of the fluid it is floating in,
Htotal = the total height (or thickness) of the floating object
ρobject = the density of the object
and, ρfluid = the density of the fluid
Let's imagine that we're studying an iceberg and we want to know what the density of that iceberg is. How do we rearrange the equation to solve for this variable? It is going to take multiple steps to isolate the ρobject on one side of the equation. How do we begin?
1. Let's start by isolating the part of the equation inside the parentheses. To do this, we need to divide both sides by Htotal:

An entity divided by itself is equal to 1:

and, since 1 multiplied by something is equal to that something, we can simplify to get:

2. We're still not quite there. What else needs to get moved to isolate ρobject? Let's isolate the fraction that contains it so we want to subtract 1 from both sides:

and, 1 minus 1 equals 0 so we can get rid of the 1's on the left side.

3. We still need to do a few more operations to isolate ρobject. First, multiply both sides by ρfluid to clear the fraction:

We can cancel ρfluid on each side:

4. Then we need to get rid of the negative sign:
Multiply both sides by -1 to make -ρfluid positive:

A negative number (or symbol) multiplied by a negative number is a positive number. Because we are multiplying by -1, we merely change the sign on all numbers and symbols on both sides and end up with:

5. With a little rearranging of the right side of the equation, we end up with an equation to solve for the density of the iceberg!

## Some simple steps for manipulating equations

Here are some simple steps for manipulating equations. Under each step you will find an example of how to do this with an example that uses the geologic context of density (a measure of mass per unit volume).

1. Assess what you have (which of the variables do you have values for?, what units are present?, etc.). DO NOT plug in any numbers yet!
For example: You have a cube of pyrite that is 3 cm x 3 cm x 3 cm. You know that pyrite's density is 5.02 g/cm3. Can you figure out how much that cube of pyrite weighs (without using a balance)?

First, you need to know that density (ρ) is equal to mass (m) divided by volume (v). We can write this as a mathematical expression (or equation, if you prefer):

Which of these values do you have in the question above? You have density (5.02 g/cm3). And with the information you can figure out volume (length x width x height).
2. Determine which of the variables you want as your answer. (What is the question asking you to calculate? What is the unknown variable?)
The question above asks you to determine the mass of a pyrite cube (without weighing it/using the information given in the problem). So, in the equation for density, you want to determine "mass". Remember, don't plug anything in yet.
3. Rearrange the equation so that the unknown variable is by itself on one side of the equals sign (=) and all the other variables are on the other side. RULE #1: you can add, subtract, multiply and divide by anything, as long as you do the same thing to both sides of the equals sign.
Let's take the density equation:

and rearrange it. We want to isolate the variable for mass (m). To do this we first multiply both sides of the equation by volume (v).
Then, we can cancel volume on the right side of the equation (volume รท volume = 1).

Note that these first two steps are the same as cross-multiplying. If you are more familiar with this method, you can do that as well. Either way...
We end up with an equation that has mass isolated on one side of the equation!
4. NOW plug in the numbers! Replace known variables with their values and don't forget to keep track of units!
Our equation is . The nice thing about this equation is that now that we've rearranged it, all of our known variables are on one side and the one we don't know is on the other. Begin by plugging in what we know: ρ (the density of pyrite) and V (the volume (length x width x height) of the cube):

Simplify the volume term by multiplying:

Cancel same units on the top and bottom (where you can) so that we end up with the units we want (if you don't understand how to do this, see the Unit Conversions module):

5. Determine the value of the unknown variable by performing the mathematical functions. That is, add, subtract, multiply and divide according to the equation you wrote for step 2.
In this case, it is a simple multiplication:

And we end up with mass:

6. Ask yourself whether the answer is reasonable in the context of what you know about the geosciences and how much things should weigh.

This is a thing that mostly takes experience. If you are unsure, you could find a balance and weigh the cube to see if you're in the right ballpark. If you're holding it in your hand, you could guess whether this seems about right...More importantly, if you get a number like 135,000 g, do you think that's reasonable? That's 135 kg (which is about 300 lbs!) and it is probably not right. What about if you get something like 0.00135 grams? It is important to be able to distinguish whether you're in the right range, more than whether you're exactly right.

Another way to think about whether you're right is to find something that weighs the same from your own experience. What does 135 g feel like? Well, there are about 450 g in a pound, so 135 g is between 1/4 lb and 1/3 lb. What do you know that has a similar weight? (The first think that comes to mind for me is burgers...). Does it make sense that a cube of pyrite (a golden metallic mineral) that is about one inch on each side would weigh that much? Use your own experience to develop a way to evaluate weights and other measures.

## More help with equations

Geomaths at University College London has a MathHelp page about equations and functions .

The chemistry department at Texas A&M has a math review page about Algebraic Manipulation.

The Economics and Business faculty at University of Sidney has a page where you can practice your equation manipulation skills! Take the algebraic manipulation quizzes!
This page was written and compiled by Dr. Jennifer M. Wenner, Geology Department, University of Wisconsin Oshkosh
and Dr. Eric M. Baer, Geology Program, Highline Community College,