This site is a work in progress. New lessons are added regularly. Contact us

Adding and Subtracting Rational Expressions

Learning goals

  • Add only over a shared denominator
  • Build the LCD from each factor at its highest power
  • Bracket the whole numerator being subtracted, then distribute
  • Keep restrictions from the original denominators, cancelled or not
  • Turn a complex fraction into a division

Why a common denominator is needed at all

A common denominator is not a ritual step. It is the only way to make the two counts comparable. Once the pieces are the same size, addition is just counting them together:

37+27=57.\frac{3}{7} + \frac{2}{7} = \frac{5}{7}.

Written out with the size of the piece made explicit, the reason is visible. Three sevenths is 3173 \cdot \frac{1}{7} and two sevenths is 2172 \cdot \frac{1}{7}, so the sum is (3+2)17(3 + 2) \cdot \frac{1}{7}. That step is the distributive property, run backwards, and it is the whole justification.

Fractions with the same denominator add by adding numerators#

Let AA, BB, and DD be polynomials, and fix any value of xx with D0D \neq 0, so that all the fractions below are defined. Since dividing by DD is the same as multiplying by the number 1D\frac{1}{D}, we can write AD=A1D\frac{A}{D} = A \cdot \frac{1}{D} and BD=B1D\frac{B}{D} = B \cdot \frac{1}{D}. Then

AD+BD=A1D+B1D=(A+B)1D=A+BD.\frac{A}{D} + \frac{B}{D} = A \cdot \frac{1}{D} + B \cdot \frac{1}{D} = (A + B) \cdot \frac{1}{D} = \frac{A + B}{D}.

The middle equality is the distributive property with the common factor 1D\frac{1}{D} pulled out of both terms. Notice what the argument never used: it never asked what AA, BB, or DD actually are. It needed only that D0D \neq 0, so that 1D\frac{1}{D} exists. That is exactly why the rule for numbers and the rule for polynomials are the same rule, and why nothing about this chapter’s algebra is new.

Replacing BB with B-B gives the subtraction version, ADBD=ABD\frac{A}{D} - \frac{B}{D} = \frac{A - B}{D}, with the same restriction D0D \neq 0.

So the rule needs one denominator. That makes the entire job of adding unlike fractions a single task: rewrite them so that they share a denominator. The tool for that is the other fact you already have, that multiplying the top and the bottom by the same nonzero quantity leaves a fraction’s value alone, because

CKDK=CDKK=CD1=CD,D0,  K0.\frac{C \cdot K}{D \cdot K} = \frac{C}{D} \cdot \frac{K}{K} = \frac{C}{D} \cdot 1 = \frac{C}{D}, \qquad D \neq 0,\; K \neq 0.

Adding when the denominators already match

When the denominators are identical, combine the numerators over that denominator and then simplify the result the way you learned in the first lesson of this chapter. Here that comes down to two moves: factor the numerator and the denominator, and cancel any factor they share.

AD+BD=A+BD,ADBD=ABD.\frac{A}{D} + \frac{B}{D} = \frac{A + B}{D}, \qquad \frac{A}{D} - \frac{B}{D} = \frac{A - B}{D}.

Worked example 1 Combine x2x+5+3x10x+5\frac{x^2}{x+5} + \frac{3x-10}{x+5}

The denominators already match, so put the two numerators over the single denominator:

x2x+5+3x10x+5=x2+3x10x+5.\frac{x^2}{x+5} + \frac{3x-10}{x+5} = \frac{x^2 + 3x - 10}{x+5}.

Now factor the numerator and look for a factor shared with the denominator. Two numbers multiplying to 10-10 and adding to 33 are 55 and 2-2, so x2+3x10=(x+5)(x2)x^2 + 3x - 10 = (x+5)(x-2):

(x+5)(x2)x+5=x2.\frac{(x+5)(x-2)}{x+5} = x - 2.

The answer is x2x - 2, valid for x5x \neq -5. The polynomial x2x - 2 is perfectly happy at x=5x = -5, but the expression you started with is not, since x+5x + 5 sits in its denominator. Cancelling a factor never widens the domain, so the restriction travels with the answer.

The minus sign owns the whole numerator

Almost every real error in this lesson is a sign error, and it comes from one place. In ADBD=ABD\frac{A}{D} - \frac{B}{D} = \frac{A - B}{D}, the minus sign applies to all of BB, not just to its first term. When BB is a single term like 33, you can hardly go wrong. The moment BB is a polynomial like 3x+43x + 4, the minus has to reach both terms, and the +4+4 becomes 4-4.

The habit that prevents this: write brackets around the numerator you are subtracting before you do anything else with it. Then distribute the minus sign as a separate, deliberate step.

Worked example 2 Combine 5x2x293x+4x29\frac{5x-2}{x^2-9} - \frac{3x+4}{x^2-9}

The denominators match, so subtract the numerators. Bracket the numerator being subtracted:

5x2x293x+4x29=(5x2)(3x+4)x29.\frac{5x-2}{x^2-9} - \frac{3x+4}{x^2-9} = \frac{(5x-2) - (3x+4)}{x^2-9}.

Now distribute the minus sign across both terms of 3x+43x + 4:

(5x2)(3x+4)=5x23x4=2x6.(5x-2) - (3x+4) = 5x - 2 - 3x - 4 = 2x - 6.

Factor the top and the bottom, and cancel:

2x6x29=2(x3)(x3)(x+3)=2x+3.\frac{2x-6}{x^2-9} = \frac{2(x-3)}{(x-3)(x+3)} = \frac{2}{x+3}.

The restrictions come from the original denominator x29=(x3)(x+3)x^2 - 9 = (x-3)(x+3), so x3x \neq 3 and x3x \neq -3. The factor x3x - 3 cancelled, but x=3x = 3 is still excluded.

Compare that with the wrong turn. A student who drops the brackets writes 5x23x+4=2x+25x - 2 - 3x + 4 = 2x + 2 and reports 2x+2(x3)(x+3)\frac{2x+2}{(x-3)(x+3)}, which will not simplify at all. The lost sign on the +4+4 turned 2x62x - 6 into 2x+22x + 2 and destroyed the common factor. A subtraction whose answer refuses to simplify is worth a second look at the sign.

Check your understanding

Simplify 4x+3x+22x1x+2\dfrac{4x+3}{x+2} - \dfrac{2x-1}{x+2}.

Answer choices

Building the least common denominator

When the denominators differ, you must rebuild both fractions over a shared denominator. Any common denominator will do, but one of them is cheapest, and it is worth knowing which.

Start with numbers, where you already know the answer. To add 112+118\frac{1}{12} + \frac{1}{18}, look at what the denominators are made of:

12=223,18=232.12 = 2^2 \cdot 3, \qquad 18 = 2 \cdot 3^2.

A common denominator has to be a multiple of both. To be a multiple of 1212 it needs two factors of 22; to be a multiple of 1818 it needs two factors of 33. Take exactly the highest power of each prime that appears in either one, and you get the least common multiple:

2232=36.2^2 \cdot 3^2 = 36.

Then 112=336\frac{1}{12} = \frac{3}{36} and 118=236\frac{1}{18} = \frac{2}{36}, so the sum is 536\frac{5}{36} and no cancelling is needed at the end.

Polynomials factor into irreducible pieces in essentially one way, just as integers factor into primes, so the same recipe transfers word for word with “prime” replaced by “irreducible factor”. To build the least common denominator (LCD):

  1. Factor every denominator completely.
  2. List the distinct factors that appear anywhere.
  3. Raise each one to the highest power it reaches in any single denominator.
  4. Multiply those together.

Plain numbers left sitting in front of a denominator are handled by the rule you already know: take their ordinary least common multiple. The denominators 2x2x and 3x3x share the factor xx, and lcm(2,3)=6\operatorname{lcm}(2,3) = 6, so their LCD is 6x6x.

That last clause is also where the word “least” runs out of room. A nonzero number never changes where a denominator vanishes, so if LL is a common denominator then so are 2L2L and 3L3L, and they have exactly the same degree. The recipe therefore pins the LCD down only up to a numeric constant. Convention settles the remaining choice in the obvious way: take the version carrying no surplus number, which is what the least common multiple of the coefficients gives you.

Take the denominators x24x^2 - 4 and x24x+4x^2 - 4x + 4. Factored, they are (x2)(x+2)(x-2)(x+2) and (x2)2(x-2)^2. The distinct factors are x2x - 2 and x+2x + 2. The highest power of x2x - 2 in a single denominator is 22, and the highest power of x+2x + 2 is 11, so

LCD=(x2)2(x+2).\text{LCD} = (x-2)^2(x+2).
Building the least common denominator from factorsRow one: x squared minus 4 is built from one block reading (x minus 2) and one block reading (x plus 2). Row two: x squared minus 4x plus 4 is built from two blocks reading (x minus 2). The LCD row holds two blocks reading (x minus 2) and one block reading (x plus 2).x² - 4 =(x - 2)(x + 2)x² - 4x + 4 =(x - 2)(x - 2)LCD =(x - 2)(x - 2)(x + 2)
Each denominator is a stack of factors. The LCD takes every distinct factor as many times as it appears in the denominator that uses it most, and no more.

The recipe is not folklore. It is forced, and here is the argument.

The recipe gives a common denominator, and the smallest one#

Call the product produced by the recipe LL.

First, LL really is a common denominator. Take any one of the denominators, call it DD. Every factor of DD appears in LL raised to at least the power it has in DD. That is because LL uses the highest power that factor reaches in any denominator, and DD is one of them. So DD divides LL, which means L=DQL = D \cdot Q for some polynomial QQ. Multiplying that fraction’s numerator and denominator by QQ rewrites it over LL, and the same works for every fraction in the sum.

Second, nothing smaller works. Suppose CC is any common denominator, so every denominator divides CC. Pick one distinct factor pp, and let kk be the highest power of pp occurring in a single denominator, reached in some denominator DjD_j. Then pkp^k divides DjD_j, and DjD_j divides CC, so pkp^k divides CC. Run that argument once for each distinct factor. The distinct factors share no piece with one another, so CC must be divisible by the product of all of those highest powers, and that product is exactly LL. Hence LL divides CC, and no common denominator can have smaller degree than LL. That is what makes LL least, and it is as far as “least” can be pushed: 2L2L and 3L3L are common denominators of the same degree. So the LCD is fixed only up to a numeric constant, and by convention you take the one carrying no surplus number.

Both halves lean on the same fact: a polynomial factors into irreducible pieces in essentially one way, the same pieces every time, each pinned down up to a constant. That is what makes “the highest power of each factor” a well-defined thing to ask for. This is the argument that makes lcm(12,18)=36\operatorname{lcm}(12, 18) = 36, transplanted from primes to irreducible polynomials.

Check your understanding

What is the least common denominator of 5x24x\dfrac{5}{x^2-4x} and 1x216\dfrac{1}{x^2-16}?

Answer choices

Why the product is usually the worse choice

Multiplying the denominators together always produces a common denominator, and when they share no factor at all, that product is the LCD. But when they do share a factor, the product carries a copy of it that you will have to cancel back out at the end. Watch the same problem run both ways.

Combine 2x24+3x24x+4\dfrac{2}{x^2-4} + \dfrac{3}{x^2-4x+4}, whose denominators factor as (x2)(x+2)(x-2)(x+2) and (x2)2(x-2)^2.

Using the LCD (x2)2(x+2)(x-2)^2(x+2). The first fraction is missing one x2x - 2 and the second is missing one x+2x + 2:

2(x2)(x+2)x2x2+3(x2)2x+2x+2=2(x2)+3(x+2)(x2)2(x+2).\frac{2}{(x-2)(x+2)} \cdot \frac{x-2}{x-2} + \frac{3}{(x-2)^2} \cdot \frac{x+2}{x+2} = \frac{2(x-2) + 3(x+2)}{(x-2)^2(x+2)}.

The numerator is 2x4+3x+6=5x+22x - 4 + 3x + 6 = 5x + 2, so the answer is

5x+2(x2)2(x+2),x2,  x2.\frac{5x+2}{(x-2)^2(x+2)}, \qquad x \neq 2,\; x \neq -2.

Using the product (x2)3(x+2)(x-2)^3(x+2). Now the first fraction needs (x2)2(x-2)^2 and the second needs (x2)(x+2)(x-2)(x+2):

2(x2)2+3(x2)(x+2)(x2)3(x+2)=2x28x+8+3x212(x2)3(x+2)=5x28x4(x2)3(x+2).\frac{2(x-2)^2 + 3(x-2)(x+2)}{(x-2)^3(x+2)} = \frac{2x^2 - 8x + 8 + 3x^2 - 12}{(x-2)^3(x+2)} = \frac{5x^2 - 8x - 4}{(x-2)^3(x+2)}.

That numerator is not in lowest terms, so you are forced to factor a quadratic that you created yourself, 5x28x4=(5x+2)(x2)5x^2 - 8x - 4 = (5x+2)(x-2), and cancel:

(5x+2)(x2)(x2)3(x+2)=5x+2(x2)2(x+2).\frac{(5x+2)(x-2)}{(x-2)^3(x+2)} = \frac{5x+2}{(x-2)^2(x+2)}.

Same answer, more work, and a real risk of stopping early and calling 5x28x4(x2)3(x+2)\frac{5x^2-8x-4}{(x-2)^3(x+2)} the final answer. The LCD route never built the surplus x2x - 2 in the first place, so there was nothing to cancel.

The full method, with unlike denominators

Putting the pieces together gives one procedure that always works.

  1. Factor every denominator completely.
  2. Read off the restrictions from those factors, before anything cancels.
  3. Build the LCD: each distinct factor, to the highest power it reaches in any single denominator.
  4. Rewrite each fraction over the LCD by multiplying its numerator and its denominator by the factors it is missing.
  5. Combine the numerators over the single denominator, bracketing every numerator that is being subtracted.
  6. Expand, collect, factor, cancel. The restrictions from step 2 stay with the answer.

Worked example 3 Combine x+4x2+3x2x+3\frac{x+4}{x^2+3x} - \frac{2}{x+3}

Factor the denominators: x2+3x=x(x+3)x^2 + 3x = x(x+3), and the second is already x+3x + 3. So the restrictions are x0x \neq 0 and x3x \neq -3.

The distinct factors are xx and x+3x + 3, each to the first power, so the LCD is x(x+3)x(x+3). The first fraction already sits over it. The second is missing a factor of xx:

2x+3xx=2xx(x+3).\frac{2}{x+3} \cdot \frac{x}{x} = \frac{2x}{x(x+3)}.

Combine, bracketing the numerator that is being subtracted:

(x+4)2xx(x+3)=4xx(x+3).\frac{(x+4) - 2x}{x(x+3)} = \frac{4 - x}{x(x+3)}.

The numerator 4x4 - x is zero only at x=4x = 4, while the denominator’s factors vanish at x=0x = 0 and x=3x = -3. So the numerator shares no factor with the denominator, and the expression is already in lowest terms:

4xx(x+3),x0,  x3.\frac{4-x}{x(x+3)}, \qquad x \neq 0,\; x \neq -3.

Worked example 4 Combine xx24x22x\frac{x}{x-2} - \frac{4}{x^2-2x}

Factor: x22x=x(x2)x^2 - 2x = x(x-2). The denominators are x2x - 2 and x(x2)x(x-2), so the restrictions are x2x \neq 2 and x0x \neq 0. The LCD is x(x2)x(x-2), since that already contains both.

The second fraction sits over the LCD. The first is missing a factor of xx:

xx2xx=x2x(x2).\frac{x}{x-2} \cdot \frac{x}{x} = \frac{x^2}{x(x-2)}.

Combine over the single denominator:

x24x(x2)=(x2)(x+2)x(x2)=x+2x.\frac{x^2 - 4}{x(x-2)} = \frac{(x-2)(x+2)}{x(x-2)} = \frac{x+2}{x}.

The answer is x+2x\frac{x+2}{x}, with x0x \neq 0 and x2x \neq 2. That second restriction is the one people lose. The final form x+2x\frac{x+2}{x} shows no trouble at x=2x = 2, but the expression you were handed has x2x - 2 in a denominator. No amount of later algebra can make that expression exist at x=2x = 2.

The restrictions come from the original denominators

The domain is settled before you do any algebra at all. Factor the denominators exactly as they are given, and exclude every value that kills any factor. Two consequences catch people out.

A factor that cancels still restricts. In Worked Example 4 the factor x2x - 2 cancelled, but the starting expression was undefined at x=2x = 2, so the answer is undefined there too. The simplified form agrees with the original at every value it is allowed to have, and says nothing about the value it was never allowed to have.

Building up never adds a new restriction. Every factor you multiply a fraction by, on its way to the LCD, is already a factor of some denominator in the problem. So the values that factor kills were excluded from the very beginning. That has a useful consequence: the LCD is zero at exactly the excluded values, and nowhere else. If some denominator is zero at x=ax = a, then since that denominator divides the LCD, the LCD is zero at x=ax = a too. Going the other way, if the LCD is zero at x=ax = a, then one of its irreducible factors is zero there. That factor came from some denominator, which is therefore also zero at x=ax = a. So once you have the factored LCD in front of you, you can read the full list of restrictions straight off it.

Check your understanding

The expression 3x412x24x\dfrac{3}{x-4} - \dfrac{12}{x^2-4x} simplifies to 3x\dfrac{3}{x}. Which values of xx must be excluded?

Answer choices

Complex fractions are division in disguise

A complex fraction has a fraction inside its numerator, inside its denominator, or both. There is nothing new to learn here, because the main fraction bar means division, and dividing rational expressions is already in your hands: multiply by the reciprocal.

  1. Combine the top into a single fraction.
  2. Combine the bottom into a single fraction.
  3. Multiply the top by the reciprocal of the bottom.
  4. Collect restrictions from every denominator that appeared, including the main one, since the bottom of the big fraction cannot be zero either.

Worked example 5 Simplify 1x+121x12\dfrac{\frac{1}{x} + \frac{1}{2}}{\frac{1}{x} - \frac{1}{2}}

Combine the top over the LCD 2x2x, then the bottom over the same LCD:

1x+12=22x+x2x=2+x2x,1x12=22xx2x=2x2x.\frac{1}{x} + \frac{1}{2} = \frac{2}{2x} + \frac{x}{2x} = \frac{2 + x}{2x}, \qquad \frac{1}{x} - \frac{1}{2} = \frac{2}{2x} - \frac{x}{2x} = \frac{2 - x}{2x}.

Now the complex fraction is one fraction divided by another, so multiply by the reciprocal:

2+x2x÷2x2x=2+x2x2x2x=x+22x.\frac{2+x}{2x} \div \frac{2-x}{2x} = \frac{2+x}{2x} \cdot \frac{2x}{2-x} = \frac{x+2}{2-x}.

For the restrictions, hunt through every denominator that appeared. The 1x\frac{1}{x} terms force x0x \neq 0. The bottom of the big fraction cannot be zero, and 2x2x=0\frac{2-x}{2x} = 0 exactly when x=2x = 2, so x2x \neq 2 as well:

x+22x,x0,  x2.\frac{x+2}{2-x}, \qquad x \neq 0,\; x \neq 2.

Notice that the final form still shows x2x \neq 2 in its denominator, but has lost all trace of x0x \neq 0. That is the restriction you must carry by hand.

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

Ask why halves and thirds cannot simply be added. The answer hides inside two words you have used since primary school.

Denominator comes from the Latin denominare, to name. The bottom of a fraction names the kind of piece you are counting: sevenths, or halves, or (x2)(x-2)-ths. Numerator comes from numerare, to count, and the top says how many of those pieces you hold. Medieval arithmetic books stated the whole rule in that same vocabulary. You may add only quantities of the same denomination, they wrote. That is this lesson in older clothing.

So the common denominator is not a ritual. Add one half to one third and you are adding counts of two different things. Such a total names nothing at all. Rewrite both as sixths and the counts describe one piece, so they combine.

The bar arrived later than the words did. It shows up in the work of al-Hassar, in twelfth-century Morocco. He wrote one quantity above another with a stroke between them, and Europe copied the arrangement.

Nothing in that naming argument cares whether the piece is a seventh or an (x2)(x-2)-th. The LCD you built today is a medieval rule about denomination, aimed at polynomials.