TExcelTAD
Home › Basic Math & Pre-Algebra › Proportions

Proportions

A proportion says that two ratios are equal, like 34=68\frac{3}{4} = \frac{6}{8}. If you know three of the four numbers, you can find the fourth. This lesson solves proportions with cross multiplication, sets up word problems correctly, and uses proportions to scale recipes, resize images and map coordinates between screens.

Two equal ratios

ab=cdalso writtena:b=c:d\frac{a}{b} = \frac{c}{d} \qquad \text{also written} \quad a : b = c : d

The test for a true proportion is the same cross-product test you used for equivalent fractions:

a×d=b×ca \times d = b \times c

410=615\frac{4}{10} = \frac{6}{15} is a proportion because 4×15=604 \times 15 = 60 and 10×6=6010 \times 6 = 60.

Solving for the missing number

Cross multiply, then divide:

35=x20→3×20=5×x→60=5x→x=12\frac{3}{5} = \frac{x}{20} \quad\to\quad 3 \times 20 = 5 \times x \quad\to\quad 60 = 5x \quad\to\quad x = 12
79=21y→7×y=21×9→7y=189→y=27\frac{7}{9} = \frac{21}{y} \quad\to\quad 7 \times y = 21 \times 9 \quad\to\quad 7y = 189 \quad\to\quad y = 27

Always check by putting the answer back: 35=1220\frac{3}{5} = \frac{12}{20}? Both are 0.6. ✓

Setting up word problems

The key is to keep the same units in the same positions on both sides.

A car uses 6 litres of fuel for 80 km. How much for 300 km?

litreskm:680=x300→80x=6×300=1800→x=22.5 litres\frac{\text{litres}}{\text{km}}{:}\quad \frac{6}{80} = \frac{x}{300} \quad\to\quad 80x = 6 \times 300 = 1800 \quad\to\quad x = 22.5\ \text{litres}

A map's scale is 1:25 0001 : 25\,000. Two towns are 18 cm apart on the map. How far apart are they really?

mapreal:125 000=18x→x=18×25 000=450 000 cm=4.5 km\frac{\text{map}}{\text{real}}{:}\quad \frac{1}{25\,000} = \frac{18}{x} \quad\to\quad x = 18 \times 25\,000 = 450\,000\ \text{cm} = 4.5\ \text{km}

Tip: Write the units next to every number while setting up. If "litres over km" is on the left, it must be "litres over km" on the right too.

Proportions in Python

A small solver for ab=cx\frac{a}{b} = \frac{c}{x}, kept exact with Fraction:

python · try it yourself
from fractions import Fraction as F

def fourth(a, b, c):
    """Solve a/b = c/x for x."""
    return F(b) * c / a

print(fourth(3, 5, 12))             # 3/5 = 12/x  -> x = 20
print(fourth(6, 80, 22.5))          # 6 L/80 km = 22.5 L/x km (float in)
print(fourth(6, 80, F("22.5")))     # same, kept exact
print(fourth(1, 25000, 18) / 100_000, "km")   # map scale, cm -> km

# check a proportion with cross products
def is_proportion(a, b, c, d):
    return a * d == b * c

print(is_proportion(4, 10, 6, 15), is_proportion(4, 10, 6, 14))
20
300.0
300
9/2 km
True False

Passing the float 22.5 gave the float 300.0: mixing a Fraction with a float always produces a float. Passing F("22.5") keeps the whole calculation exact and gives 300. 9/2 km is 4.5 km.

Scaling a recipe

A recipe for 4 people becomes a recipe for 6 people with the ratio 64=32\frac{6}{4} = \frac{3}{2}. Every ingredient keeps the same proportion to the others:

python · try it yourself
from fractions import Fraction as F

recipe = {"rice (cups)": F(3, 2), "water (cups)": F(3), "salt (tsp)": F(3, 4), "onions": F(1)}
serves, wanted = 4, 6
factor = F(wanted, serves)

for item, amount in recipe.items():
    new = amount * factor
    whole, rest = divmod(new.numerator, new.denominator)
    shown = f"{whole} {F(rest, new.denominator)}" if whole and rest else str(new)
    print(f"{item:13} {str(amount):>4} -> {shown}")
rice (cups)    3/2 -> 2 1/4
water (cups)     3 -> 4 1/2
salt (tsp)     3/4 -> 1 1/8
onions           1 -> 1 1/2

Every amount was multiplied by the same factor 32\frac{3}{2}, so the ratios between ingredients (twice as much water as rice, for example) stay the same.

Resizing and coordinate mapping

Keeping an image's proportions when resizing is a proportion: new_height/new_width=old_height/old_width\text{new\_height} / \text{new\_width} = \text{old\_height} / \text{old\_width}. Mapping a mouse position from a 1920-wide window to a 1280-wide canvas uses the same proportion: xcanvas/1280=xwindow/1920x_{\text{canvas}} / 1280 = x_{\text{window}} / 1920. This is the same "map one range to another" idea behind linear interpolation.

In software

  • Responsive layouts: CSS aspect-ratio: 16 / 9 keeps width and height proportional.
  • Thumbnails: scale 4000×30004000 \times 3000 down to width 400 → height 400×3000/4000=300400 \times 3000 / 4000 = 300.
  • Progress estimates: "processed 1.2 GB in 40 s, so 6 GB takes 200 s" assumes a constant rate, which is a proportion.
  • Charts map data values to pixel positions with a proportion (a linear scale).

Exercises

Exercise 1: Solve it

Solve 8x=1215\frac{8}{x} = \frac{12}{15}.

Answer

x=10x = 10

Solution
8×15=12×x→120=12x→x=10check: 810=0.8 and 1215=0.8 ✓\begin{aligned} &8 \times 15 = 12 \times x \quad\to\quad 120 = 12x \quad\to\quad x = 10 \\ &\text{check: } \frac{8}{10} = 0.8 \text{ and } \frac{12}{15} = 0.8\ \checkmark \end{aligned}

Exercise 2: Typing speed

You type 340 words in 5 minutes. At the same rate, how long does a 1700-word essay take?

Answer

25 minutes

Solution
340 words/5 min=1700 words/x min→340x=8500→x=25340\ \text{words} / 5\ \text{min} = 1700\ \text{words} / x\ \text{min} \quad\to\quad 340x = 8500 \quad\to\quad x = 25

Exercise 3: Thumbnail size

A 3024×40323024 \times 4032 portrait photo is scaled to a height of 512 px. How wide is the thumbnail?

Answer

384 px

Solution

width/512=3024/4032\text{width} / 512 = 3024 / 4032, so width=512×3024/4032=512×34=384\text{width} = 512 \times 3024 / 4032 = 512 \times \frac{3}{4} = 384.

Exercise 4: Scale for a party

Scale the same recipe (for 4 people: 32\frac{3}{2} cups rice, 3 cups water, 34\frac{3}{4} tsp salt, 1 onion) to 10 people. Work it out by hand, then write a function scale(recipe, serves, wanted) that returns the new amounts.

Answer

rice 3343\frac{3}{4} cups, water 7127\frac{1}{2} cups, salt 1781\frac{7}{8} tsp, onions 2122\frac{1}{2}.

Solution

The factor is 104=52\frac{10}{4} = \frac{5}{2}.

rice32×52=154=334water3×52=152=712salt34×52=158=178onions1×52=52=212\begin{aligned} \text{rice} &\quad \frac{3}{2} \times \frac{5}{2} = \frac{15}{4} = 3\tfrac{3}{4} \\ \text{water} &\quad 3 \times \frac{5}{2} = \frac{15}{2} = 7\tfrac{1}{2} \\ \text{salt} &\quad \frac{3}{4} \times \frac{5}{2} = \frac{15}{8} = 1\tfrac{7}{8} \\ \text{onions} &\quad 1 \times \frac{5}{2} = \frac{5}{2} = 2\tfrac{1}{2} \end{aligned}
python · try it yourself
from fractions import Fraction as F

def scale(recipe, serves, wanted):
    factor = F(wanted, serves)
    return {item: amount * factor for item, amount in recipe.items()}

recipe = {"rice": F(3, 2), "water": F(3), "salt": F(3, 4), "onions": F(1)}
for item, amount in scale(recipe, 4, 10).items():
    print(item, amount)
rice 15/4
water 15/2
salt 15/8
onions 5/2

Test yourself

Solve 47=x21\frac{4}{7} = \frac{x}{21}.

  1. x=12x = 12
  2. x=14x = 14
  3. x=3x = 3
  4. x=84x = 84

5 pens cost 3.50. How much do 8 pens cost?

  1. 5.60
  2. 4.50
  3. 6.00
  4. 5.25

Which is a true proportion?

  1. 34=916\frac{3}{4} = \frac{9}{16}
  2. 25=615\frac{2}{5} = \frac{6}{15}
  3. 56=1018\frac{5}{6} = \frac{10}{18}
  4. 13=36\frac{1}{3} = \frac{3}{6}