TExcelTAD
Home › Algebra › Multiplying and Dividing Algebraic Fractions

Multiplying and Dividing Algebraic Fractions

Multiplying algebraic fractions follows the same rule as multiplying number fractions: numerator times numerator, denominator times denominator. Dividing means multiplying by the reciprocal. The algebra adds one piece of advice that saves a lot of work: factor everything first and cancel before you multiply.

Multiplying

ab⋅cd=a⋅cb⋅d\frac{a}{b} \cdot \frac{c}{d} = \frac{a \cdot c}{b \cdot d}

With polynomials, multiplying out first produces large expressions that you then have to factor again. Factoring first keeps everything small:

x2−43x+6⋅9xx2−2x=(x−2)(x+2)3(x+2)⋅9xx(x−2)factor every part=(x−2)(x+2)⋅9x3(x+2)⋅x(x−2)=93=3cancel (x−2),(x+2),xexcluded: x=−2 (from 3x+6), x=0 and x=2 (from x2−2x)\begin{aligned} &\frac{x^2 - 4}{3x + 6} \cdot \frac{9x}{x^2 - 2x} \\[1ex] &= \frac{(x - 2)(x + 2)}{3(x + 2)} \cdot \frac{9x}{x(x - 2)} && \text{factor every part} \\ &= \frac{(x - 2)(x + 2) \cdot 9x}{3(x + 2) \cdot x(x - 2)} \\ &= \frac{9}{3} = 3 && \text{cancel } (x - 2), (x + 2), x \\[1ex] &\text{excluded: } x = -2 \text{ (from } 3x + 6\text{)},\ x = 0 \text{ and } x = 2 \text{ (from } x^2 - 2x\text{)} \end{aligned}

The whole product is the constant 3, for every xx except the three excluded values. See Multiplying Fractions for the number version and Factoring and Reducing Algebraic Fractions for the cancelling rule.

Tip: Cancelling across the two fractions is allowed. Once they are written as one fraction, any factor of the top may cancel with any factor of the bottom.

Dividing

Dividing by a fraction is multiplying by its reciprocal (Dividing Fractions):

ab÷cd=ab⋅dc\frac{a}{b} \div \frac{c}{d} = \frac{a}{b} \cdot \frac{d}{c}
x2+5x+6x−1÷x+3x2−1=(x+2)(x+3)x−1⋅(x−1)(x+1)x+3flip the second, factor=(x+2)(x+1)cancel (x+3),(x−1)=x2+3x+2excluded: x=1 and x=−1 (original denominators) and x=−3 (the divisor x+3x2−1 is 0 there)\begin{aligned} &\frac{x^2 + 5x + 6}{x - 1} \div \frac{x + 3}{x^2 - 1} \\[1ex] &= \frac{(x + 2)(x + 3)}{x - 1} \cdot \frac{(x - 1)(x + 1)}{x + 3} && \text{flip the second, factor} \\ &= (x + 2)(x + 1) && \text{cancel } (x + 3), (x - 1) \\ &= x^2 + 3x + 2 \\[1ex] &\text{excluded: } x = 1 \text{ and } x = -1 \text{ (original denominators) and } x = -3 \text{ (the divisor } \tfrac{x + 3}{x^2 - 1} \text{ is 0 there)} \end{aligned}

Note: Division adds an extra exclusion: the values that make the divisor's numerator zero, because you cannot divide by a fraction whose value is 0. Collect excluded values from every denominator and from the numerator of each divisor, before flipping.

Complex fractions

A fraction with fractions inside it is just a division written vertically:

x/2x2/6=x2÷x26=x2⋅6x2=3x,x≠0\frac{x/2}{x^2/6} = \frac{x}{2} \div \frac{x^2}{6} = \frac{x}{2} \cdot \frac{6}{x^2} = \frac{3}{x}, \qquad x \ne 0

Checking in Python

Pick a test value that is not excluded and compare the original and simplified forms with exact fractions:

python · try it yourself
from fractions import Fraction as F

def product(x):
    return F(x**2 - 4, 3*x + 6) * F(9*x, x**2 - 2*x)

def quotient(x):
    return F(x**2 + 5*x + 6, x - 1) / F(x + 3, x**2 - 1)

for x in [3, 5, -4, 10]:
    print(x, "product:", product(x), "  quotient:", quotient(x), "=", x**2 + 3*x + 2)
3 product: 3   quotient: 20 = 20
5 product: 3   quotient: 42 = 42
-4 product: 3   quotient: 6 = 6
10 product: 3   quotient: 132 = 132

SymPy simplifies the whole expression with cancel, or factors the result with factor:

python · try it yourself
import sympy as sp

x = sp.symbols("x")
print(sp.cancel((x**2 - 4)/(3*x + 6) * (9*x)/(x**2 - 2*x)))
print(sp.factor(((x**2 + 5*x + 6)/(x - 1)) / ((x + 3)/(x**2 - 1))))
print(sp.cancel((x/2) / (x**2/6)))
print(sp.factor((2*x**2 - 8) / (x**2 + x) * (x**2 - x) / (x**2 - 4*x + 4)))
3
(x + 1)*(x + 2)
3/x
2*(x - 1)*(x + 2)/((x - 2)*(x + 1))

In software

  • Unit conversion is fraction multiplication. km/h⋅1000 m/km⋅1 h/3600 s\text{km/h} \cdot 1000\ \text{m/km} \cdot 1\ \text{h}/3600\ \text{s} cancels the units exactly like factors. Libraries such as pint (Python) and the type systems of F# and some game engines track units as factors that cancel, which catches "added metres to seconds" bugs at compile time.
  • Gear ratios and scale factors. Chaining transforms (screen pixels per world unit, world units per tile) multiplies ratios. Simplifying the chain once, symbolically, gives one constant to use in the hot loop.
  • Transfer functions. In control systems and audio filters, connecting two filters in series multiplies their rational transfer functions, and cancelling a common factor (a pole-zero cancellation) is exactly the cancelling in this lesson.

Exercises

Exercise 1: Monomials

Simplify 6x35y⋅10y29x\frac{6x^3}{5y} \cdot \frac{10y^2}{9x}.

Answer

4x2y3\frac{4x^2y}{3}, with x≠0,y≠0x \ne 0, y \ne 0.

Solution
6⋅105⋅9=6045=43;x3x=x2;y2y=y\frac{6 \cdot 10}{5 \cdot 9} = \frac{60}{45} = \frac{4}{3}; \quad \frac{x^3}{x} = x^2; \quad \frac{y^2}{y} = y

Exercise 2: Factor, then multiply

Simplify x2−x−6x2−9⋅x+3x+2\frac{x^2 - x - 6}{x^2 - 9} \cdot \frac{x + 3}{x + 2}.

Answer

11, for x≠3,−3,−2x \ne 3, -3, -2.

Solution
(x−3)(x+2)(x−3)(x+3)⋅x+3x+2every factor cancels→1\begin{aligned} &\frac{(x - 3)(x + 2)}{(x - 3)(x + 3)} \cdot \frac{x + 3}{x + 2} \\ &\text{every factor cancels} \to 1 \end{aligned}

Exercise 3: Divide

Simplify 4x+8x2−1÷x2+2xx+1\frac{4x + 8}{x^2 - 1} \div \frac{x^2 + 2x}{x + 1}.

Answer

4x(x−1)\frac{4}{x(x - 1)}, with x≠1,−1,0,−2x \ne 1, -1, 0, -2.

Solution
=4(x+2)(x−1)(x+1)⋅x+1x(x+2)=4x(x−1)excluded: x=±1 (first denominator), x=−1 (second denominator),excluded: x=0 and x=−2 (divisor’s numerator x2+2x)\begin{aligned} &= \frac{4(x + 2)}{(x - 1)(x + 1)} \cdot \frac{x + 1}{x(x + 2)} \\ &= \frac{4}{x(x - 1)} \\ &\text{excluded: } x = \pm 1 \text{ (first denominator)},\ x = -1 \text{ (second denominator)}, \\ &\phantom{\text{excluded: }} x = 0 \text{ and } x = -2 \text{ (divisor's numerator } x^2 + 2x\text{)} \end{aligned}
python · try it yourself
import sympy as sp

x = sp.symbols("x")
print(sp.factor(((4*x + 8)/(x**2 - 1)) / ((x**2 + 2*x)/(x + 1))))
4/(x*(x - 1))

Exercise 4: Complex fraction

Simplify 1−1x1−1x2\dfrac{1 - \frac{1}{x}}{1 - \frac{1}{x^2}}.

Answer

xx+1\frac{x}{x + 1}, with x≠0,1,−1x \ne 0, 1, -1.

Solution

Multiply top and bottom by x2x^2:

x2−xx2−1=x(x−1)(x−1)(x+1)=xx+1\frac{x^2 - x}{x^2 - 1} = \frac{x(x - 1)}{(x - 1)(x + 1)} = \frac{x}{x + 1}

Exercise 5: A speed conversion

A drone flies at 54 km/h. Multiply by the right unit fractions to get metres per second, using Fraction so the cancelling stays exact.

Answer

15 m/s

Solution
54 km/h⋅(1000 m1 km)⋅(1 h3600 s)=54 0003600 m/s=15 m/s54\ \text{km/h} \cdot \left(\frac{1000\ \text{m}}{1\ \text{km}}\right) \cdot \left(\frac{1\ \text{h}}{3600\ \text{s}}\right) = \frac{54\,000}{3600}\ \text{m/s} = 15\ \text{m/s}
python · try it yourself
from fractions import Fraction as F

print(F(54, 1) * F(1000, 1) * F(1, 3600))
15

Test yourself

Simplify x+1x⋅x2(x+1)2\frac{x + 1}{x} \cdot \frac{x^2}{(x + 1)^2}.

  1. xx+1\frac{x}{x + 1}
  2. xx
  3. 1x+1\frac{1}{x + 1}
  4. x+1x\frac{x + 1}{x}

What is the first step in dividing ab÷cd\frac{a}{b} \div \frac{c}{d}?

  1. Find a common denominator
  2. Cross-multiply a⋅ca \cdot c
  3. Multiply by the reciprocal dc\frac{d}{c}
  4. Subtract the fractions

In xx−2÷x+5x\frac{x}{x - 2} \div \frac{x + 5}{x}, which value is excluded that comes from the divisor's numerator?

  1. 2
  2. 0
  3. 5
  4. −5