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
With polynomials, multiplying out first produces large expressions that you then have to factor again. Factoring first keeps everything small:
The whole product is the constant 3, for every 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):
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:
Checking in Python
Pick a test value that is not excluded and compare the original and simplified forms with exact fractions:
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:
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. 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 .
Answer
, with .
Solution
Exercise 2: Factor, then multiply
Simplify .
Answer
, for .
Solution
Exercise 3: Divide
Simplify .
Answer
, with .
Solution
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 .
Answer
, with .
Solution
Multiply top and bottom by :
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
from fractions import Fraction as F
print(F(54, 1) * F(1000, 1) * F(1, 3600))15
Test yourself
Simplify .
What is the first step in dividing ?
- Find a common denominator
- Cross-multiply
- Multiply by the reciprocal
- Subtract the fractions
In , which value is excluded that comes from the divisor's numerator?
- 2
- 0
- 5
- −5