Mathovia

Algebra / Solving Equations and Inequalities

Equations with More Than One Variable

Most formulas you'll use in science and later math courses — perimeter, simple interest, temperature conversion, slope-intercept form — arrive solved for one particular variable, but a problem often needs them solved for a different one. This lesson extends the isolate-the-variable method from Linear Equations to equations with more than one letter, where every variable except the one you're solving for is simply treated as a constant.

M
Written by
Mathovia Team
Editorial Team

Every formula you’ve used so far — perimeter, simple interest, distance equals rate times time — happens to already be solved for one particular letter. But a problem doesn’t always hand you the formula in the form you need: sometimes you know the perimeter and one side of a rectangle and need the other, or you know a Fahrenheit temperature and need the Celsius formula rearranged. This lesson is about doing that rearrangement, called solving a literal equation.

Nothing about the algebra changes. Every move is the same distribute, combine, isolate process from Linear Equations — the only difference is that the “constants” surrounding your target variable are letters instead of numbers, so the final answer is an expression instead of a single value.

What Is a Literal Equation?

A literal equation (or formula) is any equation containing two or more variables. To solve a literal equation for a specified variable means isolating that one letter on one side of the equation, with an expression made of the remaining letters (and numbers) on the other side.

$$ I = Prt \quad (\text{solved for } I) \qquad t = \frac{I}{Pr} \quad (\text{the same formula, solved for } t) $$

Both equations say exactly the same thing about how \(I\), \(P\), \(r\), and \(t\) relate to each other — only which letter sits alone has changed.

The Same Method, One New Rule

Treat every letter other than the one you are solving for exactly like a number: it can be added to both sides, subtracted, multiplied, or divided, using the identical four-step method from Linear Equations. The one habit worth building deliberately is identifying the target variable before starting, so every move is clearly aimed at isolating that one letter and nothing else.

Solving for a Variable That Appears Once

When the target variable shows up in exactly one term, the four-step method finishes the job directly: simplify, move other terms away from it, then divide by whatever is still multiplying it.

$$ A = \frac{1}{2}bh \;\Longrightarrow\; 2A = bh \;\Longrightarrow\; h = \frac{2A}{b} $$

Solving for a Variable That Appears More Than Once

When the target variable shows up in two or more terms, gather every one of those terms on the same side first, then factor the variable out of them, turning the sum into a single product. Dividing by whatever remains inside the parentheses finishes the isolation.

$$ ax + b = cx + d \;\Longrightarrow\; ax - cx = d - b \;\Longrightarrow\; x(a-c) = d-b \;\Longrightarrow\; x = \frac{d-b}{a-c} $$

Factoring the variable out is genuinely the one new technique in this lesson — every other step so far has come straight from Linear Equations.

Common Formulas Solved for a Different Variable

FormulaSolved forRearranged
\(I = Prt\) (simple interest)\(r\)\(r = \dfrac{I}{Pt}\)
\(P = 2\ell + 2w\) (perimeter)\(w\)\(w = \dfrac{P - 2\ell}{2}\)
\(A = \dfrac{1}{2}bh\) (triangle area)\(b\)\(b = \dfrac{2A}{h}\)
\(C = \dfrac{5}{9}(F - 32)\) (temperature)\(F\)\(F = \dfrac{9}{5}C + 32\)
\(y = mx + b\) (slope-intercept)\(m\)\(m = \dfrac{y-b}{x}\)
\(Ax + By = C\) (standard form)\(y\)\(y = \dfrac{C - Ax}{B}\)

Worked Example A: Solving the Simple Interest Formula for r

Solve \(I = Prt\) for \(r\).

Step 1 — the target variable \(r\) already appears in exactly one term, multiplied by \(P\) and \(t\):

$$ I = Prt $$

Step 2 — divide both sides by everything currently multiplying \(r\), which is \(Pt\):

$$ \frac{I}{Pt} = \frac{Prt}{Pt} \;\Longrightarrow\; \frac{I}{Pt} = r $$

Answer: \(r = \dfrac{I}{Pt}\)

Worked Example B: A Variable That Appears More Than Once

Solve \(3x + ab = cx - 5\) for \(x\).

Step 1 — move every \(x\)-term to one side and everything else to the other:

$$ 3x - cx = -5 - ab $$

Step 2 — factor \(x\) out of the left side:

$$ x(3-c) = -5-ab $$

Step 3 — divide both sides by whatever remains multiplying \(x\):

$$ x = \frac{-5-ab}{3-c} $$

Answer: \(x = \dfrac{-5-ab}{3-c}\). Every \(x\) had to be gathered onto one side before factoring — factoring only works once the variable is a common factor of every remaining term.

Worked Example C: A Formula with a Fraction

Solve \(C = \dfrac{5}{9}(F-32)\) for \(F\).

Step 1 — clear the fraction by multiplying both sides by \(\dfrac{9}{5}\):

$$ \frac{9}{5}C = F - 32 $$

Step 2 — add \(32\) to both sides:

$$ \frac{9}{5}C + 32 = F $$

Answer: \(F = \dfrac{9}{5}C + 32\). This is the familiar Celsius-to-Fahrenheit conversion formula, produced by solving the Fahrenheit-to-Celsius formula for the other letter.

Worked Example D: Solving Standard Form for y

Solve \(Ax + By = C\) for \(y\).

Step 1 — move the \(x\)-term to the right side:

$$ By = C - Ax $$

Step 2 — divide both sides by \(B\):

$$ y = \frac{C-Ax}{B} $$

Answer: \(y = \dfrac{C-Ax}{B}\), which can also be split into \(y = -\dfrac{A}{B}x + \dfrac{C}{B}\) — the slope-intercept form of the same line, with slope \(-\dfrac{A}{B}\).

Common Mistakes to Avoid

  • Treating other letters as if they could be combined with the target variable. \(3x + ab\) cannot be simplified to \(3xab\) or any single term — \(x\) and \(ab\) are not like terms just because they’re both made of letters.
  • Forgetting to factor before dividing when the variable appears twice. \(x(3-c) = -5-ab\) must be factored first; dividing \(3x - cx\) by \((3-c)\) without factoring is not a legal algebra step.
  • Dividing only one term by the divisor. In \(y = \dfrac{C-Ax}{B}\), both \(C\) and \(Ax\) are divided by \(B\) — writing \(y = \dfrac{C}{B} - Ax\) drops the division on the second term.
  • Losing track of which letter is the target. Before moving anything, identify the one letter being solved for; every other letter, no matter how it looks, is treated as a constant for the rest of the problem.
  • Assuming the divisor can’t be zero without checking the context. Dividing by an expression like \((3-c)\) requires \(3-c \neq 0\); most formula contexts guarantee this, but it’s worth a mental check when the expression could plausibly be zero.
  • Multiplying by the reciprocal incorrectly when clearing a fraction. Multiplying both sides by \(\dfrac{9}{5}\) is the same as dividing by \(\dfrac{5}{9}\) — reversing which fraction gets used flips the formula.

Where This Shows Up Later

  • Rational Expressions and rational equations. Clearing a fraction and factoring a shared variable are exactly the two skills that carry over most directly.
  • Systems of equations. Solving one equation for one variable in terms of the other, exactly as in Worked Example D, is the first step of the substitution method.
  • Functions and graphing. Rewriting a line’s equation from standard form to slope-intercept form (Worked Example D) is what makes its slope and \(y\)-intercept easy to read off directly.
  • Science and finance formulas. Every formula in physics, chemistry, and finance eventually needs to be solved for a variable other than the one it’s written for — exactly this lesson’s skill, applied to a new formula each time.

Practice Problems

Work each problem yourself before opening the answer.

Problem 1. Solve \(P = 2\ell + 2w\) for \(\ell\).

Show answer

Step 1 — subtract \(2w\) from both sides:

$$ P - 2w = 2\ell $$

Step 2 — divide both sides by \(2\):

$$ \ell = \frac{P-2w}{2} $$

Answer: \(\ell = \dfrac{P-2w}{2}\)

Problem 2. Solve \(V = \pi r^{2}h\) for \(h\).

Show answer

Step 1 — the target variable \(h\) is multiplied by \(\pi r^{2}\); divide both sides by it:

$$ \frac{V}{\pi r^{2}} = h $$

Answer: \(h = \dfrac{V}{\pi r^{2}}\)

Problem 3. Solve \(y = mx + b\) for \(x\).

Show answer

Step 1 — subtract \(b\) from both sides:

$$ y - b = mx $$

Step 2 — divide both sides by \(m\):

$$ x = \frac{y-b}{m} $$

Answer: \(x = \dfrac{y-b}{m}\)

Problem 4. Solve \(2x + 3y = 12\) for \(y\).

Show answer

Step 1 — subtract \(2x\) from both sides:

$$ 3y = 12 - 2x $$

Step 2 — divide both sides by \(3\):

$$ y = \frac{12-2x}{3} $$

Answer: \(y = \dfrac{12-2x}{3}\)

Problem 5. Solve \(ax - by = c\) for \(x\).

Show answer

Step 1 — add \(by\) to both sides:

$$ ax = c + by $$

Step 2 — divide both sides by \(a\):

$$ x = \frac{c+by}{a} $$

Answer: \(x = \dfrac{c+by}{a}\)

Problem 6. Solve \(S = a + (n-1)d\) for \(d\).

Show answer

Step 1 — subtract \(a\) from both sides:

$$ S - a = (n-1)d $$

Step 2 — divide both sides by \((n-1)\):

$$ d = \frac{S-a}{n-1} $$

Answer: \(d = \dfrac{S-a}{n-1}\)

Problem 7. Solve \(A = P(1+rt)\) for \(r\).

Show answer

Step 1 — distribute the right side:

$$ A = P + Prt $$

Step 2 — subtract \(P\) from both sides:

$$ A - P = Prt $$

Step 3 — divide both sides by \(Pt\):

$$ r = \frac{A-P}{Pt} $$

Answer: \(r = \dfrac{A-P}{Pt}\)

Problem 8. Solve \(5x - 2b = 3x + 7b\) for \(x\).

Show answer

Step 1 — move the \(x\)-terms to the left and the \(b\)-terms to the right:

$$ 5x - 3x = 7b + 2b $$

Step 2 — combine like terms:

$$ 2x = 9b $$

Step 3 — divide both sides by \(2\):

$$ x = \frac{9b}{2} $$

Answer: \(x = \dfrac{9b}{2}\)

Problem 9. Solve \(\dfrac{x}{a} + \dfrac{x}{b} = 1\) for \(x\).

Show answer

Step 1 — the LCD of \(a\) and \(b\) is \(ab\). Multiply every term by \(ab\):

$$ ab \cdot \frac{x}{a} + ab \cdot \frac{x}{b} = ab \cdot 1 \;\Longrightarrow\; bx + ax = ab $$

Step 2 — factor \(x\) out of the left side:

$$ x(a+b) = ab $$

Step 3 — divide both sides by \((a+b)\):

$$ x = \frac{ab}{a+b} $$

Answer: \(x = \dfrac{ab}{a+b}\)

Problem 10. Solve \(F = \dfrac{9}{5}C + 32\) for \(C\).

Show answer

Step 1 — subtract \(32\) from both sides:

$$ F - 32 = \frac{9}{5}C $$

Step 2 — multiply both sides by \(\dfrac{5}{9}\):

$$ \frac{5}{9}(F-32) = C $$

Answer: \(C = \dfrac{5}{9}(F-32)\), the same formula the lesson started with, recovered by reversing Worked Example C.

Quick Reference

SituationWhat to do
Target variable appears onceIsolate it directly: move other terms away, then divide by its coefficient
Target variable appears more than onceGather all its terms on one side, factor it out, then divide by what remains
Equation has a fractionClear it first by multiplying every term by the LCD, or by the reciprocal of a single fraction
Every other letterTreat exactly like a number — add, subtract, multiply, or divide it same as any constant
Final answerAn expression in the remaining letters, not a single number

Every formula in this lesson leaned on the Linear Equations toolkit — distributing, clearing fractions, and isolating a variable — and the same techniques carry directly into Rational Expressions once the letters start appearing in denominators. Revisit Applications of Linear Equations to see several of these formulas used the other way, solving for a number instead of a letter, or browse the rest of the Algebra lessons as new ones publish.

Frequently Asked Questions

What is a literal equation?+

A literal equation is an equation containing two or more variables (letters), typically a formula like \(I = Prt\) or \(A = \dfrac{1}{2}bh\). Solving one means isolating a single specified variable, with every other letter left in the answer instead of being replaced by a number.

How do I solve for a variable when I don't know the values of the other letters?+

Treat every letter other than the one you are solving for exactly as you would treat a plain number — you can add it to both sides, divide by it, or factor it out, using the same steps from Linear Equations. The only difference is the constants are letters instead of digits.

What do I do when the variable I'm solving for appears in more than one term?+

Move every term containing that variable to one side of the equation, factor the variable out of those terms, and then divide both sides by whatever is left multiplying it. This is the one genuinely new technique in this lesson; see Worked Example B.

Why does dividing by a variable sometimes need a warning?+

Dividing both sides of an equation by an expression assumes that expression isn't zero, since division by zero is undefined. Formulas are usually written with the understanding that the divisor represents a nonzero, physically meaningful quantity, like a positive radius or a nonzero time, so this is worth noting but rarely changes the algebra.

Is solving y = mx + b for x the same idea as solving for y in Ax + By = C?+

Yes — both are literal-equation problems where you isolate one letter and leave the rest as coefficients. Worked Example D solves \(Ax+By=C\) for \(y\), which is exactly how slope-intercept form \(y=mx+b\) is derived from standard form.

Do I still combine like terms and clear fractions the same way?+

Yes, every technique from Linear Equations still applies exactly as before — distributing, combining like terms, and multiplying by the LCD to clear a fraction. The only new wrinkle is that like terms can now include matching variable letters, not just plain numbers.

Related lessons