IB Maths AA HL Topic 1 β€” Number & Algebra Paper 1 & 2 ~9 min read

Counting Principles

Before you ever meet permutations or combinations, there’s a much simpler skill to master: just counting. How many possible PINs are there for a 4-digit lock? How many ways can you choose a meal off a menu? How many number plates can a country issue before running out? All of these questions come down to two tiny rules β€” multiply when you’re choosing several things together, and add when you’re splitting into separate cases. Those two rules, used carefully, will solve almost every counting problem the IB throws at you. The trick is reading the question slowly enough to spot which rule (or which combination of rules) applies.

πŸ“˜ What you need to know

The fundamental multiplication rule

Let’s start with the rule that everything else builds on. If you have to make a sequence of choices β€” say, pick a main course and pick a side dish β€” then the total number of meal combinations is just the number of mains times the number of sides. That’s it.

The multiplication rule (ways for choice 1) Γ— (ways for choice 2) Γ— … Γ— (ways for choice n)

Here’s a quick picture. Suppose a small cafΓ© offers 3 main courses and 2 side dishes. How many different meals can you order?

3 mains Γ— 2 sides = 6 meal combinations
PICK A MAIN… Main 1 Main 2 Main 3 …THEN A SIDE Side A Side B Side A Side B Side A Side B M1+A M1+B M2+A M2+B M3+A M3+B 3 mains Γ— 2 sides = 6 meals no need to list them all β€” just multiply each main has 2 side options β†’ 3 mains Γ— 2 = 6 total branches this scales: 3 Γ— 2 Γ— 4 = 24 if you add a drink with 4 options too
The tree shows why the multiplication works: each main course “spawns” the same number of side dishes, so the total number of leaves at the bottom is just (mains) Γ— (sides). Once you trust this, you don’t need to draw the tree any more β€” you just multiply the slot counts.

The AND/OR rule β€” multiply or add?

Here’s where most students get tripped up. Almost every counting question in the IB hides a clue in plain English. The words “AND” and “OR” tell you which operation to use.

When you read “AND”
Γ— MULTIPLY
“Pick a starter AND a main” means you do both. Multiply the number of starters by the number of mains.
When you read “OR”
+ ADD
“Pick a starter OR a main” means you do one or the other, not both. Add the number of starters and the number of mains.
Quick example:   A vending machine has 5 chocolate bars and 3 packets of crisps. How many ways can you buy one chocolate OR one packet of crisps?  β†’ 5 + 3 = 8.   How many ways can you buy one chocolate AND one packet of crisps?  β†’ 5 Γ— 3 = 15.

πŸ€” Why does AND mean multiply and OR mean add?

Think back to the tree diagram. When you do task A and then task B, every option in A pairs with every option in B β€” that’s a multiplication. When you do task A or task B (one separate scenario from another), you’re just listing two non-overlapping piles of options and counting their combined size β€” that’s addition.

Counting with digits

A huge chunk of exam questions are about codes, passwords, PINs and number plates. The trick is the same every time: figure out the number of slots, the number of allowed values in each slot, then multiply.

Just remember:

Quick reference digits available: 10  (0, 1, 2, …, 9)
letters available: 26  (A, B, C, …, Z)

So a 4-digit PIN where each digit can be anything has 10 Γ— 10 Γ— 10 Γ— 10 = 10 000 possibilities. A 3-letter code has 26 Γ— 26 Γ— 26 = 17 576 possibilities. Easy.

Unless a question explicitly says otherwise, assume repeats are allowed. So a PIN like 7777 is valid. Only switch to “no repeats” mode when you see words like “all different”, “no two the same”, or “without repetition”.

Counting with no repeats

If a question says “all digits are different” or “no letter is used twice”, the rule changes slightly. The first slot still has the full number of options, but each later slot has one fewer, because the previously-chosen value is now off-limits.

No-repeats pattern 10 Γ— 9 Γ— 8 Γ— 7 Γ— …   (each slot has one fewer)

So a 4-digit PIN with no repeated digits has 10 Γ— 9 Γ— 8 Γ— 7 = 5040 possibilities β€” a much smaller number than the 10 000 you’d get with repeats allowed.

Counting with restrictions

Sometimes a question puts a specific rule on one slot. Maybe the first digit has to be odd, or the last must be a square number, or the password has to start with a vowel. The recipe is unchanged β€” just count the allowed values in each slot, then multiply.

🧭 Recipe β€” counting with restrictions

  1. Set up the slots. Draw a row of empty boxes β€” one per position you need to fill.
  2. Fill in the restricted slots first. If a slot has a rule (e.g. “must be even”), count how many values fit, and write that number in the box.
  3. Fill in the unrestricted slots. These take whatever is left β€” usually 10 (digits) or 26 (letters), or fewer if no-repeats applies.
  4. Multiply across the slots. Done.
Common restrictions you’ll meet:   “odd digit” β†’ 5 choices (1, 3, 5, 7, 9).   “even digit” β†’ 5 choices (0, 2, 4, 6, 8).   “square digit” β†’ 4 choices (0, 1, 4, 9).   “prime digit” β†’ 4 choices (2, 3, 5, 7).   “vowel” β†’ 5 choices (A, E, I, O, U).
Watch the difference between a “PIN” and a “number”. A 4-digit PIN can start with any of 10 digits β€” including 0 β€” because 0123 is a perfectly fine PIN. A 4-digit number cannot start with 0 (otherwise it’s really a 3-digit number), so the first slot only has 9 choices. Re-read the question and notice which one it asks for.

Counting using cases

When a question gives you something like “starts with a 2 OR ends with a 5“, the cleanest way is often to split into cases, count each one separately, and add the totals. The “OR” is your signal.

🧭 Recipe β€” using cases

  1. Identify each separate case. Look for the “OR” β€” each branch becomes a case.
  2. Count each case independently using the multiplication rule.
  3. Add the case totals at the end.
  4. Watch for overlap! If two cases share some outcomes (e.g. starts with 2 AND ends with 5), you’d be double-counting. For HL questions you may need to subtract the overlap.

Worked examples

WE 1

Breakfast combinations

A breakfast cafΓ© offers 6 types of bread, 4 types of jam, and 3 types of fresh fruit. A customer wants one bread, one jam, and one fruit. How many different breakfast combinations are possible?

Step 1: Spot the AND customer wants bread AND jam AND fruit β†’ multiply Step 2: Multiply the slot counts 6 (bread) Γ— 4 (jam) Γ— 3 (fruit) = 24 Γ— 3 = 72 72 different breakfast combinations classic AND problem β€” three independent choices, all combined
WE 2

4-digit PIN with all different digits

How many 4-digit PINs can be made using digits 0–9, if all four digits must be different?

Step 1: Set up four slots, one per position __ Γ— __ Γ— __ Γ— __  (four slots) Step 2: Count choices in each slot, dropping by 1 each time slot 1: 10 choices (any digit) slot 2: 9 choices (one digit used) slot 3: 8 choices (two used) slot 4: 7 choices (three used) Step 3: Multiply 10 Γ— 9 Γ— 8 Γ— 7 = 5040 5040 PINs with all different digits “PIN” β†’ leading 0 is fine, so the first slot has all 10 digits available
WE 3

4-digit numbers with no repeated digits

How many 4-digit numbers can be formed using digits 0–9 if no digit is repeated?

Step 1: Notice it’s a NUMBER, not a PIN β€” first digit β‰  0 slot 1: 9 choices (digits 1–9, since 0 is not allowed at front) Step 2: Now count the remaining slots β€” 0 is allowed, but the first digit is used slot 2: 9 choices (10 digits minus the one used in slot 1) slot 3: 8 choices slot 4: 7 choices Step 3: Multiply 9 Γ— 9 Γ— 8 Γ— 7 = 81 Γ— 56 = 4536 4536 different 4-digit numbers slot 2 still has 9 choices β€” 0 is now allowed there, but one of the other digits has been used. Different reason, same count.
WE 4

5-digit PIN with restrictions

How many 5-digit PINs have an even first digit and a prime last digit? Repeated digits are allowed.

Step 1: Fill in the restricted slots first first digit (even): 0, 2, 4, 6, 8 β†’ 5 choices last digit (prime): 2, 3, 5, 7 β†’ 4 choices Step 2: Fill the unrestricted slots middle three slots: 10 each (no restriction, repeats allowed) Step 3: Multiply across 5 Γ— 10 Γ— 10 Γ— 10 Γ— 4 = 5 Γ— 1000 Γ— 4 = 20 000 20 000 valid PINs primes under 10 are 2, 3, 5, 7 β€” note that 1 is NOT prime. Easy thing to miss.
WE 5

Travel by cases

A traveller can fly from her home city to one of 6 European cities, and from there take one of 3 trains to her final destination. Alternatively, she can fly to one of 4 Asian cities, and from there take one of 5 trains. In how many different ways can she reach her final destination?

Step 1: Spot the OR β€” split into two cases Case A: Europe route  (flight AND train) Case B: Asia route  (flight AND train) Step 2: Count each case using AND β†’ multiply Case A: 6 Γ— 3 = 18 routes Case B: 4 Γ— 5 = 20 routes Step 3: Combine the cases using OR β†’ add total = 18 + 20 = 38 38 different travel routes cases mix the two rules: AND inside each case, OR between cases. Notice both at once.

πŸ’‘ Top tips

⚠ Common mistakes

Counting principles look almost too simple to deserve their own topic, and yet they’re the foundation under everything that follows. Permutations and combinations are just counting principles dressed up in tidier formulas. If you train yourself to slow down, draw the slots, and identify each AND or OR before doing any arithmetic, you’ll find the rest of this chapter feels almost automatic. Up next: permutations, where order suddenly matters and the factorials show up.

Need help with Counting Principles?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session β†’