Table of Contents

1. Number Types 2. Times Tables (Multiplication 1-12) 3. Order of Operations (BODMAS / PEMDAS) 4. Fractions 5. Decimals 6. Percentages 7. Ratios and Proportions 8. Exponents and Square Roots 9. Negative Numbers 10. Modular Arithmetic (The % Operator) 11. Floor, Ceiling & Integer Division 12. Practice Quiz

1. Number Types

Before we do anything with numbers, let's understand what kinds of numbers exist. Think of it as a family tree -- each type builds on the last one.

Natural Numbers (Counting Numbers)

These are the numbers you first learned as a kid: 1, 2, 3, 4, 5, ... and so on forever. They are called "natural" because they feel, well, natural. You use them to count things: 3 apples, 7 dogs, 42 stars. Natural numbers never include zero, fractions, or negatives.

Natural Numbers = { 1, 2, 3, 4, 5, 6, 7, ... }
Real-World Examples

Natural numbers in daily life: counting money (5 dollars), measuring quantity (3 apples), expressing age (25 years old), house numbers (123 Main St). These are the numbers that feel most "natural" because we use them constantly for counting discrete things.

Whole Numbers

Take all the natural numbers and add zero. That is it -- you now have the whole numbers. Zero is special because it represents "nothing," but it is still a valid number.

Whole Numbers = { 0, 1, 2, 3, 4, 5, 6, ... }

Integers

Now extend whole numbers in the other direction -- add all the negative whole numbers. Integers include numbers like -3, -2, -1, 0, 1, 2, 3. No fractions, no decimals -- just clean whole values, both positive and negative.

Integers = { ..., -3, -2, -1, 0, 1, 2, 3, ... }
Number Line

Picture a horizontal line stretching forever in both directions. Place 0 in the center. Positive numbers go to the right (1, 2, 3, ...) and negative numbers go to the left (-1, -2, -3, ...). Every integer sits at an exact point on this line, spaced evenly apart.

... -4 -- -3 -- -2 -- -1 -- 0 -- 1 -- 2 -- 3 -- 4 ...

Rational Numbers

A rational number is any number that can be written as a fraction of two integers (where the bottom number is not zero). This includes all integers (because 5 = 5/1), all fractions (like 3/4), and all terminating or repeating decimals (like 0.75 or 0.333...).

Rational Number = a/b, where a and b are integers and b != 0
Examples of Rational Numbers
  • 1/2 = 0.5 (a simple fraction)
  • -3/4 = -0.75 (negative fraction)
  • 7 = 7/1 (every integer is rational)
  • 0.333... = 1/3 (repeating decimal)
  • 2.75 = 11/4 (terminating decimal)

Irrational Numbers

These are numbers that cannot be written as a fraction of two integers. Their decimal expansions go on forever without repeating. The most famous examples are pi and the square root of 2.

Examples of Irrational Numbers
  • pi = 3.14159265358979... (never ends, never repeats)
  • sqrt(2) = 1.41421356... (the diagonal of a 1x1 square)
  • sqrt(3) = 1.73205080...
  • e = 2.71828182... (Euler's number, important in advanced math)

Real Numbers

Put all rational and irrational numbers together and you get the real numbers. This is every possible point on the number line. Basically, if you can point to it on a number line, it is a real number.

Real Numbers = Rational Numbers + Irrational Numbers

Summary Table

Type Includes Examples
Natural Positive counting numbers 1, 2, 3, 100, 9999
Whole Natural numbers + zero 0, 1, 2, 3, 100
Integer Whole numbers + negatives -5, -1, 0, 3, 42
Rational Any number expressible as a/b 1/2, -3, 0.75, 0.333...
Irrational Non-repeating, non-terminating decimals pi, sqrt(2), e
Real All of the above combined Everything on the number line
Think of it like nesting dolls

Natural numbers are inside whole numbers, which are inside integers, which are inside rational numbers, which are inside real numbers. Each set contains the previous one plus more.

Practice: Classifying Numbers

Try to classify these numbers (some fit multiple categories):

  • -5: Integer, rational, real (but not natural or whole)
  • 0: Whole, integer, rational, real (but not natural)
  • 1/2: Rational, real (but not natural, whole, or integer)
  • π: Irrational, real (but nothing else)
  • 7: Natural, whole, integer, rational, real (fits all categories!)

Key insight: Every natural number is also whole, integer, rational, and real. But not every real number is natural.

CS Connection: Data Types

In programming, you choose a data type based on what kind of number you need -- and this directly maps to the number types above:

  • Natural/Whole numbersunsigned int in C++ (no negatives allowed, just 0 and up)
  • Integersint, long (positive and negative whole numbers)
  • Rational numbersfloat, double (numbers with decimal points)
  • Irrational numbers → Also stored as float/double, but they get rounded because computers can't store infinite decimals. That's why π in code is 3.14159265... and stops at some point.

Picking the wrong type causes real bugs. Storing a negative number in an unsigned int wraps it to a huge positive number. Storing money as a float causes rounding errors (use integers counting cents instead).

2. Times Tables (Multiplication 1-12)

Knowing your times tables by heart is like knowing the alphabet -- it makes everything else in math much easier. You don't want to be calculating 7 × 8 from scratch every time; you want it to be automatic. Let's master all multiplication facts from 1 to 12.

How to Learn Times Tables

The key is daily practice. Spend 5-10 minutes each day on times tables. Start with the easy ones (2s, 5s, 10s), then work your way up. Say them out loud. Write them down. Use the interactive quiz below every day until they become automatic.

Complete Times Tables (1-12)

Here's the full multiplication table. Notice the patterns -- the table is symmetrical because 3 × 7 = 7 × 3 (the commutative property).

× 123456789101112
1123456789101112
224681012141618202224
3369121518212427303336
44812162024283236404448
551015202530354045505560
661218243036424854606672
771421283542495663707784
881624324048566472808896
9918273645546372819099108
10102030405060708090100110120
11112233445566778899110121132
121224364860728496108120132144

Tricks and Patterns for Each Number

× 1 - The Identity

Any number times 1 equals itself. 7 × 1 = 7. This is the easiest table!

× 2 - Doubling

Double the number. 2 × 6 = 12 (just 6 + 6). If you can add, you can multiply by 2.

× 3 - Double and Add

Triple a number = double it + add the original. 3 × 7 = 14 + 7 = 21

× 4 - Double Twice

Double the number, then double the result. 4 × 6 = 2 × 12 = 24. Or: 6 → 12 → 24

× 5 - Half of 10

Multiply by 10, then halve. 5 × 7 = 70 ÷ 2 = 35. Or: results always end in 0 or 5.

× 6 - Even Results

When you multiply an even number by 6, the answer ends in the same digit. 6 × 2 = 12, 6 × 4 = 24, 6 × 6 = 36, 6 × 8 = 48

× 7 - The Hard One

No easy trick -- just memorize. Focus on the tricky ones: 7 × 7 = 49, 7 × 8 = 56, 7 × 6 = 42. Memory trick for 7 × 8: "5, 6, 7, 8" → 56 = 7 × 8

× 8 - Double Three Times

Double, double, double. 8 × 3 = 3 → 6 → 12 → 24. Or use: 8 × n = 4 × n × 2

× 9 - The Finger Trick

Magic pattern: For 9 × n, the digits add up to 9. 9 × 3 = 27 (2+7=9), 9 × 7 = 63 (6+3=9).

Finger method: Hold up 10 fingers. To find 9 × 4, put down finger 4. Count fingers on each side: 3 on left, 6 on right = 36!

Pattern: 9, 18, 27, 36, 45, 54, 63, 72, 81, 90. Notice the tens go up (0,1,2,3...) and units go down (9,8,7,6...).

× 10 - Add a Zero

Just add a 0 to the end. 10 × 7 = 70. The easiest after × 1!

× 11 - Repeat the Digit (up to 9)

For single digits: 11 × 3 = 33, 11 × 7 = 77. For 10+: 11 × 12 = 132 (use normal multiplication or 12 × 10 + 12).

× 12 - One Dozen

Use: 12 × n = 10 × n + 2 × n. Example: 12 × 7 = 70 + 14 = 84.

The Hardest Facts to Remember

These are the facts most people struggle with. Focus extra practice here:

  • 7 × 8 = 56 (Memory: 5, 6, 7, 8)
  • 6 × 7 = 42
  • 6 × 8 = 48
  • 7 × 9 = 63
  • 8 × 9 = 72
  • 12 × 7 = 84
  • 12 × 8 = 96

Daily Times Table Checker

Practice makes perfect! Use this quiz every day. Try to answer in under 3 seconds per question.

Daily Practice Quiz

Loading...

Score: 0 / 0 | Streak: 0

Practice Strategy

Daily goal: Get 20 questions right with at least 90% accuracy. Once you can do this consistently, you've mastered your times tables! Focus on speed -- aim to answer each question in under 3 seconds.

Practice Problems -- Times Tables

Cover the answers. Write each answer down as fast as you can. Time yourself. Your goal: all correct in under 2 minutes.

Set A: Rapid Fire

Solve as fast as you can -- no calculator

1) 7 x 8    2) 6 x 9    3) 12 x 11    4) 8 x 6    5) 9 x 7

6) 4 x 12    7) 11 x 8    8) 3 x 9    9) 7 x 7    10) 6 x 6

11) 8 x 9    12) 12 x 7    13) 5 x 11    14) 9 x 9    15) 6 x 8

Click to reveal answers -- Set A

1) 56   2) 54   3) 132   4) 48   5) 63

6) 48   7) 88   8) 27   9) 49   10) 36

11) 72   12) 84   13) 55   14) 81   15) 48

Set B: The Tricky Ones (Most Commonly Missed)

These are the ones people get wrong most. Drill them.

1) 7 x 6    2) 8 x 7    3) 9 x 6    4) 12 x 8    5) 11 x 7

6) 9 x 8    7) 7 x 9    8) 6 x 12    9) 8 x 8    10) 12 x 9

11) 7 x 12    12) 9 x 11    13) 8 x 12    14) 6 x 7    15) 11 x 12

Click to reveal answers -- Set B

1) 42   2) 56   3) 54   4) 96   5) 77

6) 72   7) 63   8) 72   9) 64   10) 108

11) 84   12) 99   13) 96   14) 42   15) 132

Set C: Division (Reverse Times Tables)

If you know multiplication, you know division. Solve these.

1) 56 / 8    2) 72 / 9    3) 48 / 6    4) 81 / 9    5) 132 / 11

6) 63 / 7    7) 96 / 12    8) 54 / 6    9) 84 / 7    10) 108 / 9

Click to reveal answers -- Set C

1) 7   2) 8   3) 8   4) 9   5) 12

6) 9   7) 8   8) 9   9) 12   10) 12

Where to Practice More -- Times Tables

3. Order of Operations (BODMAS / PEMDAS)

When you see an expression like 3 + 4 x 2, do you add first or multiply first? The answer matters -- and getting it wrong is one of the most common mistakes in math. The order of operations tells you exactly which calculations to do first.

There are two popular acronyms. They mean the same thing, just different words:

BODMAS PEMDAS Meaning Priority
Brackets Parentheses Solve inside ( ) first 1st (highest)
Orders Exponents Powers and roots (x^2, sqrt) 2nd
Division Multiplication Multiply and divide, left to right 3rd (equal priority)
Multiplication Division
Addition Addition Add and subtract, left to right 4th (equal priority)
Subtraction Subtraction
Key Rule

Multiplication and division have equal priority -- you do them left to right. Same for addition and subtraction. It is NOT "multiply before divide." It is "multiplication and division together, left to right."

Worked Examples

Example 1 -- Simple

Solve: 3 + 4 x 2

Step 1: Multiplication first: 4 x 2 = 8

Step 2: Then addition: 3 + 8 = 11

(Not 14! A common mistake is doing 3 + 4 = 7 first.)

Example 2 -- With Brackets

Solve: (3 + 4) x 2

Step 1: Brackets first: 3 + 4 = 7

Step 2: Then multiply: 7 x 2 = 14

Example 3 -- Multiple Operations

Solve: 10 - 3 x 2 + 8 / 4

Step 1: Multiplication: 3 x 2 = 6

Step 2: Division: 8 / 4 = 2

Step 3: Now left to right: 10 - 6 + 2 = 4 + 2 = 6

Example 4 -- With Exponents

Solve: 2 + 3^2 x 4

Step 1: Exponent first: 3^2 = 9

Step 2: Multiplication: 9 x 4 = 36

Step 3: Addition: 2 + 36 = 38

Example 5 -- Complex

Solve: 5 x (6 - 2)^2 + 12 / 3 - 1

Step 1: Brackets: 6 - 2 = 4

Step 2: Exponent: 4^2 = 16

Step 3: Multiplication: 5 x 16 = 80

Step 4: Division: 12 / 3 = 4

Step 5: Left to right: 80 + 4 - 1 = 83

Common Mistakes to Avoid
  • Adding before multiplying: In "3 + 4 x 2", you must multiply first. The answer is 11, not 14.
  • Thinking M comes before D: Multiplication and division have equal priority. Do them left to right. In "12 / 4 x 3", you divide first (left to right): 3 x 3 = 9, not 12 / 12 = 1.
  • Forgetting nested brackets: In "2 x (3 + (4 - 1))", solve the innermost brackets first: 4 - 1 = 3, then 3 + 3 = 6, then 2 x 6 = 12.
  • Ignoring exponents: In "2 x 3^2", the exponent applies to 3 only (not 2 x 3). So it is 2 x 9 = 18, not 6^2 = 36.
More Practice Examples

Practice these step-by-step:

1) 2 + 3 x 4^2 - 1
Step 1: Exponent: 4^2 = 16
Step 2: Multiply: 3 x 16 = 48
Step 3: Left to right: 2 + 48 - 1 = 50 - 1 = 49

2) (8 - 3) x 2 + 10 / 5
Step 1: Brackets: 8 - 3 = 5
Step 2: Multiply: 5 x 2 = 10
Step 3: Divide: 10 / 5 = 2
Step 4: Add: 10 + 2 = 12

3) 15 / 3 x 2 - 4
Step 1: Division first (left to right): 15 / 3 = 5
Step 2: Then multiply: 5 x 2 = 10
Step 3: Subtract: 10 - 4 = 6

Memory Trick

Remember BODMAS with: "Big Old Dogs Must Always Sleep" or "Please Excuse My Dear Aunt Sally" (PEMDAS). But remember: MD and AS are equal priority, left to right!

CS Connection: How Your Code Evaluates Expressions

Compilers and interpreters follow exactly the same rules. When you write:

int result = 3 + 4 * 2; // result = 11, NOT 14

The compiler does multiplication first, just like BODMAS says. This is called operator precedence. Every language has a precedence table -- and it matches the math you just learned. If you want addition first, you use parentheses: (3 + 4) * 2 = 14. This is also why complex boolean expressions like a || b && c can surprise you -- && has higher precedence than ||, just like * beats +.

Practice Problems -- Order of Operations

Evaluate each expression. Show every step. Remember: Brackets first, then Exponents, then Multiplication/Division (left to right), then Addition/Subtraction (left to right).

Set A: Basic BODMAS

Evaluate each expression

1) 3 + 4 x 2

2) 10 - 2 x 3

3) 8 / 4 + 6

4) 15 - 6 / 2

5) 2 + 3 x 4 - 1

6) 20 / 5 + 3 x 2

7) 7 x 3 - 4 x 2

8) 36 / 6 / 3

9) 5 + 10 / 2 - 3

10) 8 x 2 + 12 / 4 - 5

Click to reveal answers -- Set A

1) 3 + 8 = 11

2) 10 - 6 = 4

3) 2 + 6 = 8

4) 15 - 3 = 12

5) 2 + 12 - 1 = 13

6) 4 + 6 = 10

7) 21 - 8 = 13

8) 6 / 3 = 2 (left to right)

9) 5 + 5 - 3 = 7

10) 16 + 3 - 5 = 14

Set B: With Brackets

Evaluate each expression

1) (3 + 4) x 2

2) 5 x (8 - 3)

3) (12 + 8) / (4 + 1)

4) 3 x (2 + 5) - 4

5) (9 - 3) x (4 + 2)

6) 100 / (4 x 5)

7) (7 + 3) x (10 - 6) / 2

8) 2 x (3 + 4 x 2)

9) ((6 + 2) x 3 - 4) / 5

10) 50 - 3 x (8 + 2) + 4

Click to reveal answers -- Set B

1) 7 x 2 = 14

2) 5 x 5 = 25

3) 20 / 5 = 4

4) 3 x 7 - 4 = 21 - 4 = 17

5) 6 x 6 = 36

6) 100 / 20 = 5

7) 10 x 4 / 2 = 40 / 2 = 20

8) Inside bracket: 3 + 8 = 11. Then 2 x 11 = 22

9) Inner: 8 x 3 = 24. Then 24 - 4 = 20. Then 20/5 = 4

10) 50 - 3 x 10 + 4 = 50 - 30 + 4 = 24

Set C: With Exponents

Evaluate each expression

1) 2^3 + 4

2) 3^2 x 2

3) 5 + 2^4 / 4

4) (2 + 3)^2

5) 2^3 + 3^2

6) 10 - 2^3 + 1

7) (4 + 1)^2 - 3 x 5

8) 3^3 / 9 + 2^2

9) 100 - (2^2 + 3)^2

10) 2^(1+2) x 3 - 4^2

Click to reveal answers -- Set C

1) 8 + 4 = 12

2) 9 x 2 = 18

3) 5 + 16/4 = 5 + 4 = 9

4) 5^2 = 25

5) 8 + 9 = 17

6) 10 - 8 + 1 = 3

7) 25 - 15 = 10

8) 27/9 + 4 = 3 + 4 = 7

9) 100 - (4+3)^2 = 100 - 49 = 51

10) 2^3 x 3 - 16 = 8 x 3 - 16 = 24 - 16 = 8

Where to Practice More -- Order of Operations

3. Fractions

A fraction represents a part of a whole. If you cut a pizza into 4 equal slices and eat 1, you have eaten 1/4 of the pizza. The top number (numerator) tells you how many parts you have. The bottom number (denominator) tells you how many equal parts the whole was divided into.

Fraction = Numerator / Denominator

But here's what people often miss: a fraction is also a division. The fraction 3/4 literally means "3 divided by 4." The fraction bar IS a division sign. Once this clicks, fractions stop being scary -- they're just division you haven't done yet.

What 3/4 really means: ┌──────────────────────────────┐ │ A whole bar │ └──────────────────────────────┘ Split into 4 equal parts: ┌───────┬───────┬───────┬───────┐ │ 1/4 │ 1/4 │ 1/4 │ 1/4 │ └───────┴───────┴───────┴───────┘ Take 3 of them (that's 3/4): ┌───────┬───────┬───────┐───────┐ │███████│███████│███████│ │ └───────┴───────┴───────┘───────┘ ◄────── 3/4 ──────► 1/4 3/4 = 3 ÷ 4 = 0.75
The Key Insight

The denominator (bottom) tells you what SIZE the pieces are. The numerator (top) tells you HOW MANY pieces you have. A bigger denominator means SMALLER pieces (cutting into more slices makes each one thinner). This is why 1/8 is smaller than 1/4 -- eighths are tinier pieces than quarters.

Types of Fractions

Type Definition Examples
Proper Numerator is smaller than denominator (less than 1) 1/2, 3/4, 7/10
Improper Numerator is equal to or larger than denominator (1 or more) 5/3, 9/4, 7/7
Mixed Number A whole number combined with a proper fraction 1 2/3, 3 1/4, 2 5/8
Converting Improper to Mixed

Convert 7/3 to a mixed number:

Step 1: Divide 7 by 3: 7 / 3 = 2 remainder 1

Step 2: The whole number is 2, the remainder goes over the denominator: 2 1/3

Converting Mixed to Improper

Convert 3 2/5 to an improper fraction:

Step 1: Multiply whole number by denominator: 3 x 5 = 15

Step 2: Add the numerator: 15 + 2 = 17

Step 3: Put over original denominator: 17/5

Equivalent Fractions

Equivalent fractions look different but represent the same value. You create them by multiplying (or dividing) the numerator and denominator by the same number.

Example

1/2 = 2/4 = 3/6 = 4/8 = 50/100

All of these equal one half. We multiplied top and bottom by the same number each time.

Simplifying Fractions

To simplify a fraction, divide both the numerator and denominator by their Greatest Common Divisor (GCD) -- the largest number that divides both evenly.

Example -- Simplify 12/18

Step 1: Find the GCD of 12 and 18. Factors of 12: 1, 2, 3, 4, 6, 12. Factors of 18: 1, 2, 3, 6, 9, 18. GCD = 6.

Step 2: Divide both by 6: 12/6 = 2, 18/6 = 3

Result: 12/18 = 2/3

Easy Way to Find GCD

If you struggle with finding factors, try this: start with the smaller number and work down. Does 12 divide both 12 and 18? No (18/12 = 1.5). Does 6? Yes (12/6 = 2, 18/6 = 3). So 6 is the GCD. Or use trial division: try 2, then 3, then 4, etc.

More Fraction Simplification Practice

Simplify these fractions:

1) 6/9: Both divide by 3 → 6/9 = 2/3

2) 15/25: Both divide by 5 → 15/25 = 3/5

3) 8/12: Both divide by 4 → 8/12 = 2/3

4) 10/15: Both divide by 5 → 10/15 = 2/3

Common pattern: Look for numbers both top and bottom can be divided by evenly.

Comparing Fractions -- Which is Bigger?

This trips people up, but there are simple methods.

Method 1: Same denominator. If the denominators match, the bigger numerator wins.

3/7 vs 5/7 → 5/7 is bigger (same size pieces, but more of them)

Method 2: Same numerator. If the numerators match, the SMALLER denominator wins (bigger pieces).

3/4 vs 3/8 → 3/4 is bigger (quarters are bigger than eighths)

Method 3: Cross multiply. Works for ANY two fractions. Multiply diagonally and compare.

Example: Is 3/5 or 2/3 bigger?

Cross multiply: 3 × 3 = 9 (left side) vs 2 × 5 = 10 (right side)

10 > 9, so the right fraction wins: 2/3 > 3/5

Check with decimals: 3/5 = 0.6, 2/3 = 0.667 ✓

Example: Is 5/8 or 7/12 bigger?

Cross multiply: 5 × 12 = 60 vs 7 × 8 = 56

60 > 56, so 5/8 > 7/12

Visual comparison of 3/5 vs 2/3: 3/5: ┌────┬────┬────┬────┬────┐ │████│████│████│ │ │ = 0.60 └────┴────┴────┴────┴────┘ 2/3: ┌──────┬──────┬──────┐ │██████│██████│ │ = 0.67 └──────┴──────┴──────┘ 2/3 is slightly bigger -- the pieces are bigger even though there are fewer of them.

Finding the Least Common Denominator (LCD)

When you need to add, subtract, or compare fractions with different denominators, you need a common denominator. The LCD is the smallest number both denominators divide into evenly. Here's how to find it:

Method 1: List multiples (works for small numbers)

Example: LCD of 4 and 6

Multiples of 4: 4, 8, 12, 16, 20, 24, ...

Multiples of 6: 6, 12, 18, 24, ...

First number in both lists: LCD = 12

Method 2: Check if one divides the other (quickest when it works)

Example: LCD of 5 and 10

Does 5 divide evenly into 10? Yes! So LCD = 10

This works whenever one denominator is a multiple of the other.

Method 3: Multiply the denominators (always works, might not be smallest)

Example: LCD of 3 and 7

3 and 7 share no common factors, so LCD = 3 × 7 = 21

When the denominators share no factors, multiplying them IS the LCD.

Quick Decision Guide

Ask in this order:

  1. Is one denominator a multiple of the other? (e.g., 4 and 12 → LCD is 12)
  2. If not, do they share a common factor? (e.g., 4 and 6, both divide by 2 → LCD = 12)
  3. If not, just multiply them (e.g., 3 and 7 → LCD = 21)

Finding a Fraction of an Amount

"Of" in math means multiply. So "3/4 of 20" means 3/4 × 20.

Fraction of Amount = (Numerator / Denominator) × Amount

Shortcut: Divide the amount by the denominator first, then multiply by the numerator.
Example: What is 3/4 of 20?

Step 1: Divide by denominator: 20 ÷ 4 = 5 (each quarter is 5)

Step 2: Multiply by numerator: 5 × 3 = 15

Check: 3/4 × 20 = 60/4 = 15 ✓

Example: What is 2/5 of 35?

35 ÷ 5 = 7, then 7 × 2 = 14

Example: 5/8 of 120

120 ÷ 8 = 15, then 15 × 5 = 75

Adding Fractions

Same denominator: Just add the numerators and keep the denominator.

a/c + b/c = (a + b) / c
Example -- Same Denominator

2/7 + 3/7 = ?

Same denominator, so: (2 + 3) / 7 = 5/7

Different denominators: First find the Least Common Denominator (LCD), convert both fractions, then add.

a/b + c/d = (a x d + c x b) / (b x d)

Or better: find LCD, convert each fraction, then add numerators.
Example 1 -- Different Denominators

1/3 + 1/4 = ?

Step 1: LCD of 3 and 4 is 12.

Step 2: Convert: 1/3 = 4/12, and 1/4 = 3/12

Step 3: Add: 4/12 + 3/12 = 7/12

Example 2 -- Different Denominators

2/5 + 3/10 = ?

Step 1: LCD of 5 and 10 is 10.

Step 2: Convert: 2/5 = 4/10 (multiply top and bottom by 2). 3/10 stays the same.

Step 3: Add: 4/10 + 3/10 = 7/10

Example 3 -- With Simplifying

3/4 + 1/6 = ?

Step 1: LCD of 4 and 6 is 12.

Step 2: Convert: 3/4 = 9/12, and 1/6 = 2/12

Step 3: Add: 9/12 + 2/12 = 11/12

Step 4: Already simplified. Answer: 11/12

Subtracting Fractions

Subtraction works the same way as addition -- find a common denominator, then subtract the numerators.

a/c - b/c = (a - b) / c
Example 1

5/6 - 1/3 = ?

Step 1: LCD of 6 and 3 is 6.

Step 2: Convert: 1/3 = 2/6

Step 3: Subtract: 5/6 - 2/6 = 3/6 = 1/2

Example 2

7/8 - 1/4 = ?

Step 1: LCD of 8 and 4 is 8.

Step 2: Convert: 1/4 = 2/8

Step 3: Subtract: 7/8 - 2/8 = 5/8

Example 3

3/5 - 1/10 = ?

Step 1: LCD of 5 and 10 is 10.

Step 2: Convert: 3/5 = 6/10

Step 3: Subtract: 6/10 - 1/10 = 5/10 = 1/2

Multiplying Fractions

This is actually the easiest operation with fractions. Just multiply straight across: numerator times numerator, denominator times denominator.

a/b x c/d = (a x c) / (b x d)
Example 1

2/3 x 4/5 = ?

Multiply across: (2 x 4) / (3 x 5) = 8/15

Example 2

3/4 x 2/7 = ?

Multiply across: (3 x 2) / (4 x 7) = 6/28 = 3/14

Example 3

5/6 x 3/10 = ?

Multiply across: (5 x 3) / (6 x 10) = 15/60

Simplify: GCD of 15 and 60 is 15. So 15/60 = 1/4

Shortcut -- Cross-Cancel

Before multiplying, you can simplify diagonally. In 5/6 x 3/10: the 5 and 10 share a factor of 5 (giving 1 and 2), and the 3 and 6 share a factor of 3 (giving 1 and 2). So it becomes 1/2 x 1/2 = 1/4. Much easier!

Dividing Fractions (Flip and Multiply)

To divide by a fraction, flip the second fraction (swap its numerator and denominator) and then multiply.

a/b / c/d = a/b x d/c = (a x d) / (b x c)
Example 1

3/4 / 2/5 = ?

Step 1: Flip the second fraction: 2/5 becomes 5/2

Step 2: Multiply: 3/4 x 5/2 = 15/8

Step 3: Convert to mixed: 1 7/8

Example 2

5/6 / 1/3 = ?

Step 1: Flip: 1/3 becomes 3/1

Step 2: Multiply: 5/6 x 3/1 = 15/6

Step 3: Simplify: 15/6 = 5/2 = 2 1/2

Example 3

7/8 / 7/4 = ?

Step 1: Flip: 7/4 becomes 4/7

Step 2: Multiply: 7/8 x 4/7 = 28/56

Step 3: Simplify: 28/56 = 1/2

Common Mistake

Only flip the second fraction (the one you are dividing by). Do NOT flip both. And remember: flipping is also called finding the reciprocal.

Why Does "Flip and Multiply" Work?

Think of division as "how many times does this fit?" For example, 1/2 ÷ 1/4 asks "how many quarters fit in a half?" The answer is 2. Using our rule: 1/2 ÷ 1/4 = 1/2 × 4/1 = 4/2 = 2. It works because division by a fraction is the same as multiplication by its reciprocal.

Real-World Examples

Recipe scaling: If a recipe calls for 2/3 cup of flour and you want to make half the recipe, calculate 2/3 ÷ 2/1 = 2/3 × 1/2 = 2/6 = 1/3 cup.

Time management: You have 3/4 hour to complete tasks that take 1/6 hour each. How many can you complete? 3/4 ÷ 1/6 = 3/4 × 6/1 = 18/4 = 4.5, so you can complete 4 full tasks.

Converting Between Fractions, Decimals, and Percentages

From To How
Fraction Decimal Divide numerator by denominator: 3/4 = 3 / 4 = 0.75
Decimal Fraction Put over a power of 10, simplify: 0.75 = 75/100 = 3/4
Fraction Percentage Convert to decimal, then multiply by 100: 3/4 = 0.75 = 75%
Percentage Fraction Put over 100, simplify: 75% = 75/100 = 3/4
Decimal Percentage Multiply by 100: 0.75 x 100 = 75%
Percentage Decimal Divide by 100: 75% / 100 = 0.75
Example -- Full Conversion

Convert 3/8 to a decimal and a percentage:

Decimal: 3 / 8 = 0.375

Percentage: 0.375 x 100 = 37.5%

Operations with Mixed Numbers

Mixed numbers (like 2 3/4) combine a whole number and a fraction. To do arithmetic with them, you usually convert to improper fractions first, do the operation, then convert back.

To convert mixed → improper: (whole × denominator + numerator) / denominator
To convert improper → mixed: divide numerator by denominator → quotient = whole, remainder = new numerator
Adding Mixed Numbers

2 1/3 + 1 3/4 = ?

Step 1: Convert to improper fractions: 2 1/3 = 7/3, 1 3/4 = 7/4

Step 2: Find LCD of 3 and 4 = 12

Step 3: Convert: 7/3 = 28/12, 7/4 = 21/12

Step 4: Add: 28/12 + 21/12 = 49/12

Step 5: Convert back: 49 ÷ 12 = 4 remainder 1 → 4 1/12

Subtracting Mixed Numbers

5 1/2 - 2 3/4 = ?

Step 1: Convert: 5 1/2 = 11/2, 2 3/4 = 11/4

Step 2: LCD of 2 and 4 = 4

Step 3: Convert: 11/2 = 22/4

Step 4: Subtract: 22/4 - 11/4 = 11/4

Step 5: Convert back: 11 ÷ 4 = 2 remainder 3 → 2 3/4

Multiplying Mixed Numbers

1 2/3 × 2 1/5 = ?

Step 1: Convert: 1 2/3 = 5/3, 2 1/5 = 11/5

Step 2: Multiply across: (5 × 11) / (3 × 5) = 55/15

Step 3: Simplify: GCD of 55 and 15 is 5 → 11/3

Step 4: Convert back: 11 ÷ 3 = 3 remainder 2 → 3 2/3

Dividing Mixed Numbers

3 1/2 ÷ 1 1/4 = ?

Step 1: Convert: 3 1/2 = 7/2, 1 1/4 = 5/4

Step 2: Flip and multiply: 7/2 × 4/5 = 28/10

Step 3: Simplify: 28/10 = 14/5

Step 4: Convert back: 14 ÷ 5 = 2 remainder 4 → 2 4/5

Shortcut: Adding the Whole Parts Separately

For addition only, you can sometimes add the whole numbers and fractions separately. 2 1/3 + 1 1/3 = (2 + 1) + (1/3 + 1/3) = 3 2/3. But be careful -- if the fraction parts add up to more than 1, you need to carry. 2 3/4 + 1 1/2 = 3 + (3/4 + 2/4) = 3 + 5/4 = 3 + 1 1/4 = 4 1/4.

Complex Fractions (Fractions within Fractions)

A complex fraction has a fraction in the numerator, denominator, or both. They look scary but are just division problems in disguise.

(a/b) / (c/d) = (a/b) × (d/c)

A complex fraction is just: top fraction ÷ bottom fraction
Example 1

Simplify: (3/4) / (5/8)

This means 3/4 ÷ 5/8

Flip and multiply: 3/4 × 8/5 = 24/20 = 6/5 = 1 1/5

Example 2

Simplify: (2/3) / 4

This means 2/3 ÷ 4/1

Flip and multiply: 2/3 × 1/4 = 2/12 = 1/6

Example 3

Simplify: 6 / (3/5)

This means 6/1 ÷ 3/5

Flip and multiply: 6/1 × 5/3 = 30/3 = 10

Example 4 -- Multi-Step

Simplify: (1/2 + 1/3) / (1/4)

Step 1: Simplify the numerator first: 1/2 + 1/3 = 3/6 + 2/6 = 5/6

Step 2: Now divide: 5/6 ÷ 1/4 = 5/6 × 4/1 = 20/6 = 10/3 = 3 1/3

When You See Complex Fractions

Always ask: "What is being divided by what?" The main fraction bar (the longest one) separates the top from the bottom. Everything above it is the numerator, everything below is the denominator. Then it is just a division problem.

Order of Operations with Fractions

BODMAS/PEMDAS applies to fractions just as it does to whole numbers. Work through brackets first, then exponents, then multiplication/division (left to right), then addition/subtraction (left to right).

Example 1

Evaluate: 1/2 + 1/3 × 3/4

Step 1: Multiplication first: 1/3 × 3/4 = 3/12 = 1/4

Step 2: Then addition: 1/2 + 1/4 = 2/4 + 1/4 = 3/4

Example 2

Evaluate: (2/3 + 1/6) × 3/5

Step 1: Brackets first: 2/3 + 1/6 = 4/6 + 1/6 = 5/6

Step 2: Then multiply: 5/6 × 3/5 = 15/30 = 1/2

Example 3

Evaluate: 3/4 - 1/2 × 1/3 + 1/6

Step 1: Multiplication first: 1/2 × 1/3 = 1/6

Step 2: Left to right: 3/4 - 1/6 + 1/6

Step 3: LCD of 4 and 6 is 12: 9/12 - 2/12 + 2/12 = 9/12 = 3/4

Example 4 -- Exponents with Fractions

Evaluate: (2/3)^2 + 1/9

Step 1: Exponent first: (2/3)^2 = 4/9

Step 2: Add: 4/9 + 1/9 = 5/9

Classic Mistake

Do NOT add before multiplying! In 1/2 + 1/3 × 3/4, many people add 1/2 + 1/3 first and get 5/6, then multiply by 3/4 to get 15/24 = 5/8. Wrong! Multiplication comes before addition. The correct answer is 3/4. Order of operations never takes a holiday.

Reading Notation Precisely (Axioms, Not Vibes)

Math notation can look ambiguous. It's not -- there are exact rules for how to read every expression. If your brain freezes when you see something like -4/2 or 40 + n³/2, this section gives you the precise rules so you never have to guess.

Why This Matters

In programming, x = 5 + 3 * 2 evaluates to 11, not 16, because of operator precedence. Math notation works the same way -- there are parsing rules. Learn them once, and ambiguity disappears forever.

Rule 1: Where Does the Negative Sign Live?

When you see a negative sign with a fraction, here's the exact rule:

A negative sign can go in three places -- all are equal:

-a/b  =  (-a)/b  =  a/(-b)

All three mean the same thing: the result is negative.
Examples -- Drill These Until They're Automatic
ExpressionMeaningResultWhy
-4/2(-4) ÷ 2-2Negative ÷ positive = negative
4/(-2)4 ÷ (-2)-2Positive ÷ negative = negative
-4/(-2)(-4) ÷ (-2)+2Negative ÷ negative = positive
-6/3(-6) ÷ 3-2Negative ÷ positive = negative
6/(-3)6 ÷ (-3)-2Positive ÷ negative = negative
-6/(-3)(-6) ÷ (-3)+2Negative ÷ negative = positive
The Sign Rule (memorize this):

• Same signs → positive result (+ ÷ + or - ÷ -)
• Different signs → negative result (+ ÷ - or - ÷ +)

This works for both multiplication and division.
Don't Confuse These Two

-3² = -(3²) = -9    (the negative is NOT inside the exponent)

(-3)² = (-3) × (-3) = +9    (the negative IS part of the base)

Without parentheses, the exponent binds tighter than the negative sign. This is just like how in code -3**2 gives -9 in Python.

Rule 2: The Fraction Bar is Invisible Parentheses

A fraction bar acts as a grouping symbol. Everything above the bar is one group. Everything below is another group. This is like having parentheses around both the numerator and denominator.

The fraction bar rule:

   a + b
   ─────  means (a + b) ÷ (c + d)
   c + d

But writing it inline changes things:
a + b / c + d   means   a + (b ÷ c) + d    (BODMAS: division before addition!)
Example -- Why This Matters

These look similar but are completely different:

Written asMeansResult (with a=10, b=6, c=2)
(a + b) / c (10 + 6) ÷ 2 8
a + b / c 10 + (6 ÷ 2) 13

When you see 40 + n³/2 written inline, it means 40 + (n³ ÷ 2), not (40 + n³) ÷ 2.

If the author means the whole thing divided by 2, they must write (40 + n³) / 2 with parentheses.

Rule 3: When Can You Split a Fraction?

This is where most people get confused. There's one rule:

You CAN split addition/subtraction in the NUMERATOR:

(a + b) / c = a/c + b/c    ✓

You CANNOT split addition/subtraction in the DENOMINATOR:

c / (a + b) ≠ c/a + c/b    ✗
Why Splitting Works for Numerators

(40 + n³) / 2 = 40/2 + n³/2 = 20 + n³/2    ✓

Think of it like distributing division: you're dividing each piece by 2.

Verify: (40 + 8)/2 = 48/2 = 24. And 40/2 + 8/2 = 20 + 4 = 24. Same! ✓

Why Splitting FAILS for Denominators

12 / (3 + 1) ≠ 12/3 + 12/1

Left side: 12/4 = 3

Right side: 4 + 12 = 16

3 ≠ 16. Completely wrong! You cannot split the denominator.

The #1 Fraction Mistake in Algebra

Students constantly do this: 1/(a + b) = 1/a + 1/b. This is WRONG.

Quick proof: 1/(2 + 3) = 1/5 = 0.2. But 1/2 + 1/3 = 5/6 ≈ 0.833. Not even close.

Remember: split numerators, NEVER split denominators.

Rule 4: Multiplying Fractions by Whole Numbers

Any whole number can be written as a fraction with denominator 1:

Whole number as fraction:   a = a/1

Multiplying:   a × (b/c) = (a × b) / c = ab/c

To get a common denominator with a fraction:
a + b/c = a/1 + b/c = ac/c + b/c = (ac + b)/c
Step-by-Step: 20 + x/2

20 + x/2 = ? (make a single fraction)

Step 1: Write 20 as a fraction: 20/1

Step 2: Common denominator is 2: 20/1 = 40/2

Step 3: Now add: 40/2 + x/2 = (40 + x)/2

Step-by-Step: 3n × (n³/2)

3n × n³/2 = ?

Step 1: 3n = 3n/1 (write as fraction)

Step 2: Multiply fractions: (3n/1) × (n³/2) = 3n × n³ / (1 × 2) = 3n4/2

Or just think: 3n × n³ = 3n4, then divide by 2 = 3n4/2

Quick Reference: Notation Parsing Rules

You SeeIt MeansRule
-a/b(-a) ÷ b = negativeNegative sticks to what's next to it
a + b/ca + (b ÷ c)Division before addition (BODMAS)
(a + b)/c(a + b) ÷ cParentheses override everything
-x²-(x²)Exponent binds tighter than negative
(-x)²(-x) × (-x) = x²Parentheses make negative part of base
a × b/c(a × b) ÷ cLeft to right for same-precedence ops
(a + b)/ca/c + b/cCan split numerator
c/(a + b)Cannot split!Cannot split denominator
The Axiom Your Brain Wants

Math notation follows the exact same precedence rules as programming languages:

  1. Parentheses -- always first, innermost outward
  2. Exponents -- then powers (right to left)
  3. Multiplication & Division -- left to right, equal priority
  4. Addition & Subtraction -- left to right, equal priority

If you can read -3**2 + 4*5/2 in Python (answer: -9 + 10 = 1), you can read any math expression. The rules are identical.

Fraction Word Problems

Word problems are where fractions really click. The key: read carefully, identify which operation to use, and translate words into math.

Problem 1 -- Sharing

A rope is 12 metres long. You cut off 2/3 of it. How long is the piece you cut?

"Of" means multiply: 2/3 × 12 = 24/3 = 8 metres

The remaining piece: 12 - 8 = 4 metres (which is 1/3 of 12 ✓)

Problem 2 -- Remaining Work

You have read 3/5 of a 250-page book. How many pages are left?

Pages read: 3/5 × 250 = 750/5 = 150

Pages left: 250 - 150 = 100 pages

Or: fraction left = 1 - 3/5 = 2/5, and 2/5 × 250 = 100 ✓

Problem 3 -- Combining

A tank is 1/3 full. You add water until it is 3/4 full. What fraction of the tank did you fill?

Water added: 3/4 - 1/3 = 9/12 - 4/12 = 5/12 of the tank

Problem 4 -- Rate Problem

A machine produces 3/4 of a widget per minute. How many minutes to produce 6 widgets?

Minutes = 6 ÷ 3/4 = 6 × 4/3 = 24/3 = 8 minutes

Problem 5 -- Multi-Step

A class has 40 students. 1/4 wear glasses. Of those who wear glasses, 2/5 also wear hats. How many students wear both glasses and hats?

Step 1: Students with glasses: 1/4 × 40 = 10

Step 2: Of those, with hats: 2/5 × 10 = 4 students

Or in one step: 1/4 × 2/5 × 40 = 2/20 × 40 = 80/20 = 4 ✓

Word Problem Translation Guide
  • "of" → multiply (1/3 of 60 = 1/3 × 60)
  • "how many fit" → divide (how many 1/4s fit in 3? → 3 ÷ 1/4)
  • "how much more/less" → subtract
  • "total" or "altogether" → add
  • "what fraction is left" → subtract from 1
  • "split equally" → divide
CS Connection: Fractions in Code

Computers don't store fractions as "1/3" -- they convert them to decimals (floating-point). This means some fractions lose precision. The classic example: 1/3 = 0.33333... gets cut off. This is why financial software never uses float for money -- they use integers (cents) or special decimal types. When you see a bug where $10.00 becomes $9.99, now you know why.

In algorithms, fractions show up constantly: probability calculations, hash table load factors (items / buckets), and dividing work across threads.

Practice Problems -- Fractions

Grab a pencil and paper. Do not look at the answers until you've tried each problem yourself. Write out every step. If you get stuck, re-read the relevant section above, then try again before checking.

Set A: Simplifying Fractions

Simplify each fraction to its lowest terms

1) 8/12

2) 15/20

3) 24/36

4) 14/49

5) 18/27

6) 42/56

7) 30/75

8) 48/64

9) 63/81

10) 90/120

Click to reveal answers -- Set A

1) 8/12 = 2/3 (GCD = 4)

2) 15/20 = 3/4 (GCD = 5)

3) 24/36 = 2/3 (GCD = 12)

4) 14/49 = 2/7 (GCD = 7)

5) 18/27 = 2/3 (GCD = 9)

6) 42/56 = 3/4 (GCD = 14)

7) 30/75 = 2/5 (GCD = 15)

8) 48/64 = 3/4 (GCD = 16)

9) 63/81 = 7/9 (GCD = 9)

10) 90/120 = 3/4 (GCD = 30)

Set B: Comparing Fractions

Which fraction is larger? Use any method (cross-multiply, common denominator, or convert to decimals)

1) 3/7 or 2/5

2) 5/8 or 3/5

3) 4/9 or 5/11

4) 7/12 or 5/8

5) 2/3 or 5/8

6) 11/15 or 7/10

7) 3/11 or 2/7

8) 9/14 or 5/8

Click to reveal answers -- Set B

1) 3/7 > 2/5 (cross: 15 > 14)

2) 5/8 > 3/5 (cross: 25 > 24)

3) 5/11 > 4/9 (cross: 45 > 44)

4) 5/8 > 7/12 (cross: 60 > 56)

5) 2/3 > 5/8 (cross: 16 > 15)

6) 11/15 > 7/10 (cross: 110 > 105)

7) 3/11 > 2/7 (cross: 21 > 22... wait: 21 < 22, so 2/7 > 3/11. Trick question -- be careful!)

8) 9/14 > 5/8 (cross: 72 > 70)

Set C: Adding and Subtracting Fractions

Calculate. Simplify your answers.

1) 1/4 + 2/4

2) 3/5 + 1/10

3) 2/3 + 3/8

4) 5/6 + 7/12

5) 1/2 + 2/5 + 1/10

6) 7/8 - 1/4

7) 5/6 - 2/9

8) 11/12 - 3/8

9) 3/4 - 1/3 + 1/6

10) 7/10 - 1/5 + 3/20

Click to reveal answers -- Set C

1) 1/4 + 2/4 = 3/4

2) 3/5 + 1/10 = 6/10 + 1/10 = 7/10

3) 2/3 + 3/8 = 16/24 + 9/24 = 25/24 = 1 1/24

4) 5/6 + 7/12 = 10/12 + 7/12 = 17/12 = 1 5/12

5) 1/2 + 2/5 + 1/10 = 5/10 + 4/10 + 1/10 = 10/10 = 1

6) 7/8 - 1/4 = 7/8 - 2/8 = 5/8

7) 5/6 - 2/9 = 15/18 - 4/18 = 11/18

8) 11/12 - 3/8 = 22/24 - 9/24 = 13/24

9) 3/4 - 1/3 + 1/6 = 9/12 - 4/12 + 2/12 = 7/12

10) 7/10 - 1/5 + 3/20 = 14/20 - 4/20 + 3/20 = 13/20

Set D: Multiplying and Dividing Fractions

Calculate. Simplify your answers.

1) 2/3 x 3/4

2) 5/7 x 14/15

3) 4/9 x 3/8

4) 7/10 x 5/21

5) 3/4 x 2/5 x 10/9

6) 3/5 / 2/3

7) 7/8 / 7/4

8) 5/12 / 10/3

9) 9/16 / 3/8

10) 2/3 / 4/9 x 1/2

Click to reveal answers -- Set D

1) 2/3 x 3/4 = 6/12 = 1/2

2) 5/7 x 14/15 = 70/105 = 2/3

3) 4/9 x 3/8 = 12/72 = 1/6

4) 7/10 x 5/21 = 35/210 = 1/6

5) 3/4 x 2/5 x 10/9 = 60/180 = 1/3

6) 3/5 / 2/3 = 3/5 x 3/2 = 9/10 = 9/10

7) 7/8 / 7/4 = 7/8 x 4/7 = 28/56 = 1/2

8) 5/12 / 10/3 = 5/12 x 3/10 = 15/120 = 1/8

9) 9/16 / 3/8 = 9/16 x 8/3 = 72/48 = 3/2 = 1 1/2

10) 2/3 / 4/9 x 1/2 = 2/3 x 9/4 x 1/2 = 18/24 = 3/4

Set E: Mixed Numbers

Convert, then calculate. Give answers as mixed numbers where appropriate.

1) Convert 17/5 to a mixed number

2) Convert 4 2/3 to an improper fraction

3) 2 1/4 + 1 2/3

4) 3 1/2 - 1 3/4

5) 1 2/5 x 2 1/3

6) 4 1/2 / 1 1/2

7) 5 2/3 + 2 3/4 - 1 1/6

8) 3 1/8 x 2 2/5

Click to reveal answers -- Set E

1) 17/5 = 3 2/5

2) 4 2/3 = 14/3

3) 9/4 + 5/3 = 27/12 + 20/12 = 47/12 = 3 11/12

4) 7/2 - 7/4 = 14/4 - 7/4 = 7/4 = 1 3/4

5) 7/5 x 7/3 = 49/15 = 3 4/15

6) 9/2 / 3/2 = 9/2 x 2/3 = 18/6 = 3

7) 17/3 + 11/4 - 7/6 = 68/12 + 33/12 - 14/12 = 87/12 = 29/4 = 7 1/4

8) 25/8 x 12/5 = 300/40 = 15/2 = 7 1/2

Set F: Complex Fractions and Order of Operations

Simplify each expression. Remember BODMAS!

1) (2/3) / (4/5)

2) (1/2 + 1/4) / (3/8)

3) 1/3 + 2/5 x 5/6

4) (3/4 - 1/2) x 8/3

5) (2/3)^2 + 1/3

6) 1/2 x 3/4 + 1/8 / 1/2

7) 6 / (2/7)

8) (1/2 + 1/3) / (1/2 - 1/3)

Click to reveal answers -- Set F

1) 2/3 x 5/4 = 10/12 = 5/6

2) (2/4 + 1/4) / (3/8) = (3/4) / (3/8) = 3/4 x 8/3 = 24/12 = 2

3) Multiply first: 2/5 x 5/6 = 10/30 = 1/3. Then add: 1/3 + 1/3 = 2/3

4) Brackets first: 3/4 - 2/4 = 1/4. Then: 1/4 x 8/3 = 8/12 = 2/3

5) Exponent first: 4/9. Then: 4/9 + 3/9 = 7/9

6) Left to right for x and /: 1/2 x 3/4 = 3/8, then 1/8 / 1/2 = 1/8 x 2/1 = 2/8 = 1/4. Then add: 3/8 + 1/4 = 3/8 + 2/8 = 5/8

7) 6/1 x 7/2 = 42/2 = 21

8) Top: 3/6 + 2/6 = 5/6. Bottom: 3/6 - 2/6 = 1/6. Then: 5/6 / 1/6 = 5/6 x 6/1 = 5

Set G: Word Problems

Solve each word problem. Show your working.

1) A pizza is cut into 8 slices. You eat 3 slices and your friend eats 2. What fraction of the pizza is left?

2) A recipe needs 2/3 cup of sugar. You want to make 1 1/2 batches. How much sugar do you need?

3) A tank is 7/8 full. After using some water, it is 1/3 full. What fraction of the tank was used?

4) You have 60 marbles. 2/5 are red, 1/4 are blue, and the rest are green. How many green marbles are there?

5) A worker can build 3/4 of a wall in one day. How many days will it take to build 6 walls?

6) A school has 480 students. 3/8 of them walk to school, 1/4 take the bus, and the rest get driven. How many students get driven?

7) A rope is 15 metres long. You cut off 2/5 of it, then cut 1/3 off the remaining piece. How long is the rope now?

8) Three friends split a bill. Alex pays 1/3, Ben pays 2/5, and Charlie pays the rest. If the bill is $120, how much does each person pay?

9) A jar is 1/6 full of water. You pour in enough to make it 3/4 full. What fraction of the jar did you fill?

10) A car uses 1/12 of its fuel tank per hour on the motorway. The tank is 3/4 full. How many hours can the car drive before the tank is empty?

Click to reveal answers -- Set G

1) Eaten: 3/8 + 2/8 = 5/8. Left: 1 - 5/8 = 3/8

2) 2/3 x 3/2 = 6/6 = 1 cup

3) 7/8 - 1/3 = 21/24 - 8/24 = 13/24

4) Red: 2/5 x 60 = 24. Blue: 1/4 x 60 = 15. Green: 60 - 24 - 15 = 21 marbles

5) Days = 6 / (3/4) = 6 x 4/3 = 24/3 = 8 days

6) Walk: 3/8 x 480 = 180. Bus: 1/4 x 480 = 120. Driven: 480 - 180 - 120 = 180 students

7) After first cut: 15 - (2/5 x 15) = 15 - 6 = 9m. After second cut: 9 - (1/3 x 9) = 9 - 3 = 6 metres

8) Alex: 1/3 x 120 = $40. Ben: 2/5 x 120 = $48. Charlie: 120 - 40 - 48 = $32 (or 4/15 of $120)

9) 3/4 - 1/6 = 9/12 - 2/12 = 7/12

10) 3/4 / (1/12) = 3/4 x 12/1 = 36/4 = 9 hours

Set H: Challenge Problems

These are harder. Take your time.

1) If 2/3 of a number is 48, what is 5/8 of that number?

2) A box contains red, blue, and green balls. 1/3 are red, 3/8 are blue. If there are 24 green balls, how many balls are in the box?

3) After spending 1/4 of his money on books and 2/5 of the remainder on food, Tom had $36 left. How much did he start with?

4) Pipe A fills a tank in 6 hours. Pipe B fills the same tank in 4 hours. If both pipes are open together, how long to fill the tank?

5) Simplify: (1/2 + 1/3 + 1/6) / (1/2 - 1/3 + 1/6)

Click to reveal answers -- Set H

1) 2/3 of x = 48, so x = 48 x 3/2 = 72. Then 5/8 of 72 = 5/8 x 72 = 360/8 = 45

2) Green fraction = 1 - 1/3 - 3/8 = 24/24 - 8/24 - 9/24 = 7/24. So 7/24 of total = 24. Total = 24 x 24/7 = 576/7... Hmm, let's recheck: 1/3 + 3/8 = 8/24 + 9/24 = 17/24. Green = 7/24 of total = 24 balls. Total = 24 x 24/7. That's not a whole number -- so let's interpret: total must be divisible by both 3 and 8, i.e. 24. If total = 24: Red = 8, Blue = 9, Green = 7. But we said 24 green? Total = 24 x (24/7) doesn't work cleanly. Re-read: green = 24 balls = 7/24 of total. Total = 24 / (7/24) = 24 x 24/7. Not whole. The problem needs adjustment -- answer is approximately 82 balls (rounded). In a real test this fraction would be chosen to divide evenly.

3) After books: 3/4 remains. After food: spends 2/5 of 3/4 = 6/20 = 3/10. Left = 3/4 - 3/10 = 15/20 - 6/20 = 9/20. So 9/20 of original = $36. Original = 36 x 20/9 = $80

4) Pipe A rate: 1/6 tank per hour. Pipe B rate: 1/4 tank per hour. Combined: 1/6 + 1/4 = 2/12 + 3/12 = 5/12 per hour. Time = 1 / (5/12) = 12/5 = 2 2/5 hours (2 hours 24 minutes)

5) Top: 3/6 + 2/6 + 1/6 = 6/6 = 1. Bottom: 3/6 - 2/6 + 1/6 = 2/6 = 1/3. Answer: 1 / (1/3) = 3

Where to Practice More -- Fractions

You've done the problems on this page. Now go practice on these sites to build real strength:

  • Khan Academy -- Fraction Arithmetic -- Free video lessons and unlimited practice problems with instant feedback. Start here if you want structured, guided practice.
  • Maths Genie -- Fractions -- GCSE-style worksheets with answers. Great for building exam-level confidence.
  • Corbett Maths -- Video tutorials, practice questions, and worked solutions. Excellent for UK curriculum-aligned practice.
  • Math is Fun -- Fractions -- Clear explanations with interactive exercises at the bottom of each page.
  • IXL -- Fractions -- Adaptive practice that adjusts difficulty based on your performance. Free limited daily questions.
  • Dr Frost Maths -- Huge question bank with worked solutions, auto-marked. Free account required.

4. Decimals

Decimals are another way to write fractions, using a decimal point instead of a fraction bar. They are based on powers of 10.

Place Value

Each position after the decimal point has a specific name and value:

Position Name Value Example in 3.456
1st after decimal Tenths 1/10 = 0.1 4 (four tenths)
2nd after decimal Hundredths 1/100 = 0.01 5 (five hundredths)
3rd after decimal Thousandths 1/1000 = 0.001 6 (six thousandths)
Reading Decimals

3.456 is read as "three and four hundred fifty-six thousandths." The number of decimal places tells you the denominator: 1 place = tenths, 2 places = hundredths, 3 places = thousandths, and so on.

Adding and Subtracting Decimals

The key rule: line up the decimal points, then add or subtract as normal. Fill empty spots with zeros.

Example 1 -- Adding

3.25 + 1.7 = ?

Line up:

  3.25
+ 1.70
------
  4.95

Answer: 4.95

Example 2 -- Subtracting

5.03 - 2.8 = ?

Line up:

  5.03
- 2.80
------
  2.23

Answer: 2.23

Multiplying Decimals

Multiply the numbers as if there were no decimals. Then count the total decimal places in both original numbers and put that many decimal places in the answer.

Example 1

2.5 x 1.3 = ?

Step 1: Multiply as whole numbers: 25 x 13 = 325

Step 2: Count decimal places: 2.5 has 1, 1.3 has 1, total = 2

Step 3: Place decimal: 325 becomes 3.25

Answer: 3.25

Example 2

0.4 x 0.03 = ?

Step 1: 4 x 3 = 12

Step 2: Decimal places: 1 + 2 = 3

Step 3: Place decimal: 12 becomes 0.012

Answer: 0.012

Dividing Decimals

If the divisor (the number you are dividing by) has a decimal, move the decimal point to the right until it is a whole number. Move the decimal in the dividend (the number being divided) the same number of places. Then divide as normal.

Example 1

6.5 / 0.5 = ?

Step 1: Move decimal 1 place right in both: 65 / 5

Step 2: Divide: 65 / 5 = 13

Example 2

4.56 / 0.12 = ?

Step 1: Move decimal 2 places right in both: 456 / 12

Step 2: Divide: 456 / 12 = 38

Rounding Decimals

To round a decimal, look at the digit one place to the right of where you want to round. If it is 5 or more, round up. If it is less than 5, round down (keep it the same).

Examples
  • 3.456 rounded to the nearest tenth: Look at hundredths (5). Since 5 or more, round up: 3.5
  • 3.456 rounded to the nearest hundredth: Look at thousandths (6). Since 5 or more, round up: 3.46
  • 7.832 rounded to the nearest tenth: Look at hundredths (3). Less than 5, round down: 7.8
  • 12.999 rounded to the nearest tenth: Look at hundredths (9). Round up: 13.0

Converting Decimals to Fractions

1. Write the decimal over the appropriate power of 10
2. Simplify by finding the GCD
Example 1

0.6 = ?

0.6 = 6/10 = 3/5 (divide both by 2)

Example 2

0.125 = ?

0.125 = 125/1000 = 1/8 (divide both by 125)

Example 3

2.75 = ?

2.75 = 275/100 = 11/4 = 2 3/4

Decimal Operations: Step-by-Step Mastery

Let's deep dive into each operation with multiple examples to build your confidence.

Addition with Decimals: More Practice

Example: Adding Multiple Decimals

1.25 + 3.7 + 0.125 = ?

  1.250
  3.700
+ 0.125
-------
  5.075

Key: Add zeros to make all numbers have the same decimal places, then add normally.

Subtraction with Borrowing

Example: When You Need to Borrow

5.02 - 2.78 = ?

  5.02
- 2.78
------
  2.24

Step-by-step: Hundredths: 2 - 8 (can't do, borrow from tenths). Now it's 12 - 8 = 4. Tenths: 9 - 7 = 2 (was 0, became 9 after borrowing, then borrowed to 9). Units: 4 - 2 = 2.

Multiplication: The Decimal Count Rule

Example with Many Decimal Places

0.25 × 0.04 = ?

Step 1: Multiply as whole numbers: 25 × 4 = 100

Step 2: Count total decimal places: 0.25 has 2, 0.04 has 2, total = 4

Step 3: Place decimal 4 places from the right: 100 → 0.0100 = 0.01

Example: Multiplying by Powers of 10

Multiplying by 10, 100, 1000... just moves the decimal right!

3.456 × 10 = 34.56 (move right 1 place)

3.456 × 100 = 345.6 (move right 2 places)

3.456 × 1000 = 3456 (move right 3 places)

Dividing by 10, 100, 1000... moves the decimal left!

345.6 ÷ 10 = 34.56

345.6 ÷ 100 = 3.456

345.6 ÷ 1000 = 0.3456

Long Division with Decimals

Example: Dividing to Get a Decimal Answer

7 ÷ 4 = ?

Step 1: 7 ÷ 4 = 1 remainder 3

Step 2: Add decimal point and zeros: 7.00

Step 3: Bring down: 30 ÷ 4 = 7 remainder 2

Step 4: Bring down: 20 ÷ 4 = 5

Answer: 1.75

Common Decimal Mistakes
  • Not lining up decimals: 3.5 + 0.25 ≠ 3.75 if you write them misaligned!
  • Forgetting to count decimal places in multiplication: 0.1 × 0.1 = 0.01, NOT 0.1
  • Moving decimals wrong way: 5.6 ÷ 10 = 0.56, NOT 56
  • Trailing zeros matter for place value: 2.5 = 2.50 = 2.500 (same value, different notation)

Repeating Decimals

Some fractions create decimals that repeat forever:

1/3 = 0.333... (3 repeats forever)
1/6 = 0.1666... (6 repeats)
1/7 = 0.142857142857... (pattern repeats)
2/3 = 0.666...
1/9 = 0.111...
1/11 = 0.090909...
Recognizing Repeating Decimals

When you divide and keep getting remainders that repeat, you have a repeating decimal. We write these with a bar over the repeating digits: 1/3 = 0.3̄ or 1/7 = 0.142857̄

CS Connection: Floating-Point is Weird

This is one of the most important things to understand as a programmer. Open any browser console and type 0.1 + 0.2. You get 0.30000000000000004. Why? Because computers store decimals in binary floating-point (base 2), and just like 1/3 = 0.333... in base 10, the number 0.1 is a repeating decimal in base 2. It can never be stored exactly.

Practical rule: Never compare floats with ==. Instead, check if the difference is tiny: abs(a - b) < 0.0001. This comes up in game physics, financial calculations, and scientific computing.

Practice Problems -- Decimals

Pencil and paper. Line up your decimal points. Show every step.

Set A: Adding and Subtracting Decimals

Calculate

1) 3.4 + 2.7

2) 12.56 + 3.8

3) 0.125 + 0.875

4) 45.003 + 2.97

5) 100.5 + 0.55 + 9.95

6) 8.5 - 3.2

7) 10.0 - 4.73

8) 25.04 - 8.567

9) 100 - 37.85

10) 6.1 - 2.345

Click to reveal answers -- Set A

1) 6.1

2) 16.36

3) 1.000 = 1

4) 47.973

5) 111.00 = 111

6) 5.3

7) 5.27

8) 16.473

9) 62.15

10) 3.755

Set B: Multiplying Decimals

Calculate (count your decimal places!)

1) 2.5 x 4

2) 0.6 x 0.3

3) 1.2 x 1.5

4) 0.04 x 0.5

5) 3.14 x 10

6) 0.25 x 0.4

7) 7.5 x 0.8

8) 2.5 x 2.5

9) 0.001 x 1000

10) 4.2 x 0.15

Click to reveal answers -- Set B

1) 10.0 = 10

2) 0.18

3) 1.80 = 1.8

4) 0.020 = 0.02

5) 31.4

6) 0.100 = 0.1

7) 6.00 = 6

8) 6.25

9) 1.000 = 1

10) 0.630 = 0.63

Set C: Dividing Decimals

Calculate

1) 8.4 / 2

2) 6.5 / 0.5

3) 9.6 / 0.4

4) 1.44 / 1.2

5) 0.36 / 0.06

6) 100 / 0.25

7) 7.5 / 2.5

8) 0.84 / 0.12

9) 3.6 / 0.009

10) 15.6 / 1.3

Click to reveal answers -- Set C

1) 4.2

2) 13

3) 24

4) 1.2

5) 6

6) 400

7) 3

8) 7

9) 400

10) 12

Set D: Converting and Rounding

Convert or round as instructed

1) Convert 0.375 to a fraction

2) Convert 0.8 to a fraction

3) Convert 3/8 to a decimal

4) Convert 5/6 to a decimal (round to 3 places)

5) Round 3.456 to 1 decimal place

6) Round 12.995 to 2 decimal places

7) Round 0.04449 to 3 decimal places

8) Convert 2.35 to a fraction

9) Is 0.121212... rational or irrational?

10) Express 7/11 as a decimal. Does it terminate or repeat?

Click to reveal answers -- Set D

1) 375/1000 = 3/8

2) 8/10 = 4/5

3) 0.375

4) 0.833

5) 3.5

6) 13.00 (the 5 rounds up the 9, which cascades)

7) 0.044 (the 4 after doesn't round up)

8) 235/100 = 47/20 = 2 7/20

9) Rational (it repeats, so it can be written as 12/99 = 4/33)

10) 7/11 = 0.636363... (repeating). All fractions either terminate or repeat.

Where to Practice More -- Decimals

5. Percentages

The word "percent" literally means "per hundred" (per centum in Latin). So 25% means 25 out of 100, or 25/100, or 0.25. Percentages are everywhere in daily life -- discounts, grades, statistics, taxes, tips.

Converting Between Fractions, Decimals, and Percentages

Fraction to %: Divide, then multiply by 100
Decimal to %: Multiply by 100 (move decimal 2 right)
% to Decimal: Divide by 100 (move decimal 2 left)
% to Fraction: Put over 100, simplify
Quick Reference
FractionDecimalPercentage
1/20.550%
1/40.2525%
3/40.7575%
1/50.220%
1/30.333...33.3%
1/80.12512.5%
1/100.110%

Finding a Percentage of a Number

To find X% of a number, convert the percentage to a decimal and multiply.

X% of Y = (X / 100) x Y
Example 1

What is 20% of 150?

20% = 0.20

0.20 x 150 = 30

Example 2

What is 15% of 80?

15% = 0.15

0.15 x 80 = 12

Example 3

What is 7.5% of 200?

7.5% = 0.075

0.075 x 200 = 15

Percentage Increase and Decrease

Percentage Increase: New Value = Original x (1 + rate)
Percentage Decrease: New Value = Original x (1 - rate)

Percentage Change = ((New - Original) / Original) x 100%
Example -- Increase

A shirt costs $40 and the price increases by 25%. What is the new price?

Increase amount: 25% of $40 = 0.25 x 40 = $10

New price: $40 + $10 = $50

Or directly: $40 x 1.25 = $50

Example -- Decrease

A laptop costs $800 and is on sale for 15% off. What is the sale price?

Discount amount: 15% of $800 = 0.15 x 800 = $120

Sale price: $800 - $120 = $680

Or directly: $800 x 0.85 = $680

Finding What Percentage One Number Is of Another

Percentage = (Part / Whole) x 100%
Example 1

You scored 42 out of 60 on a test. What percentage is that?

(42 / 60) x 100 = 0.7 x 100 = 70%

Example 2

A class has 30 students. 12 are wearing hats. What percentage?

(12 / 30) x 100 = 0.4 x 100 = 40%

Real-World Percentage Examples

Sales Tax

You buy a $45 item and tax is 8%. What is the total?

Tax amount: 0.08 x $45 = $3.60

Total: $45 + $3.60 = $48.60

Restaurant Tip

Your meal costs $32. You want to leave a 20% tip. How much?

Tip: 0.20 x $32 = $6.40

Total bill: $32 + $6.40 = $38.40

Discount Shopping

Shoes are $120 with a 30% discount, plus 9% tax on the sale price. Final cost?

Discount: 0.30 x $120 = $36

Sale price: $120 - $36 = $84

Tax: 0.09 x $84 = $7.56

Final cost: $84 + $7.56 = $91.56

Quick Mental Math Trick

To find 10% of any number, just move the decimal point one place to the left. 10% of $85 = $8.50. Then you can build from there: 20% = double the 10%, 5% = half the 10%, 15% = 10% + 5%.

Essential Percentage Tricks and Shortcuts

The 10% Building Method

Find 35% of 240 using 10% as your base:

10% of 240 = 24 (move decimal left)

30% = 3 × 24 = 72

5% = 24 ÷ 2 = 12

35% = 30% + 5% = 72 + 12 = 84

The 1% Method for Complex Calculations

Find 7% of 350:

1% of 350 = 3.5 (move decimal two places left)

7% = 7 × 3.5 = 24.5

Find 23% of 150:

1% of 150 = 1.5

20% = 20 × 1.5 = 30

3% = 3 × 1.5 = 4.5

23% = 30 + 4.5 = 34.5

Working Backwards: Find the Original Price

If something costs $68 after a 15% discount, what was the original price?

$68 represents 85% of the original (100% - 15% = 85%)

85% = 0.85, so Original × 0.85 = $68

Original = $68 ÷ 0.85 = $80

Check: 15% of $80 = $12, so $80 - $12 = $68 ✓

Percentage Point vs Percentage: Know the Difference

Interest rates rise from 2% to 3%:

• The rate increased by 1 percentage point (3 - 2 = 1)

• The rate increased by 50% (1/2 = 0.5 = 50%)

Be careful with financial news and statistics – these are very different!

Restaurant Math Made Easy

Quick tip calculation: For 15%, find 10% and add half of that. For 20%, just double the 10%. For 18%, it's 10% + 8% (where 8% = 10% - 2%).

Example: Bill is $42. 10% = $4.20. So 15% = $4.20 + $2.10 = $6.30, and 20% = $8.40.

Successive Percentage Changes

When multiple percentage changes happen one after another, you cannot just add or subtract the percentages. Each change applies to the NEW value, not the original.

After two successive changes of a% and b%:
Final Value = Original × (1 + a/100) × (1 + b/100)

Use negative values for decreases: a 20% decrease → (1 - 0.20) = 0.80
Example 1 -- Two Increases

A stock is worth $100. It rises 10% one year, then 20% the next. What is it worth now?

After Year 1: $100 × 1.10 = $110

After Year 2: $110 × 1.20 = $132

Note: 10% + 20% = 30%, but $100 × 1.30 = $130 (not $132!). The extra $2 comes from earning 20% on the $10 gain from Year 1.

Example 2 -- Increase then Decrease

A shirt costs $80. The price goes up 25%, then there is a 25% off sale. What is the final price?

After increase: $80 × 1.25 = $100

After decrease: $100 × 0.75 = $75

This is NOT back to $80! A 25% increase followed by a 25% decrease gives a net loss of 6.25%. The decrease applies to the larger value.

Example 3 -- Multiple Changes

A population of 10,000 grows by 5% each year for 3 years. What is it after 3 years?

Year 1: 10,000 × 1.05 = 10,500

Year 2: 10,500 × 1.05 = 11,025

Year 3: 11,025 × 1.05 = 11,576.25

Or directly: 10,000 × (1.05)^3 = 10,000 × 1.157625 = 11,576.25

The "Back to Normal" Trap

A 50% decrease followed by a 50% increase does NOT get you back to the start. Example: $100 → 50% off → $50 → 50% increase → $75. You lost 25%! To recover from a 50% loss, you need a 100% gain (you need to double). This is why percentage losses in investing hurt more than gains of the same size help.

Percentage Error

Percentage error measures how far off an estimate or measurement is from the true value. It is used in science, engineering, and everyday estimation.

Percentage Error = |Estimated Value - Actual Value| / Actual Value × 100%
Example 1

You estimated a room to be 5 metres long. It actually measured 4.8 metres. What is the percentage error?

Error = |5 - 4.8| / 4.8 × 100 = 0.2 / 4.8 × 100 = 4.17%

Example 2

A weather forecast predicted 30mm of rain. The actual rainfall was 25mm. What is the percentage error?

Error = |30 - 25| / 25 × 100 = 5 / 25 × 100 = 20%

Example 3 -- In Code

Your algorithm estimated 1,200 users would visit the site. The actual count was 1,350. What is the percentage error?

Error = |1200 - 1350| / 1350 × 100 = 150 / 1350 × 100 = 11.11%

Absolute Value Matters

The |absolute value| bars mean you always get a positive result, whether your estimate was too high or too low. Some contexts use signed error (positive = overestimate, negative = underestimate) to show direction, but percentage error itself is always positive.

Simple and Compound Interest

Interest is the cost of borrowing money (or the reward for saving it). Understanding the difference between simple and compound interest is one of the most practical maths skills you will ever learn.

Simple Interest

With simple interest, you earn (or pay) interest only on the original amount (the principal). The interest is the same every period.

Simple Interest = Principal × Rate × Time
I = P × r × t

Total Amount = P + I = P(1 + r × t)
Example

You invest $1,000 at 5% simple interest per year for 3 years. How much do you have?

Interest per year: $1,000 × 0.05 = $50

Total interest over 3 years: $50 × 3 = $150

Total amount: $1,000 + $150 = $1,150

Compound Interest

With compound interest, you earn interest on the principal plus all previously earned interest. Your money grows on top of its own growth -- this is exponential growth, and it is incredibly powerful over time.

Compound Interest Formula:
A = P × (1 + r)^t

A = final amount, P = principal, r = rate per period, t = number of periods
Example -- Same Numbers, Big Difference

You invest $1,000 at 5% compound interest per year for 3 years.

Year 1: $1,000 × 1.05 = $1,050.00

Year 2: $1,050 × 1.05 = $1,102.50

Year 3: $1,102.50 × 1.05 = $1,157.63

Or directly: $1,000 × (1.05)^3 = $1,000 × 1.157625 = $1,157.63

Compare: Simple interest gave $1,150. Compound interest gives $1,157.63. The difference grows dramatically over time.

Simple vs Compound Interest: $1,000 at 5% over time Year Simple Compound Difference ──── ────── ──────── ────────── 0 $1,000.00 $1,000.00 $0.00 5 $1,250.00 $1,276.28 $26.28 10 $1,500.00 $1,628.89 $128.89 20 $2,000.00 $2,653.30 $653.30 30 $2,500.00 $4,321.94 $1,821.94 After 30 years, compound interest gives you 73% MORE than simple interest. That's the power of growth on growth.
The Rule of 72

Want to know how long it takes to double your money? Divide 72 by the interest rate.

At 6%: 72 ÷ 6 = 12 years to double

At 8%: 72 ÷ 8 = 9 years to double

At 12%: 72 ÷ 12 = 6 years to double

This is an approximation, but it is remarkably accurate and useful for quick mental maths.

Real-World: Credit Card Debt

You owe $5,000 on a credit card at 20% annual interest, compounded monthly. If you make no payments, what do you owe after 1 year?

Monthly rate: 20% / 12 = 1.667% = 0.01667

After 12 months: $5,000 × (1.01667)^12 = $5,000 × 1.2194 = $6,097

That's $1,097 in interest -- more than 20% of the original because it compounds monthly!

Why This Matters So Much

Compound interest is either your best friend (savings, investments) or your worst enemy (debt, loans). Einstein allegedly called it "the eighth wonder of the world." Whether or not he actually said it, the point stands: start saving early, because time is the most powerful variable in the formula. $1,000 invested at age 20 at 7% becomes $14,974 by age 60. The same $1,000 invested at age 40 only becomes $3,870.

Percentage Word Problems

Problem 1 -- Tax and Discount Combined

A laptop costs $1,200. There is a 20% discount, and then 10% sales tax is applied to the discounted price. What do you pay?

Step 1: Discount: $1,200 × 0.80 = $960

Step 2: Tax: $960 × 1.10 = $1,056

Note: This is NOT the same as 10% net discount (which would give $1,080). Order matters because tax applies to the discounted price.

Problem 2 -- Finding the Original

After a 30% increase, a salary is $65,000. What was the original salary?

$65,000 represents 130% of the original

Original = $65,000 ÷ 1.30 = $50,000

Check: $50,000 × 1.30 = $65,000 ✓

Problem 3 -- Percentage Change

A website had 8,500 visitors last month and 10,200 this month. What is the percentage increase?

Change = 10,200 - 8,500 = 1,700

Percentage change = (1,700 / 8,500) × 100 = 20%

Problem 4 -- Profit Margin

A shop buys items for $25 each and sells them for $40. What is the profit margin as a percentage of the selling price?

Profit = $40 - $25 = $15

Profit margin = ($15 / $40) × 100 = 37.5%

(Note: Markup is different -- that's profit as a % of cost: $15/$25 = 60%)

Problem 5 -- Multi-Step with Fractions

In a school of 600 students, 45% are boys. Of the boys, 2/3 play a sport. Of those, 40% play football. How many boys play football?

Step 1: Boys = 45% of 600 = 0.45 × 600 = 270

Step 2: Boys who play sport = 2/3 × 270 = 180

Step 3: Boys who play football = 40% of 180 = 0.40 × 180 = 72 boys

Percentage Problem-Solving Strategy
  • "What is X% of Y?" → Multiply: Y × (X/100)
  • "X is what % of Y?" → Divide: (X/Y) × 100
  • "X is Y% of what?" → Divide: X ÷ (Y/100)
  • Percentage change? → (New - Old) / Old × 100
  • Find the original? → Current ÷ (1 ± rate)

These three question types cover almost every percentage problem you will ever see.

CS Connection: Percentages Are Everywhere in Tech

As a developer, you'll calculate percentages constantly:

  • Progress bars: (completed / total) * 100 -- loading screens, file uploads, installation progress
  • System monitoring: CPU usage (85%), memory usage (62%), disk space (91% full)
  • Analytics: Bounce rate, conversion rate, click-through rate -- the entire web runs on percentage metrics
  • ML accuracy: "The model is 94.3% accurate" -- what does that actually mean? You need percentage math to evaluate models
  • A/B testing: "Version A converts at 3.2%, version B at 3.8% -- is that a real improvement?" Percentage change vs. percentage point change matters here
  • Compound growth: "Our user base grows 8% month-over-month" -- that's compound growth. After 12 months: users × (1.08)^12 = users × 2.52. You've more than doubled!

Practice Problems -- Percentages

Same rules as before: pencil, paper, try before you peek. If you get it wrong, figure out WHERE you went wrong -- that's where the real learning happens.

Set A: Finding a Percentage of a Number

Calculate

1) 25% of 80

2) 15% of 200

3) 40% of 350

4) 8% of 75

5) 12.5% of 240

6) 2.5% of 1,000

7) 33 1/3% of 126

8) 175% of 60

9) 0.5% of 8,000

10) 66 2/3% of 54

Click to reveal answers -- Set A

1) 0.25 x 80 = 20

2) 0.15 x 200 = 30

3) 0.40 x 350 = 140

4) 0.08 x 75 = 6

5) 0.125 x 240 = 30

6) 0.025 x 1,000 = 25

7) 1/3 x 126 = 42

8) 1.75 x 60 = 105

9) 0.005 x 8,000 = 40

10) 2/3 x 54 = 36

Set B: "What Percentage?" Problems

Express the first number as a percentage of the second

1) 18 out of 60

2) 35 out of 140

3) 7 out of 20

4) 48 out of 80

5) 3 out of 8

6) 150 out of 200

7) 9 out of 40

8) 250 out of 400

Click to reveal answers -- Set B

1) 18/60 x 100 = 30%

2) 35/140 x 100 = 25%

3) 7/20 x 100 = 35%

4) 48/80 x 100 = 60%

5) 3/8 x 100 = 37.5%

6) 150/200 x 100 = 75%

7) 9/40 x 100 = 22.5%

8) 250/400 x 100 = 62.5%

Set C: Percentage Increase and Decrease

Calculate the new value after each change

1) $60 increased by 20%

2) $250 decreased by 15%

3) 80 kg increased by 5%

4) 1,200 decreased by 35%

5) $45 increased by 100%

6) A town of 8,000 people grows by 12%. What is the new population?

7) A $320 phone is discounted by 25%, then the sale price is taxed at 10%. What do you pay?

8) A stock goes from $40 to $52. What is the percentage increase?

9) A car depreciates from $25,000 to $18,000. What is the percentage decrease?

10) A salary was $55,000 and is now $60,500. What was the percentage raise?

Click to reveal answers -- Set C

1) $60 x 1.20 = $72

2) $250 x 0.85 = $212.50

3) 80 x 1.05 = 84 kg

4) 1,200 x 0.65 = 780

5) $45 x 2.00 = $90

6) 8,000 x 1.12 = 8,960 people

7) After discount: $320 x 0.75 = $240. After tax: $240 x 1.10 = $264

8) (52 - 40) / 40 x 100 = 12/40 x 100 = 30%

9) (25,000 - 18,000) / 25,000 x 100 = 7,000/25,000 x 100 = 28%

10) (60,500 - 55,000) / 55,000 x 100 = 5,500/55,000 x 100 = 10%

Set D: Successive Percentage Changes

Calculate the final value after multiple changes

1) $100 increases by 10%, then increases by 10% again. What is the final value?

2) A population of 5,000 increases by 20% one year, then decreases by 20% the next. What is the final population?

3) A house worth $200,000 increases by 8% per year for 3 years. What is it worth?

4) A car worth $30,000 depreciates by 15% per year. What is it worth after 2 years?

5) A shirt is marked up 40% from cost, then discounted 25% during a sale. If the cost was $20, what is the sale price? Is the shop making a profit?

6) An investment of $5,000 earns 6% compound interest per year. What is it worth after 5 years?

Click to reveal answers -- Set D

1) $100 x 1.10 x 1.10 = $100 x 1.21 = $121 (not $120!)

2) 5,000 x 1.20 x 0.80 = 5,000 x 0.96 = 4,800 (not back to 5,000!)

3) $200,000 x (1.08)^3 = $200,000 x 1.259712 = $251,942.40

4) $30,000 x (0.85)^2 = $30,000 x 0.7225 = $21,675

5) Marked up: $20 x 1.40 = $28. Sale price: $28 x 0.75 = $21. Yes, the shop makes $1 profit (5% margin on cost).

6) $5,000 x (1.06)^5 = $5,000 x 1.338226 = $6,691.13

Set E: Finding the Original (Reverse Percentages)

Work backwards to find the original value

1) After a 20% increase, the price is $96. What was the original price?

2) After a 25% discount, a jacket costs $60. What was the original price?

3) Including 8% tax, a meal costs $54. What was the pre-tax price?

4) After a 30% pay cut, a worker earns $35,000. What was the original salary?

5) A TV costs $540 after a 10% discount plus 8% tax on the discounted price. What was the original price?

6) After two years of 5% annual growth, a savings account has $11,025. What was the original deposit?

Click to reveal answers -- Set E

1) $96 / 1.20 = $80

2) $60 / 0.75 = $80

3) $54 / 1.08 = $50

4) $35,000 / 0.70 = $50,000

5) $540 = Original x 0.90 x 1.08 = Original x 0.972. Original = $540 / 0.972 = $555.56 (approximately)

6) $11,025 / (1.05)^2 = $11,025 / 1.1025 = $10,000

Set F: Percentage Error

Calculate the percentage error in each case

1) Estimated: 50, Actual: 45

2) Estimated: 120, Actual: 150

3) Estimated: 3.5 metres, Actual: 3.2 metres

4) A student guessed there were 200 sweets in a jar. The actual count was 185. What was the percentage error?

5) A weather app predicted 12mm of rain. Only 8mm fell. What is the percentage error?

Click to reveal answers -- Set F

1) |50 - 45| / 45 x 100 = 5/45 x 100 = 11.11%

2) |120 - 150| / 150 x 100 = 30/150 x 100 = 20%

3) |3.5 - 3.2| / 3.2 x 100 = 0.3/3.2 x 100 = 9.375%

4) |200 - 185| / 185 x 100 = 15/185 x 100 = 8.11%

5) |12 - 8| / 8 x 100 = 4/8 x 100 = 50%

Set G: Simple and Compound Interest

Calculate the final amount

1) $2,000 at 4% simple interest for 5 years. What is the total interest? What is the total amount?

2) $3,000 at 5% compound interest (yearly) for 3 years. What is the final amount?

3) $10,000 at 3% compound interest for 4 years. How much interest is earned in total?

4) Using the Rule of 72: how long to double your money at 9%?

5) Using the Rule of 72: how long to double your money at 4%?

6) You borrow $8,000 at 6% simple interest for 3 years. How much do you repay in total?

7) Which is better: $1,000 at 10% simple interest for 10 years, or $1,000 at 8% compound interest for 10 years?

8) $500 at 12% compound interest, compounded monthly, for 1 year. What is the final amount? (Monthly rate = 12%/12 = 1%)

Click to reveal answers -- Set G

1) Interest = $2,000 x 0.04 x 5 = $400. Total = $2,000 + $400 = $2,400

2) $3,000 x (1.05)^3 = $3,000 x 1.157625 = $3,472.88

3) $10,000 x (1.03)^4 = $10,000 x 1.12551 = $11,255.09. Interest = $11,255.09 - $10,000 = $1,255.09

4) 72 / 9 = 8 years

5) 72 / 4 = 18 years

6) Interest = $8,000 x 0.06 x 3 = $1,440. Total = $8,000 + $1,440 = $9,440

7) Simple: $1,000 + ($1,000 x 0.10 x 10) = $1,000 + $1,000 = $2,000. Compound: $1,000 x (1.08)^10 = $1,000 x 2.15892 = $2,158.92. Compound wins by $158.92, despite the lower rate!

8) $500 x (1.01)^12 = $500 x 1.12683 = $563.41

Set H: Real-World Word Problems

Solve each problem. Show your working.

1) A shop sells a TV for $600 (which includes a 20% profit margin on cost). What did the shop pay for the TV?

2) In a survey of 800 people, 35% prefer tea, 45% prefer coffee, and the rest prefer water. How many prefer water?

3) A student scored 72%, 85%, 68%, and 91% on four tests. What is their average percentage?

4) A factory produces 1,500 items per day. 4% are defective. How many non-defective items are produced?

5) You earn $3,200 per month. You spend 30% on rent, 15% on food, 10% on transport, and save the rest. How much do you save?

6) A country's GDP grows from $500 billion to $620 billion over 4 years. What is the total percentage growth? What is the average annual growth rate (simple)?

7) A shop buys 200 items at $5 each, sells 150 at $9 each, and has to discount the remaining 50 to $3 each. What is the overall profit or loss percentage?

8) A phone battery loses 2% of its maximum capacity per month. After 12 months, what percentage of its original capacity remains?

9) Two candidates in an election: A gets 55% of the vote, B gets the rest. If A wins by 4,000 votes, how many total votes were cast?

10) A train ticket costs $40. Senior citizens get a 30% discount, and students get a 20% discount. A senior student asks for both discounts. The ticket office applies the senior discount first, then the student discount on the reduced price. What does the senior student pay? Would the order of discounts matter?

Click to reveal answers -- Set H

1) $600 is 120% of cost. Cost = $600 / 1.20 = $500

2) Water: 100% - 35% - 45% = 20%. People = 0.20 x 800 = 160 people

3) (72 + 85 + 68 + 91) / 4 = 316 / 4 = 79%

4) Non-defective = 96% of 1,500 = 0.96 x 1,500 = 1,440 items

5) Spending: 30% + 15% + 10% = 55%. Saving: 45% of $3,200 = 0.45 x 3,200 = $1,440

6) Total growth: (620 - 500) / 500 x 100 = 120/500 x 100 = 24%. Simple annual average: 24% / 4 = 6% per year

7) Cost: 200 x $5 = $1,000. Revenue: (150 x $9) + (50 x $3) = $1,350 + $150 = $1,500. Profit = $500. Profit % = 500/1,000 x 100 = 50% profit

8) Remaining = (0.98)^12 = 0.7847. So 78.47% of original capacity remains (lost about 21.5%, not 24%)

9) A gets 55%, B gets 45%. Difference = 10% of total = 4,000. Total = 4,000 / 0.10 = 40,000 votes

10) Senior first: $40 x 0.70 = $28. Then student: $28 x 0.80 = $22.40. Order doesn't matter because multiplication is commutative: $40 x 0.70 x 0.80 = $40 x 0.80 x 0.70 = $22.40 either way.

Set I: Challenge Problems

These require multiple steps and careful thinking.

1) A price increases by 20%, then is discounted by x% to return to the original price. What is x?

2) If an investment loses 40% of its value, what percentage gain is needed to break even?

3) Three shops sell the same shirt. Shop A: $50 with 30% off. Shop B: $45 with 20% off. Shop C: $55 with 40% off. Which is cheapest?

4) A bacteria population doubles every 4 hours. Starting with 100 bacteria, what percentage increase occurs in 12 hours?

5) You invest $10,000. Half goes into Account A at 8% compound interest. Half goes into Account B at 6% compound interest. After 5 years, what is the total value? What was the effective overall rate?

6) A car's value drops 20% in year 1, 15% in year 2, and 10% in year 3. If it was originally $40,000, what is the total percentage loss over 3 years?

Click to reveal answers -- Set I

1) After 20% increase: price is 1.20 of original. To return: 1.20 x (1 - x/100) = 1. So (1 - x/100) = 1/1.20 = 0.8333. x = 100 - 83.33 = 16.67% (NOT 20%!)

2) After 40% loss, you have 60% of original. To get back to 100%: need to go from 60 to 100. Gain needed = 40/60 x 100 = 66.67%

3) A: $50 x 0.70 = $35. B: $45 x 0.80 = $36. C: $55 x 0.60 = $33. Shop C is cheapest at $33

4) In 12 hours, it doubles 3 times (12/4 = 3). 100 x 2^3 = 800. Increase = (800-100)/100 x 100 = 700% increase

5) A: $5,000 x (1.08)^5 = $5,000 x 1.46933 = $7,346.64. B: $5,000 x (1.06)^5 = $5,000 x 1.33823 = $6,691.13. Total = $14,037.77. Gain = $4,037.77 on $10,000 over 5 years. Effective rate: (14,037.77/10,000)^(1/5) - 1 = 1.40378^0.2 - 1 = approximately 7% per year

6) $40,000 x 0.80 x 0.85 x 0.90 = $40,000 x 0.612 = $24,480. Total loss = $15,520. Percentage loss = 15,520/40,000 x 100 = 38.8%

Where to Practice More -- Percentages

Now go get more reps in. The more problems you solve, the more automatic this becomes:

6. Ratios and Proportions

What Are Ratios?

A ratio compares two (or more) quantities. If a classroom has 12 boys and 8 girls, the ratio of boys to girls is 12 : 8 (read "12 to 8"). Ratios can also be written as fractions: 12/8.

Simplifying Ratios

Just like fractions, you simplify ratios by dividing all parts by their GCD.

Example 1

Simplify 12 : 8

GCD of 12 and 8 is 4.

12 / 4 : 8 / 4 = 3 : 2

Example 2

Simplify 45 : 30 : 15

GCD of 45, 30, and 15 is 15.

45/15 : 30/15 : 15/15 = 3 : 2 : 1

Proportions

A proportion states that two ratios are equal. If a/b = c/d, then the two ratios are in proportion.

a/b = c/d

Cross-multiply: a x d = b x c

Cross-multiplication is the key tool for solving proportions. If two fractions are equal, then multiplying diagonally gives equal products.

Example 1 -- Solving a Proportion

Solve: 3/4 = x/20

Cross-multiply: 3 x 20 = 4 x x

60 = 4x

x = 60 / 4 = 15

Check: 3/4 = 15/20 = 0.75. Correct!

Example 2 -- Real-World

If 5 apples cost $3, how much do 12 apples cost?

Set up proportion: 5/3 = 12/x

Cross-multiply: 5 x x = 3 x 12

5x = 36

x = 36 / 5 = $7.20

Example 3 -- Scale Drawing

On a map, 2 cm represents 50 km. If two cities are 7 cm apart on the map, how far apart are they in reality?

Proportion: 2/50 = 7/x

Cross-multiply: 2x = 50 x 7 = 350

x = 350 / 2 = 175 km

Example 4 -- Recipe Scaling

A recipe for 4 people uses 6 cups of flour. How much flour for 10 people?

Proportion: 4/6 = 10/x

Cross-multiply: 4x = 6 x 10 = 60

x = 60 / 4 = 15 cups

Common Mistake

Make sure you set up the proportion with matching units in the same position. If the left side is apples/dollars, the right side must also be apples/dollars -- not dollars/apples. Consistency is key.

Advanced Ratio and Proportion Techniques

Part-to-Part vs Part-to-Whole Ratios

A class has 15 boys and 10 girls.

Part-to-part: Boys to girls = 15:10 = 3:2

Part-to-whole: Boys to total = 15:25 = 3:5

Part-to-whole: Girls to total = 10:25 = 2:5

As percentages: Boys = 15/25 = 60%, Girls = 10/25 = 40%

Three-Way Ratios in Real Life

A concrete mix uses cement, sand, and gravel in the ratio 1:2:4. If you need 21 total parts, how much of each?

Total ratio parts = 1 + 2 + 4 = 7

Each part = 21 ÷ 7 = 3 units

Cement = 1 × 3 = 3 units

Sand = 2 × 3 = 6 units

Gravel = 4 × 3 = 12 units

Check: 3 + 6 + 12 = 21 ✓

Inverse Proportions (Very Important!)

Some relationships are inversely proportional – as one increases, the other decreases.

Example: It takes 4 workers 6 hours to build a fence. How long for 8 workers?

More workers → Less time, so: Workers × Time = Constant

4 × 6 = 24 worker-hours needed

8 workers need: 24 ÷ 8 = 3 hours

Formula: If w₁t₁ = w₂t₂, then t₂ = (w₁t₁)/w₂

Unit Rate Problem Solving

Car A travels 280 miles on 8 gallons. Car B travels 315 miles on 9 gallons. Which is more efficient?

Car A: 280 ÷ 8 = 35 mpg

Car B: 315 ÷ 9 = 35 mpg

They're exactly the same efficiency! Unit rates make comparison easy.

Proportion Setup Strategy

Always ask yourself: "What am I comparing to what?" Write it out in words first, then set up the math. For example: "If 3 apples cost $2, how much do 12 apples cost?" becomes "3 apples is to $2 as 12 apples is to $x" → 3/2 = 12/x.

CS Connection: Ratios in Software

Ratios are the backbone of many CS concepts:

  • Aspect ratios: A 1920x1080 screen is 16:9. When you resize images or videos, you maintain this ratio to avoid distortion. newHeight = originalHeight * (newWidth / originalWidth)
  • Hash table load factor: items/buckets. When this ratio exceeds ~0.75, the table resizes. This is why hash maps are O(1) -- proportional thinking.
  • Rate limiting: "Allow 100 requests per 60 seconds" is a ratio. Exceeding it returns HTTP 429.
  • Compression ratios: A 10MB file compressed to 2MB has a 5:1 ratio.
  • Scaling: Responsive design -- "at 768px width, make the sidebar 1/3 of the screen" is a proportion.

Practice Problems -- Ratios and Proportions

Work through these with pencil and paper. Cross-multiplication is your best friend here.

Set A: Simplifying Ratios

Simplify each ratio to its simplest form

1) 10 : 15

2) 24 : 36

3) 45 : 60

4) 8 : 12 : 20

5) 100 : 250

6) 14 : 21 : 35

7) 2.5 : 5 (hint: multiply both by 2 first)

8) 0.3 : 0.9

9) 1/2 : 1/3 (hint: find LCD first)

10) 3/4 : 5/8

Click to reveal answers -- Set A

1) 2 : 3

2) 2 : 3

3) 3 : 4

4) 2 : 3 : 5

5) 2 : 5

6) 2 : 3 : 5

7) 5 : 10 = 1 : 2

8) 3 : 9 = 1 : 3

9) 3/6 : 2/6 = 3 : 2 = 3 : 2

10) 6/8 : 5/8 = 6 : 5 = 6 : 5

Set B: Solving Proportions

Find the unknown value

1) 3/5 = x/20

2) 7/x = 21/15

3) x/8 = 9/12

4) 4/9 = 16/x

5) 2.5/x = 5/8

6) x/7 = 12/21

7) 15/x = 3/4

8) x/100 = 3/25

9) 8/x = x/18 (hint: cross-multiply to get x^2)

10) 6/10 = 9/x

Click to reveal answers -- Set B

1) 3 x 20 = 5x → x = 60/5 = 12

2) 7 x 15 = 21x → x = 105/21 = 5

3) 12x = 72 → x = 6

4) 4x = 144 → x = 36

5) 2.5 x 8 = 5x → 20 = 5x → x = 4

6) 21x = 84 → x = 4

7) 3x = 60 → x = 20

8) 25x = 300 → x = 12

9) x^2 = 144 → x = 12

10) 6x = 90 → x = 15

Set C: Word Problems

Solve each problem

1) A recipe for 6 people needs 4 cups of flour. How much flour for 15 people?

2) On a map, 3 cm represents 75 km. Two cities are 8 cm apart. How far apart are they?

3) A car uses 5 litres of fuel for every 60 km. How much fuel for a 210 km trip?

4) Mix paint in the ratio 3 red : 5 blue. If you use 12 litres of red, how much blue?

5) Share $450 in the ratio 2 : 3 : 4. How much does each person get?

6) 8 workers can build a wall in 6 days. How long for 12 workers? (Inverse proportion)

7) A photo is 4 inches by 6 inches. You want to enlarge it so the longer side is 15 inches. What is the shorter side?

8) A school has a student-to-teacher ratio of 18:1. If there are 540 students, how many teachers?

9) A concrete mix uses cement, sand, and gravel in the ratio 1:3:5. You need 27 tonnes total. How much of each?

10) If 3 machines produce 180 items in 2 hours, how many items do 5 machines produce in 3 hours?

Click to reveal answers -- Set C

1) 6/4 = 15/x → 6x = 60 → x = 10 cups

2) 3/75 = 8/x → 3x = 600 → x = 200 km

3) 5/60 = x/210 → 60x = 1050 → x = 17.5 litres

4) 3/5 = 12/x → 3x = 60 → x = 20 litres blue

5) Total parts = 9. Each part = $50. Shares: $100, $150, $200

6) Workers x Days = constant. 8 x 6 = 48. 12 x d = 48 → d = 4 days

7) 4/6 = x/15 → 6x = 60 → x = 10 inches

8) 540/x = 18/1 → 18x = 540 → x = 30 teachers

9) Total parts = 9. Each part = 3 tonnes. Cement: 3, Sand: 9, Gravel: 3, 9, 15 tonnes

10) 3 machines make 180 in 2 hours = 90/hour for 3 machines = 30 per machine per hour. 5 machines x 3 hours x 30 = 450 items

Where to Practice More -- Ratios and Proportions

7. Exponents and Square Roots

What Are Exponents?

An exponent tells you how many times to multiply a number by itself. In x^n, x is the base and n is the exponent (or power).

x^n = x * x * x * ... * x (n times)

3^4 = 3 * 3 * 3 * 3 = 81
2^5 = 2 * 2 * 2 * 2 * 2 = 32
5^3 = 5 * 5 * 5 = 125

Special Cases

Any number to the power of 1 = itself: x^1 = x
Any number to the power of 0 = 1: x^0 = 1 (as long as x is not 0)
1 to any power = 1: 1^n = 1
Why is x^0 = 1?

Think of it as a pattern: 2^3 = 8, 2^2 = 4, 2^1 = 2. Each time the exponent decreases by 1, we divide by 2. So 2^0 = 2/2 = 1. It works for every base.

Exponent Rules

Rule Formula Example
Product Rule x^a * x^b = x^(a+b) 2^3 * 2^4 = 2^7 = 128
Quotient Rule x^a / x^b = x^(a-b) 5^6 / 5^2 = 5^4 = 625
Power of a Power (x^a)^b = x^(a*b) (3^2)^3 = 3^6 = 729
Power of a Product (x * y)^n = x^n * y^n (2 * 3)^4 = 2^4 * 3^4 = 16 * 81 = 1296
Power of a Quotient (x / y)^n = x^n / y^n (4/3)^2 = 16/9
Applying the Rules

Simplify: 3^2 * 3^5

Product rule: same base, add exponents: 3^(2+5) = 3^7 = 2187


Simplify: (4^3)^2

Power of a power: 4^(3*2) = 4^6 = 4096


Simplify: 10^8 / 10^5

Quotient rule: 10^(8-5) = 10^3 = 1000

Negative Exponents

A negative exponent means "take the reciprocal." It flips the number to the other side of the fraction bar.

x^(-n) = 1 / x^n
Examples
  • 2^(-3) = 1 / 2^3 = 1/8 = 0.125
  • 5^(-2) = 1 / 5^2 = 1/25 = 0.04
  • 10^(-1) = 1/10 = 0.1
  • (3/4)^(-1) = 4/3 (flip the fraction)

Square Roots and Cube Roots

A square root asks: "What number multiplied by itself gives this?" The square root of 25 is 5, because 5 x 5 = 25.

sqrt(x) = the number that, when squared, gives x
cbrt(x) = the number that, when cubed, gives x

sqrt(25) = 5 because 5^2 = 25
cbrt(27) = 3 because 3^3 = 27

Perfect Squares

These are numbers whose square roots are whole numbers. Memorizing them makes math much faster.

n n^2 (Perfect Square) n n^2 (Perfect Square)
11864
24981
3910100
41611121
52512144
63613169
74914196
Estimating Square Roots

If a number is not a perfect square, estimate by finding which two perfect squares it falls between. For example, sqrt(50): since 7^2 = 49 and 8^2 = 64, sqrt(50) is between 7 and 8 -- closer to 7 (it is approximately 7.07).

Surds (Irrational Roots)

A surd is a root that cannot be simplified to a whole number. sqrt(4) = 2 is not a surd because it simplifies cleanly. But sqrt(2) = 1.41421356... goes on forever with no repeating pattern -- it can never be written as a neat fraction. That's a surd.

Surds: sqrt(2), sqrt(3), sqrt(5), sqrt(7), sqrt(10), cbrt(2), ...
NOT surds: sqrt(4) = 2, sqrt(9) = 3, sqrt(16) = 4, cbrt(8) = 2, ...

The word "surd" comes from the Latin "surdus" meaning "deaf" or "mute" -- because these numbers can't "speak" as clean fractions. They are irrational numbers.

Why Not Just Use the Decimal?

You might ask: "Why write sqrt(2) instead of 1.414?" Because the decimal is an approximation, but sqrt(2) is exact. In math, keeping the surd form preserves perfect precision. If you need the decimal later (for code or measurement), you convert at the end.

Example: Why Surds Stay Exact

What is the diagonal of a unit square (side = 1)?

By Pythagoras: diagonal = sqrt(1² + 1²) = sqrt(2)

If you write 1.414, that's approximately right. But sqrt(2) is exactly right.

This matters when you chain calculations -- rounding errors accumulate.

Simplifying Surds

The key rule: sqrt(a × b) = sqrt(a) × sqrt(b). Use this to pull out perfect square factors.

To simplify a surd:
1. Find the largest perfect square that divides the number
2. Split the root using sqrt(a × b) = sqrt(a) × sqrt(b)
3. Simplify the perfect square part
Example: Simplify sqrt(50)

Step 1: What perfect square divides 50? 25 does (25 × 2 = 50)

Step 2: sqrt(50) = sqrt(25 × 2) = sqrt(25) × sqrt(2)

Step 3: sqrt(25) = 5, so the answer is 5 sqrt(2)

Example: Simplify sqrt(72)

Step 1: What perfect square divides 72? 36 does (36 × 2 = 72)

Step 2: sqrt(72) = sqrt(36 × 2) = sqrt(36) × sqrt(2)

Step 3: 6 sqrt(2)

Example: Simplify sqrt(48)

Step 1: 48 = 16 × 3 (16 is the largest perfect square factor)

Step 2: sqrt(48) = sqrt(16 × 3) = sqrt(16) × sqrt(3)

Step 3: 4 sqrt(3)

Common Mistake

Always use the largest perfect square factor. If you simplify sqrt(48) using 4 × 12 instead of 16 × 3, you get 2 sqrt(12) -- which is correct but not fully simplified (sqrt(12) still has a perfect square factor of 4). You'd need another step: 2 × 2 sqrt(3) = 4 sqrt(3). Using the largest factor saves time.

Adding and Subtracting Surds

You can only add or subtract surds that have the same number under the root (same "type" of surd). Think of it like variables: you can add 3x + 2x = 5x, but you can't add 3x + 2y.

a sqrt(n) + b sqrt(n) = (a + b) sqrt(n) ← same root, just add the coefficients
a sqrt(n) + b sqrt(m) = cannot simplify ← different roots, stays as is
Examples: Adding and Subtracting Surds

3 sqrt(2) + 5 sqrt(2) = 8 sqrt(2) ✓ (same root, add coefficients)

7 sqrt(3) - 2 sqrt(3) = 5 sqrt(3) ✓

3 sqrt(2) + 4 sqrt(5) = 3 sqrt(2) + 4 sqrt(5) (cannot combine -- different roots)


Tricky one: sqrt(50) + sqrt(18)

These look different, but simplify first:

sqrt(50) = 5 sqrt(2)    and    sqrt(18) = 3 sqrt(2)

Now they're the same type! 5 sqrt(2) + 3 sqrt(2) = 8 sqrt(2)

Multiplying Surds

Multiplication is straightforward: sqrt(a) × sqrt(b) = sqrt(a × b). Multiply the numbers under the roots.

Examples: Multiplying Surds

sqrt(3) × sqrt(3) = sqrt(9) = 3 (a surd times itself = the number inside!)

sqrt(2) × sqrt(8) = sqrt(16) = 4

2 sqrt(3) × 5 sqrt(7) = (2 × 5) × sqrt(3 × 7) = 10 sqrt(21)

3 sqrt(5) × 4 sqrt(5) = 12 × sqrt(25) = 12 × 5 = 60

Dividing Surds

Division works the same way: sqrt(a) / sqrt(b) = sqrt(a / b).

sqrt(a) / sqrt(b) = sqrt(a / b)

sqrt(18) / sqrt(2) = sqrt(18 / 2) = sqrt(9) = 3

Rationalising the Denominator

In math, it's considered bad form to leave a surd in the denominator of a fraction. Rationalising means getting rid of the surd on the bottom. Multiply top and bottom by the surd:

Example: Rationalise 1 / sqrt(3)

Multiply top and bottom by sqrt(3):

1 / sqrt(3) × sqrt(3) / sqrt(3) = sqrt(3) / 3

Answer: sqrt(3) / 3

Why does this work? Because sqrt(3) × sqrt(3) = 3, which eliminates the surd from the bottom.

Example: Rationalise 5 / sqrt(2)

Multiply top and bottom by sqrt(2):

5 / sqrt(2) × sqrt(2) / sqrt(2) = 5 sqrt(2) / 2

Answer: 5 sqrt(2) / 2

Harder Example: Rationalise 6 / (3 + sqrt(2))

When the denominator has a surd added to something, multiply by the conjugate (flip the sign on the surd part):

Conjugate of (3 + sqrt(2)) is (3 - sqrt(2))

6 / (3 + sqrt(2)) × (3 - sqrt(2)) / (3 - sqrt(2))

Bottom: (3 + sqrt(2))(3 - sqrt(2)) = 9 - 2 = 7    (difference of squares!)

Top: 6(3 - sqrt(2)) = 18 - 6 sqrt(2)

Answer: (18 - 6 sqrt(2)) / 7

Conjugate Trick -- Why It Works

The conjugate trick uses the difference of squares identity: (a + b)(a - b) = a² - b². When b is a surd, b² eliminates the root: (sqrt(2))² = 2. This always clears the surd from the denominator.

Key Surd Values to Know

Surd Approximate Value Where You'll See It
sqrt(2) ≈ 1.414 1.41421356... Diagonal of a unit square, 45° triangle
sqrt(3) ≈ 1.732 1.73205080... Equilateral triangle height, 30-60-90 triangle
sqrt(5) ≈ 2.236 2.23606797... The Golden Ratio = (1 + sqrt(5)) / 2
sqrt(10) ≈ 3.162 3.16227766... Decibel calculations
CS Connection: Surds in Code

In programming, you rarely write "sqrt(2)" symbolically -- you just compute math.sqrt(2) and get 1.4142135... as a float. But understanding surds helps you in several ways:

  • Distance calculations: The Euclidean distance between (0,0) and (1,1) is sqrt(2). Between (0,0) and (1,1,1) in 3D is sqrt(3). Knowing these values lets you sanity-check your code instantly.
  • Algorithm complexity: Some algorithms run in O(sqrt(n)) time. Understanding what sqrt(n) looks like for large n helps you judge performance.
  • Geometry / graphics: The height of an equilateral triangle with side s is (s × sqrt(3)) / 2. Game devs and graphics programmers use these exact forms.
  • Avoiding precision loss: If you compute sqrt(2) × sqrt(2) using floats, you might get 1.9999999 instead of exactly 2. Understanding surds helps you spot when to restructure calculations to avoid this.
CS Connection: Powers of 2 Run Everything

Exponents are the single most important pre-algebra concept for CS. Here's why:

  • Memory sizes are powers of 2: 1 KB = 2^10 = 1024 bytes. 1 MB = 2^20. 1 GB = 2^30. This is because computers use binary (base 2).
  • Big-O notation: The most important CS topic uses exponents. O(n^2) means "if you double the input, the time quadruples." O(2^n) means "adding one more item doubles the time" -- that's why brute-force password cracking is impractical for long passwords.
  • Binary search: Searches a sorted array by cutting it in half each time. Searching 1 billion items takes only log2(1,000,000,000) ≈ 30 steps. That's the power of exponents working backwards (logarithms).
  • Tree data structures: A balanced binary tree with height h has 2^h - 1 nodes. A tree of height 20 holds over a million nodes.
  • Square roots in algorithms: sqrt(n) shows up in optimized algorithms. Testing if a number is prime? Only check divisors up to sqrt(n), because if a factor exists beyond sqrt(n), its pair must be below it.

When someone says "that algorithm is exponential," they mean it's unusably slow for large inputs. Understanding exponents lets you instantly judge whether an approach will work.

Practice Problems -- Exponents and Square Roots

Work through each problem by hand. For exponents, write out the multiplication. For square roots, think about which perfect squares are nearby.

Set A: Evaluating Exponents

Calculate

1) 2^5

2) 3^4

3) 5^3

4) 10^6

5) 7^0

6) 1^100

7) 4^3

8) 2^10

9) 6^2

10) 9^3

Click to reveal answers -- Set A

1) 32

2) 81

3) 125

4) 1,000,000

5) 1 (anything to the power 0 is 1)

6) 1

7) 64

8) 1,024

9) 36

10) 729

Set B: Exponent Rules

Simplify using exponent rules. Give your answer as a single power where possible.

1) 2^3 x 2^4

2) 5^7 / 5^3

3) (3^2)^3

4) 4^5 x 4^(-2)

5) 10^8 / 10^8

6) (2 x 5)^3

7) 6^4 / 6^6

8) (7^3)^2 / 7^4

9) 3^2 x 3^3 x 3^(-1)

10) (2^3 x 2^2)^2

Click to reveal answers -- Set B

1) 2^(3+4) = 2^7 = 128

2) 5^(7-3) = 5^4 = 625

3) 3^(2x3) = 3^6 = 729

4) 4^(5-2) = 4^3 = 64

5) 10^(8-8) = 10^0 = 1

6) 2^3 x 5^3 = 8 x 125 = 1,000 (or 10^3)

7) 6^(4-6) = 6^(-2) = 1/36

8) 7^6 / 7^4 = 7^2 = 49

9) 3^(2+3-1) = 3^4 = 81

10) (2^5)^2 = 2^10 = 1,024

Set C: Negative Exponents

Express as a fraction or decimal

1) 2^(-4)

2) 5^(-2)

3) 10^(-3)

4) 3^(-3)

5) (1/2)^(-3)

6) 4^(-1)

7) (2/3)^(-2)

8) 10^(-1) + 10^(-2)

Click to reveal answers -- Set C

1) 1/16 = 0.0625

2) 1/25 = 0.04

3) 1/1000 = 0.001

4) 1/27

5) 2^3 = 8 (flip the fraction, positive exponent)

6) 1/4 = 0.25

7) (3/2)^2 = 9/4 = 2.25

8) 0.1 + 0.01 = 0.11

Set D: Square Roots and Surds

Calculate or simplify

1) sqrt(49)

2) sqrt(144)

3) sqrt(225)

4) cbrt(64)

5) Simplify: sqrt(18)

6) Simplify: sqrt(75)

7) Simplify: sqrt(200)

8) Simplify: sqrt(98)

9) Estimate sqrt(40) to 1 decimal place (between which two perfect squares?)

10) Simplify: 3 x sqrt(12)

11) Simplify: sqrt(8) x sqrt(2)

12) Simplify: sqrt(45) + sqrt(20)

Click to reveal answers -- Set D

1) 7

2) 12

3) 15

4) 4

5) sqrt(9 x 2) = 3 sqrt(2)

6) sqrt(25 x 3) = 5 sqrt(3)

7) sqrt(100 x 2) = 10 sqrt(2)

8) sqrt(49 x 2) = 7 sqrt(2)

9) 6^2 = 36, 7^2 = 49. sqrt(40) is between 6 and 7, closer to 6. Approx 6.3

10) 3 x sqrt(4 x 3) = 3 x 2 sqrt(3) = 6 sqrt(3)

11) sqrt(8 x 2) = sqrt(16) = 4

12) 3 sqrt(5) + 2 sqrt(5) = 5 sqrt(5)

Where to Practice More -- Exponents and Roots

8. Negative Numbers

Negative numbers are numbers less than zero. They show up everywhere in real life: debt (you owe $50 = -$50), temperature below freezing (-15 degrees), floors below ground level (basement = -1), or losing points in a game. On the number line, they live to the left of zero.

Number Line -- Your Best Friend

<--- negative --- 0 --- positive --->
-5 -4 -3 -2 -1 0 +1 +2 +3 +4 +5

The further left you go, the smaller the number. -10 is less than -3, even though 10 "looks" bigger than 3. Think of it like temperature: -10 degrees is way colder (smaller) than -3 degrees.

Here is the key insight: the sign tells you direction, and the number tells you distance. +5 means "5 steps to the right of zero." -5 means "5 steps to the left of zero." They are the same distance from zero, just in opposite directions.

Adding with Negative Numbers

Before memorizing any rules, let's build the intuition. Think of positive numbers as money you have and negative numbers as money you owe. Addition means combining them together.

Case 1: Positive + Positive

This is what you already know. You have $3 and you get $5 more. You now have $8. Nothing new here.

3 + 5 = 8

Case 2: Negative + Negative

You owe $3 and then you owe $5 more. You now owe $8 total. When you combine two debts, the debt gets bigger. So you add the numbers and keep the negative sign.

(-3) + (-5) = -8
Why this makes sense

On the number line: start at -3 (already left of zero). Adding -5 means move 5 more steps to the left. You land on -8. Two negatives added together always make a bigger negative.

Case 3: Positive + Negative (or Negative + Positive)

This is where it gets interesting. You have $7 but you owe $3. What's your actual situation? You subtract the smaller from the bigger: 7 - 3 = 4. Since you had more than you owed, the answer is positive: +4.

7 + (-3) = 4    (you had more than you owed, so positive)
3 + (-7) = -4    (you owed more than you had, so negative)

The rule: when the signs are different, subtract the smaller number from the bigger one, then take the sign of whichever number was bigger (ignoring the sign, just looking at the size).

Adding 7 + (-3): Start at 7, move 3 steps LEFT -2 -1 0 1 2 3 4 5 6 7 8 ---|---|---|---|---|---|---|---|---|---|---|---> <--<--<-- START | | LAND (4) Start (7) The negative sign means "go LEFT on the number line." Start at 7, walk 3 steps left, land on 4. So 7 + (-3) = 4
More Addition Examples
  • (-4) + (-6) = -10 -- Both negative: add 4+6=10, keep negative
  • 8 + (-3) = 5 -- Different signs: 8-3=5, 8 is bigger so positive
  • (-9) + 4 = -5 -- Different signs: 9-4=5, 9 is bigger so negative
  • (-7) + 7 = 0 -- Equal and opposite: they cancel out completely
  • (-2) + (-8) = -10 -- Both negative: add 2+8=10, keep negative
  • 15 + (-20) = -5 -- Different signs: 20-15=5, 20 is bigger so negative

Subtracting with Negative Numbers

Here is the single most useful trick in all of basic math: subtraction is just adding the opposite. Every subtraction problem can be turned into an addition problem. Once you see this, subtraction with negatives becomes easy.

The Golden Rule of Subtraction

a - b = a + (-b)

To subtract any number, just flip its sign and add instead. That is it. Every subtraction problem in existence follows this rule.

Subtracting a positive number

This is normal subtraction you already know. 10 - 4 = 6. But let's see it through the lens of our rule: 10 - 4 becomes 10 + (-4) = 6. Same answer.

Subtracting a negative number (the tricky one)

What does 5 - (-3) mean? Using our rule: flip the sign of -3 (it becomes +3) and add. So 5 - (-3) = 5 + 3 = 8.

5 - (-3) = 5 + 3 = 8
(-2) - (-6) = (-2) + 6 = 4
(-4) - (-4) = (-4) + 4 = 0
5 - (-3) --> flip the sign --> 5 + 3 --> 8 Think of it as: 5 - (-3) | | two negatives cancel out | 5 + 3 = 8 Step by step: +---------+ +----------+ +-------+ +---+ | 5 - (-3)| => | 5 + (+3) | => | 5 + 3 | => | 8 | +---------+ +----------+ +-------+ +---+ the minus and the negative now just combine into a plus normal addition
Why "minus a negative = plus" makes sense

Imagine you owe someone $3 (that's -3 in your life). Now someone says "I'm removing that debt." Removing a debt is a good thing -- it's like gaining money. So subtracting a negative (removing something bad) is the same as adding a positive (gaining something good). Two negatives cancel out.

Subtraction Examples -- Step by Step
  • 10 - (-4) = 10 + 4 = 14 (flip -4 to +4, then add)
  • (-3) - (-8) = (-3) + 8 = 5 (flip -8 to +8, then add)
  • (-5) - 3 = (-5) + (-3) = -8 (flip +3 to -3, then add: two negatives combine)
  • 2 - 7 = 2 + (-7) = -5 (flip +7 to -7, then add: 7 is bigger so negative)
  • (-10) - (-10) = (-10) + 10 = 0 (anything minus itself is zero)
The Pattern for Adding and Subtracting -- Summary

Every addition/subtraction problem with signs boils down to two questions:

  1. Are the signs the same or different?
  2. Which number is bigger (ignoring signs)?

Same signs? Add the numbers, keep that sign. (-3) + (-5) = -8

Different signs? Subtract the smaller from bigger, take the sign of the bigger. (-9) + 4 = -5

And for subtraction: just flip the second sign and turn it into addition. Then use the rules above.

Multiplying and Dividing Negative Numbers

Multiplication and division follow a completely different (and simpler) pattern than addition and subtraction. There is one rule that handles everything:

Same signs = Positive result
Different signs = Negative result

That is the entire rule. Let's make sure you understand why it works.

Positive x Positive = Positive

3 x 4 = 12. Obvious. You have 3 groups of 4. Nothing surprising.

Positive x Negative = Negative

3 x (-4) = -12. Think of it as: you have 3 groups of "losing 4 dollars." If you lose $4 three times, you have lost $12 total. That is -12.

Negative x Positive = Negative

(-3) x 4 = -12. Multiplication can be done in any order (3 x 4 = 4 x 3), so this is the same situation as above, just flipped. Still -12.

Negative x Negative = Positive

(-3) x (-4) = 12. This is the one that confuses people. Here is the best way to think about it:

Why negative x negative = positive

Imagine you have a debt of $4 per month (-4). Now imagine we remove 3 months of that debt (-3 months of -$4). Removing debt is a good thing -- you have effectively gained $12. So (-3) x (-4) = +12.

Another way: look at the pattern.
(-3) x 3 = -9
(-3) x 2 = -6
(-3) x 1 = -3
(-3) x 0 = 0
(-3) x (-1) = ?
Each time we decrease the second number by 1, the answer goes up by 3. So the next answer must be +3. The pattern forces negative x negative to be positive.

The Complete Sign Table (Multiplication & Division)
First NumberSecond NumberResultWhy
+ (positive)+ (positive)+ (positive)Same signs
- (negative)- (negative)+ (positive)Same signs
+ (positive)- (negative)- (negative)Different signs
- (negative)+ (positive)- (negative)Different signs

Think of it like friends and enemies: a friend of a friend is a friend (+)(+)=(+). An enemy of an enemy is a friend (-)(-)=(+). A friend of an enemy is an enemy (+)(-)=(-). An enemy of a friend is an enemy (-)(+)=(-).

The pattern that FORCES the rule: (-3) x 3 = -9 <-- going down by 3 (-3) x 2 = -6 <-- going down by 3 (-3) x 1 = -3 <-- going down by 3 (-3) x 0 = 0 <-- going down by 3 (-3) x -1 = +3 <-- must continue going UP by 3! (-3) x -2 = +6 <-- going up by 3 (-3) x -3 = +9 <-- going up by 3 The results: -9, -6, -3, 0, +3, +6, +9 \ \ \ | / / / +3 +3 +3 +3 +3 +3 Each step adds 3. The pattern cannot "break" at zero. Negative x Negative MUST be positive for math to stay consistent. It is not a rule someone invented -- it is a rule the pattern DEMANDS.
Multiplication Examples
  • (-6) x (-7) = 42 -- Same signs (both negative) = positive
  • (-5) x 8 = -40 -- Different signs = negative
  • 4 x (-9) = -36 -- Different signs = negative
  • (-1) x (-1) = 1 -- Same signs = positive
  • (-10) x 3 = -30 -- Different signs = negative
Division Examples

Division follows the exact same sign rules as multiplication. No new rules to learn.

  • (-20) / (-4) = 5 -- Same signs = positive
  • (-15) / 3 = -5 -- Different signs = negative
  • 24 / (-6) = -4 -- Different signs = negative
  • (-100) / (-10) = 10 -- Same signs = positive
  • 36 / (-9) = -4 -- Different signs = negative

Chaining Multiple Negatives

When you multiply several negative numbers together, there is a simple counting trick:

Even number of negatives = Positive result
Odd number of negatives = Negative result
Examples
  • (-2) x (-3) x (-1) = -6 -- Three negatives (odd) = negative. Work it out: (-2)x(-3)=6, then 6x(-1)=-6.
  • (-1) x (-1) x (-1) x (-1) = 1 -- Four negatives (even) = positive.
  • (-2) x 3 x (-4) = 24 -- Two negatives (even) = positive. 2x3x4=24, positive.
Common Mistakes to Avoid
  • (-2)^2 vs -2^2 -- these are DIFFERENT! (-2)^2 means (-2) x (-2) = 4 (squaring the negative number). But -2^2 means -(2^2) = -(4) = -4 (squaring 2 first, then making it negative). The parentheses change everything.
  • Don't confuse add/subtract rules with multiply/divide rules. For addition: (-3) + (-5) = -8 (add the numbers). For multiplication: (-3) x (-5) = +15 (same signs = positive). They are completely different operations with different rules.
  • Subtracting is not "making negative." 5 - 8 is not "five becomes negative." It is 5 + (-8) = -3. Always convert to addition if confused.
Quick Reference -- All Sign Rules in One Place

Addition & Subtraction: Convert everything to addition (flip sign if subtracting). Then: same signs = add and keep sign. Different signs = subtract and keep sign of the bigger.

Multiplication & Division: Same signs = positive. Different signs = negative. Count negatives if chaining: even = positive, odd = negative.

That is genuinely all you need. Every problem with signs uses one of these rules.

Signed Arithmetic — Complete Rules:

Addition:
• (+a) + (+b) = +(a + b)
• (-a) + (-b) = -(a + b)
• (+a) + (-b) = sign of larger absolute value, subtract smaller from larger

Subtraction:
• a - b = a + (-b) — subtraction is just adding the negative

Multiplication & Division:
• Same signs → positive: (+)(+) = + and (-)(-) = +
• Different signs → negative: (+)(-) = - and (-)(+) = -
CS Connection: Negatives Are Everywhere in Code

Negative numbers aren't just math theory -- they're a daily tool in programming:

  • Array indexing: In Python, arr[-1] gives you the last element, arr[-2] the second-to-last. This uses negative number arithmetic under the hood: -1 + len(arr).
  • Coordinate systems: In game development, moving left is negative x, moving down is negative y. Physics engines use negative velocity for deceleration.
  • Two's complement: How computers actually store negative numbers in binary. An 8-bit signed int ranges from -128 to 127. Understanding sign rules helps you understand why.
  • Financial software: Debits are negative, credits are positive. Every accounting system relies on sign arithmetic.
  • Error codes: Many C/C++ functions return -1 to indicate failure. The Linux kernel uses negative numbers for error codes throughout.
  • Temperature/sensor data: IoT and embedded systems deal with negative readings constantly.

Practice Problems -- Negative Numbers

Negative numbers trip people up because the rules feel backwards at first. The only way to make them automatic is practice. Use a number line if it helps.

Set A: Adding and Subtracting

Calculate

1) -3 + 7

2) -5 + (-8)

3) 4 - 9

4) -6 - 3

5) -12 + 12

6) -7 - (-4)

7) 15 + (-20)

8) -8 - (-8)

9) -3 + 5 - 7 + 2

10) -15 + 8 - (-3) + (-6)

11) -100 + 45 - 30

12) -2.5 + 4.8

Click to reveal answers -- Set A

1) 4

2) -13

3) -5

4) -9

5) 0

6) -7 + 4 = -3

7) -5

8) -8 + 8 = 0

9) (-3 + 5) + (-7 + 2) = 2 + (-5) = -3

10) -15 + 8 + 3 - 6 = -10

11) -85

12) 2.3

Set B: Multiplying and Dividing

Calculate (remember: same signs → positive, different signs → negative)

1) -3 x 5

2) -4 x (-6)

3) 7 x (-8)

4) -9 x (-9)

5) -2 x 3 x (-4)

6) (-1)^5

7) -36 / 6

8) -48 / (-8)

9) 56 / (-7)

10) -100 / (-25)

11) -2 x (-3) x (-4)

12) (-5)^2 vs -(5^2)

Click to reveal answers -- Set B

1) -15

2) 24

3) -56

4) 81

5) (-2 x 3) x (-4) = -6 x -4 = 24

6) -1 (odd number of negatives = negative)

7) -6

8) 6

9) -8

10) 4

11) 6 x (-4) = -24 (odd number of negatives = negative)

12) (-5)^2 = 25 but -(5^2) = -25. The brackets make all the difference!

Set C: Mixed Operations and Order of Operations

Evaluate each expression

1) -3 + 4 x (-2)

2) (-5)^2 - 3 x 6

3) -8 / 2 + 3 x (-4)

4) |(-7) + 3| (absolute value)

5) |-5| x |-3|

6) -2 x (5 - 8)

7) (-3)^3 + 10

8) (4 - 7) x (2 - 5)

9) -1 x (-1) x (-1) x (-1) x (-1)

10) 20 / (-4) - (-3)^2

Click to reveal answers -- Set C

1) -3 + (-8) = -11

2) 25 - 18 = 7

3) -4 + (-12) = -16

4) |-4| = 4

5) 5 x 3 = 15

6) -2 x (-3) = 6

7) -27 + 10 = -17

8) (-3) x (-3) = 9

9) -1 (5 negatives = negative)

10) -5 - 9 = -14

Set D: Word Problems

Solve each problem

1) The temperature is -8°C at midnight. By noon it rises 15°C. What is the temperature at noon?

2) A submarine is at -120 metres. It rises 45 metres, then dives 30 metres. What is its final depth?

3) Your bank balance is $250. You make purchases of $80, $45, and $190. What is your balance now?

4) A lift (elevator) starts at floor 3, goes down 7 floors, then up 2 floors. What floor is it on?

5) The difference between two temperatures is 35°C. If one temperature is -12°C, what could the other temperature be? (Two answers)

6) A stock opens at $45, drops $8, rises $3, drops $12, rises $5. What is the closing price? What was the net change?

Click to reveal answers -- Set D

1) -8 + 15 = 7°C

2) -120 + 45 - 30 = -105 metres

3) 250 - 80 - 45 - 190 = -$65 (overdrawn!)

4) 3 - 7 + 2 = -2 (2 floors below ground/basement level 2)

5) -12 + 35 = 23°C or -12 - 35 = -47°C

6) 45 - 8 + 3 - 12 + 5 = $33. Net change = 33 - 45 = -$12

Where to Practice More -- Negative Numbers

10. Modular Arithmetic (The % Operator)

Modular arithmetic answers one question: "What is the remainder when I divide?" You already know this intuitively. If you have 17 cookies and split them among 5 people, each person gets 3, and you have 2 left over. That remainder -- 2 -- is the result of 17 mod 5 (or 17 % 5 in code).

a mod n = remainder when a is divided by n

17 mod 5 = 2 (because 17 = 5 x 3 + 2)
20 mod 4 = 0 (because 20 = 4 x 5 + 0) ← divides evenly
7 mod 10 = 7 (because 7 = 10 x 0 + 7) ← number is smaller than divisor
100 mod 7 = 2 (because 100 = 7 x 14 + 2)

The Clock Analogy

The easiest way to understand mod is a clock. A clock cycles from 1 to 12, then wraps back around. If it's 10 o'clock and you add 5 hours, you don't get 15 o'clock -- you get 3 o'clock. That's because 15 mod 12 = 3. The number "wraps around" when it reaches the limit.

12 11 1 10 2 15 hours on a clock: 9 3 ← 15 mod 12 = 3 8 4 7 5 6

This "wrapping" behaviour is exactly what makes mod so powerful in programming.

Key Properties

1. a mod n is always between 0 and n-1 (inclusive)
→ 17 mod 5 can only be 0, 1, 2, 3, or 4

2. If a mod n = 0, then n divides a evenly
→ 20 mod 4 = 0, so 4 divides 20 perfectly

3. (a + b) mod n = ((a mod n) + (b mod n)) mod n
→ You can mod at each step (useful for preventing overflow)

4. (a x b) mod n = ((a mod n) x (b mod n)) mod n
→ Same rule for multiplication

Worked Examples

Example: Is a Number Even or Odd?

The single most common use of mod in all of programming:

n % 2 == 0 → n is even

n % 2 == 1 → n is odd

Why? Even numbers divide by 2 with no remainder. Odd numbers always have remainder 1.

12 % 2 = 0 (even)    13 % 2 = 1 (odd)    0 % 2 = 0 (even)

Example: Wrapping Around an Array

You have an array of 5 elements (indices 0-4). You want to cycle through them forever:

index: 0 1 2 3 4 5 6 7 8 9 10 11 12 ... result: 0 1 2 3 4 0 1 2 3 4 0 1 2 ... Formula: actual_index = index % array_length 5 % 5 = 0 ← wraps back to start! 7 % 5 = 2 12 % 5 = 2

This pattern is used in circular buffers, round-robin scheduling, rotating through players in a game, and carousel UIs.

Example: Extracting Digits

Want the last digit of 1234? Use mod 10:

1234 % 10 = 4 (last digit)

Want the last two digits? Use mod 100:

1234 % 100 = 34

This is how you reverse numbers, check palindromes, and extract parts of numbers in coding problems.

Example: Converting Time

Convert 200 minutes to hours and minutes:

Hours: 200 / 60 = 3 (integer division -- see next section)

Minutes: 200 % 60 = 20

Answer: 3 hours 20 minutes

This is how every clock app works: totalSeconds % 60 gives seconds, (totalSeconds / 60) % 60 gives minutes, totalSeconds / 3600 gives hours.

Negative Numbers and Mod

Here's a gotcha: -7 % 5 behaves differently depending on the language.

Python: -7 % 5 = 3 (always positive -- mathematical definition)
C++ / JS: -7 % 5 = -2 (keeps the sign of the dividend)
Watch Out

If you're using C++ or JavaScript and need a positive remainder from a negative number, use: ((a % n) + n) % n. This is a common interview trick and a real-world bug source.

CS Connection: Where You'll Use Mod Every Day
  • Hash tables: index = hash(key) % table_size -- this is literally how every hash map works. The mod ensures the hash fits within the array bounds.
  • Circular buffers / queues: next = (current + 1) % size wraps around without if-statements.
  • Cryptography: RSA encryption is built on modular exponentiation. Without mod, there is no internet security.
  • FizzBuzz: The most famous coding interview question: if (n % 3 == 0) print("Fizz").
  • Pagination: "Show 10 items per page" → page number = index / 10, position on page = index % 10.
  • Color cycling / animations: hue = (hue + 1) % 360 cycles through colours forever.
  • Preventing integer overflow: In competitive programming, you often see "return answer mod 10^9 + 7" because mod keeps numbers manageable.

If you learn one math operation deeply, make it mod. You will use it more than any other arithmetic in code.

Practice Problems -- Modular Arithmetic

The % operator will become one of your most-used tools in programming. Master it here.

Set A: Basic Mod Operations

Calculate the remainder (mod)

1) 17 % 5

2) 23 % 7

3) 100 % 3

4) 45 % 9

5) 31 % 6

6) 256 % 10

7) 7 % 7

8) 3 % 8

9) 1000 % 7

10) 99 % 100

11) 144 % 12

12) 50 % 8

Click to reveal answers -- Set A

1) 17 = 3x5 + 2 → 2

2) 23 = 3x7 + 2 → 2

3) 100 = 33x3 + 1 → 1

4) 45 = 5x9 + 0 → 0 (divides evenly)

5) 31 = 5x6 + 1 → 1

6) 6 (last digit!)

7) 0

8) 3 (when number < mod, the result is the number itself)

9) 1000 = 142x7 + 6 → 6

10) 99

11) 0

12) 50 = 6x8 + 2 → 2

Set B: Patterns and Applications

Solve using mod

1) Is 247 even or odd? (Use mod 2)

2) Is 3,456 divisible by 3? (Use mod 3)

3) What day of the week is it 100 days from Monday? (Mon=0, Tue=1, ... Sun=6)

4) A clock shows 10:00. What time does it show 27 hours later? (mod 12)

5) You have 50 items and display 8 per page. How many pages? How many items on the last page?

6) FizzBuzz: For numbers 1-20, which ones are divisible by both 3 and 5?

7) An array has 7 elements (indices 0-6). If you keep incrementing an index with (i+1) % 7, what sequence of indices do you get starting from 5?

8) A hash table has 10 buckets. Where does a key with hash value 437 go?

9) You want to split 23 tasks evenly among 4 workers. How many tasks does each worker get? How many workers get an extra task?

10) What is the last digit of 7^4? (Hint: only need 7^4 % 10)

Click to reveal answers -- Set B

1) 247 % 2 = 1, so odd

2) 3+4+5+6 = 18, 18 % 3 = 0, so yes, divisible by 3

3) 100 % 7 = 2. Monday + 2 = Wednesday

4) (10 + 27) % 12 = 37 % 12 = 1:00

5) Pages = ceil(50/8) = 7 pages. Last page: 50 % 8 = 2 items

6) Divisible by 15: 15 (only one in range 1-20)

7) 5, 6, 0, 1, 2, 3, 4, 5, ... it wraps around in a circle

8) 437 % 10 = bucket 7

9) 23 / 4 = 5 remainder 3. Each worker gets 5 tasks, and 3 workers get an extra task.

10) 7^4 = 2401, last digit = 1

Where to Practice More -- Modular Arithmetic

11. Floor, Ceiling & Integer Division

When you divide 7 by 2, the answer is 3.5. But what if you need a whole number? You have two choices: round down (floor) or round up (ceiling). These aren't just rounding -- they have precise mathematical definitions and they show up in programming constantly.

Floor (Round Down)

The floor of a number is the largest integer that is less than or equal to it. Written as ⌊x⌋. Think of it as "chopping off the decimal" -- but be careful with negatives.

⌊3.7⌋ = 3 (chop off .7 → 3)
⌊3.0⌋ = 3 (already whole)
⌊0.9⌋ = 0 (not 1! Floor goes DOWN)
⌊-2.3⌋ = -3 (NOT -2! Floor goes DOWN, toward more negative)
⌊-5.0⌋ = -5 (already whole)
The Negative Trap

⌊-2.3⌋ = -3, not -2. Floor always goes toward negative infinity. This catches people off guard. -3 is less than -2.3, so the floor is -3.

Ceiling (Round Up)

The ceiling of a number is the smallest integer that is greater than or equal to it. Written as ⌈x⌉. Think of it as "always round up unless already whole."

⌈3.2⌉ = 4 (round up to 4)
⌈3.0⌉ = 3 (already whole -- stays at 3)
⌈0.1⌉ = 1 (even a tiny decimal rounds up)
⌈-2.3⌉ = -2 (round UP toward 0, so -2 not -3)
⌈-5.0⌉ = -5 (already whole)

Integer Division (Truncation)

In most programming languages, dividing two integers gives you integer division -- the decimal part is thrown away. In C++, Java, and JavaScript (using Math.trunc), this truncates toward zero, which is different from floor for negative numbers.

Integer division (C++, Java):
7 / 2 = 3 (not 3.5 -- decimal chopped off)
-7 / 2 = -3 (truncates toward zero, NOT -4)

Python's // operator (floor division):
7 // 2 = 3 (same as above)
-7 // 2 = -4 (floors toward negative infinity!)
C++ vs Python: Different Behaviour!

-7 / 2 in C++ gives -3 (truncation). -7 // 2 in Python gives -4 (floor). This difference has caused countless bugs when porting code between languages. Always test with negative numbers.

Worked Examples

Example: How Many Full Pages?

You have 47 items and show 10 per page. How many pages do you need?

Wrong answer: 47 / 10 = 4 (but that only covers 40 items!)

Right answer: ⌈47 / 10⌉ = ⌈4.7⌉ = 5 pages

In code (without a ceiling function): (47 + 10 - 1) / 10 = 56 / 10 = 5

The trick (a + b - 1) / b computes ceiling using only integer division. Memorize this -- it comes up in interviews.

Example: Binary Search Midpoint

Binary search finds the middle index: mid = (low + high) / 2

If low = 3 and high = 8: mid = 11 / 2 = 5 (integer division, floors automatically)

If low = 3 and high = 7: mid = 10 / 2 = 5 (exact)

Integer division naturally gives you the floor, which is exactly what binary search needs.

Example: Converting Seconds to HH:MM:SS

Convert 3725 seconds:

Hours: 3725 / 3600 = 1 (integer division)

Remaining: 3725 % 3600 = 125

Minutes: 125 / 60 = 2

Seconds: 125 % 60 = 5

Result: 1:02:05

Notice how integer division and mod work together perfectly -- division gives the "big unit," mod gives the leftover.

The Relationship: Division, Mod, Floor, and Ceiling

For any integers a and n:

a = n x (a / n) + (a % n)
↑ original = divisor x quotient + remainder

17 = 5 x 3 + 2 ✓ (17 / 5 = 3, 17 % 5 = 2)
100 = 7 x 14 + 2 ✓ (100 / 7 = 14, 100 % 7 = 2)

Floor and ceiling are related:
⌈a/b⌉ = ⌊a/b⌋ + 1 (when a is not divisible by b)
⌈a/b⌉ = ⌊a/b⌋ (when a IS divisible by b)

In Code

C++: floor(3.7) = 3 ceil(3.7) = 4 (from <cmath>)
Python: math.floor(3.7) math.ceil(3.7) (import math)
JS: Math.floor(3.7) Math.ceil(3.7)

Integer ceiling without float: (a + b - 1) / b (using integer division)
Example: ceil(47/10) = (47 + 9) / 10 = 56 / 10 = 5 ✓
CS Connection: Floor & Ceiling in Real Code
  • Binary search: mid = (low + high) / 2 uses integer division (floor) to find the middle element.
  • Pagination: totalPages = ceil(totalItems / itemsPerPage) -- every web app does this.
  • Image processing: Resizing images requires rounding pixel coordinates. Floor/ceil determines whether a pixel rounds to the left or right neighbor.
  • Memory alignment: Allocating memory aligned to 8-byte boundaries: aligned = ceil(size / 8) * 8.
  • Dividing work across threads: itemsPerThread = ceil(totalItems / numThreads) ensures no items are skipped.
  • Grid layouts: numRows = ceil(items / columns) tells you how many rows a grid needs.

Practice Problems -- Floor, Ceiling and Integer Division

Floor rounds down, ceiling rounds up, and integer division truncates toward zero. These show up in programming constantly.

Set A: Floor and Ceiling

Calculate floor(x) and ceil(x) for each value

1) x = 3.7

2) x = -2.3

3) x = 5.0

4) x = -0.1

5) x = 7.999

6) x = -4.8

7) x = 0.001

8) x = -1.0

9) x = 99.5

10) x = -0.999

Click to reveal answers -- Set A

1) floor = 3, ceil = 4

2) floor = -3, ceil = -2

3) floor = 5, ceil = 5 (already a whole number)

4) floor = -1, ceil = 0

5) floor = 7, ceil = 8

6) floor = -5, ceil = -4

7) floor = 0, ceil = 1

8) floor = -1, ceil = -1 (already a whole number)

9) floor = 99, ceil = 100

10) floor = -1, ceil = 0

Set B: Integer Division

Calculate using integer division (truncate toward zero)

1) 17 // 5

2) 23 // 4

3) 100 // 7

4) 7 // 10

5) 50 // 6

6) 255 // 8

7) 999 // 100

8) 1 // 3

9) 63 // 9

10) 1000 // 3

Click to reveal answers -- Set B

1) 3 (17 / 5 = 3.4, truncate = 3)

2) 5 (23 / 4 = 5.75)

3) 14 (100 / 7 = 14.28...)

4) 0 (7 / 10 = 0.7)

5) 8 (50 / 6 = 8.33...)

6) 31 (255 / 8 = 31.875)

7) 9

8) 0

9) 7

10) 333

Set C: Real-World Applications

Solve using floor, ceiling, or integer division

1) You have 47 students and each bus holds 12. How many buses do you need? (Use ceil)

2) You have 100 items to display, 15 per page. How many pages? How many on the last page?

3) A binary search on an array of 100 elements: what is the midpoint index? (Use floor of (0 + 99) / 2)

4) You need to split 1,000 tasks across 7 threads. How many tasks per thread? How many threads get an extra task?

5) Memory alignment: you need 37 bytes but memory must be aligned to 8-byte boundaries. How many bytes do you actually allocate? (Use ceil(37/8) x 8)

6) A video is 185 seconds long. Express this in minutes and seconds using integer division and mod.

7) You have $47 and items cost $6 each. How many can you buy? How much money is left?

8) A grid has 4 columns and 23 items. How many rows are needed?

Click to reveal answers -- Set C

1) ceil(47/12) = ceil(3.917) = 4 buses

2) Pages = ceil(100/15) = 7 pages. Last page: 100 % 15 = 10 items

3) floor(99/2) = floor(49.5) = index 49

4) 1000 // 7 = 142 tasks each. Extra: 1000 % 7 = 6 threads get an extra task.

5) ceil(37/8) x 8 = 5 x 8 = 40 bytes

6) Minutes: 185 // 60 = 3 minutes. Seconds: 185 % 60 = 5 seconds. So 3:05.

7) Items: 47 // 6 = 7 items. Left: 47 % 6 = $5

8) ceil(23/4) = ceil(5.75) = 6 rows

Where to Practice More -- Floor, Ceiling, and Integer Division

12. Practice Quiz

Test your understanding with these 5 questions. Click an answer to check it -- you will get immediate feedback and an explanation.

Q1: What is 3/4 + 1/2?

Answer: 5/4 (or 1 1/4)
Find the LCD of 4 and 2, which is 4. Convert 1/2 to 2/4. Then add: 3/4 + 2/4 = 5/4. As a mixed number, that is 1 1/4.

Q2: What is 5 + 3 x 2^2?

Answer: 17
Order of operations: First, exponent: 2^2 = 4. Then multiply: 3 x 4 = 12. Finally add: 5 + 12 = 17.

Q3: A jacket originally costs $80 and is 25% off. What is the sale price?

Answer: $60
25% of $80 = 0.25 x 80 = $20. Subtract the discount: $80 - $20 = $60. Or directly: $80 x 0.75 = $60.

Q4: What is (-8) x (-3)?

Answer: 24
When you multiply two negative numbers, the result is positive. Same signs = positive. 8 x 3 = 24, and since both are negative, the answer is positive 24.

Q5: If 3/x = 9/12, what is x?

Answer: 4
Cross-multiply: 3 x 12 = 9 x x, so 36 = 9x, therefore x = 36 / 9 = 4. You can verify: 3/4 = 9/12 = 0.75. Correct!