• Foundation
  • About 15 min
  • 5 practice questions

Cubes and their patterns

Find cubes of whole numbers, fractions, decimals and negative numbers, picture them as stacks of unit cubes, and use the last-digit, zeros and odd-number patterns of cubes.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Find n³ for whole numbers, fractions, decimals and negative numbers, and picture it as unit cubes.
  • Describe the last digits and trailing zeros of cubes and compare them with squares.
  • Write a cube as a sum of consecutive odd numbers, and explain why 1729 is a special number.

A square is a number times itself; a cube is a number times itself and then once more. Just as squares count the unit squares in a square, cubes count the small cubes in a big cube. Cubes are behind volumes of boxes, water tanks and dice.

Perfect cubes

How many 1 cm cubes make a cube of edge 3 cm? The bottom layer is 3 × 3 = 9 small cubes, and there are 3 layers, so 3 × 3 × 3 = 27 cubes. We write 3 × 3 × 3 = 3³, read as "3 cubed". In general n³ = n × n × n. The cubes of natural numbers, 1, 8, 27, 64, 125, ..., are called perfect cubes. Numbers in between, such as 9 to 26, are not perfect cubes.

Cubes of 1 to 10
n12345678910
n³1827641252163435127291000
Last digit of n³1874563290

Worked example 1: counting unit cubes

A wooden block is a cube of edge 6 cm made of 1 cm cubes. Each layer is a 6 × 6 square of 36 cubes, and there are 6 layers, so the block has 36 × 6 = 216 small cubes, which is 6³ = 216.

Patterns in cubes

  • Last digits. Unlike squares, a cube can end in any digit 0 to 9. Each last digit of a cube comes from exactly one last digit of the number: 1→1, 4→4, 5→5, 6→6, 9→9, 0→0, while 2 and 8 swap (2³ = 8, 8³ = 512) and 3 and 7 swap (3³ = 27, 7³ = 343).
  • Zeros. A number ending in k zeros has a cube ending in 3k zeros: 20³ = 8000, 300³ = 27000000. So a perfect cube can end in 0, 3, 6, ... zeros, but never in exactly one or two zeros.
  • How many cubes of each size. Two cubes have 1 digit (1, 8), two have 2 digits (27, 64) and five have 3 digits (125, 216, 343, 512, 729). Cubes thin out much faster than squares.

Squares and cubes side by side

  • Square, n²
    • n × n
    • Unit squares in a square of side n
    • Ends only in 0, 1, 4, 5, 6 or 9
    • k zeros at the end become 2k zeros
    • Square of a negative number is positive
  • Cube, n³
    • n × n × n
    • Unit cubes in a cube of edge n
    • Can end in any digit 0 to 9
    • k zeros at the end become 3k zeros
    • Cube of a negative number is negative

Cubes of fractions, decimals and negative numbers

Worked example 2

  • (2/5)³ = (2 × 2 × 2)/(5 × 5 × 5) = 8/125.
  • (1.2)³ = 1.2 × 1.2 × 1.2 = 1.44 × 1.2 = 1.728 (three decimal places).
  • (−4)³ = (−4) × (−4) × (−4) = 16 × (−4) = −64. A negative number cubed stays negative, while (−4)² = 16 is positive.

n³ = n × n × n. A cube keeps the sign of the number, and a number ending in k zeros has a cube ending in 3k zeros.

Cubes from consecutive odd numbers

Odd numbers build cubes too. Take the odd numbers in order and group them as 1 | 3, 5 | 7, 9, 11 | 13, 15, 17, 19 | ... Group sums: 1 = 1³, 3 + 5 = 8 = 2³, 7 + 9 + 11 = 27 = 3³, 13 + 15 + 17 + 19 = 64 = 4³. The n-th group has n odd numbers and adds up to n³. When n is odd, the middle number of the group is n², so the sum is n × n² = n³.

Worked example 3: 7³ as odd numbers

The 7th group has 7 odd numbers centred on 7² = 49: 43, 45, 47, 49, 51, 53, 55. Their sum is 7 × 49 = 343 = 7³. Check by pairing from the ends: 43 + 55 = 98, 45 + 53 = 98, 47 + 51 = 98, plus 49 gives 98 × 3 + 49 = 294 + 49 = 343.

A famous number: 1729

A well-known story tells that the mathematician G. H. Hardy once visited Srinivasa Ramanujan in hospital and called the number of his taxi, 1729, a dull number. Ramanujan answered that it is very interesting: it is the smallest number that can be written as a sum of two cubes in two different ways. Indeed 1³ + 12³ = 1 + 1728 = 1729 and 9³ + 10³ = 729 + 1000 = 1729. Numbers like this are now called taxicab numbers.

Key takeaways: n³ = n × n × n counts the unit cubes in a cube of edge n. Cubes can end in any digit, and each last digit points to one last digit of the number. Trailing zeros triple. Negative numbers have negative cubes. The n-th group of consecutive odd numbers adds to n³, and 1729 is the smallest number that is a sum of two cubes in two ways.

Check your understanding

  1. 1. A cube of edge 9 cm is built from 1 cm cubes. How many small cubes are used?

    1. 81
    2. 243
    3. 729
    4. 27
    Show answer

    Answer: C. Each layer is 9 × 9 = 81 small cubes and there are 9 layers, so the total is 81 × 9 = 729 = 9³. 81 counts only one layer.

  2. 2. What is the last digit of 23³?

    1. 9
    2. 7
    3. 3
    4. 1
    Show answer

    Answer: B. The last digit of a cube depends only on the last digit of the number. 23 ends in 3 and 3³ = 27 ends in 7, so 23³ ends in 7. (In fact 23³ = 12167.)

  3. 3. What is (−0.2)³?

    1. 0.008
    2. −0.6
    3. −0.08
    4. −0.008
    Show answer

    Answer: D. 0.2 × 0.2 × 0.2 = 0.008 (2 × 2 × 2 = 8, with three decimal places). Three negative factors give a negative product, so (−0.2)³ = −0.008.

  4. 4. 1729 = 9³ + 10³. Which other sum of two cubes also equals 1729?

    1. 1³ + 12³
    2. 2³ + 11³
    3. 4³ + 11³
    4. 6³ + 11³
    Show answer

    Answer: A. 1³ + 12³ = 1 + 1728 = 1729. The others are 8 + 1331 = 1339, 64 + 1331 = 1395 and 216 + 1331 = 1547, none of which is 1729.

  5. 5. 8³ is the sum of 8 consecutive odd numbers in the pattern 1 | 3, 5 | 7, 9, 11 | ... What is the first of these 8 numbers?

    1. 49
    2. 57
    3. 63
    4. 65
    Show answer

    Answer: B. The groups before the 8th use 1 + 2 + ... + 7 = 28 odd numbers, so the 8th group starts with the 29th odd number, 2 × 29 − 1 = 57. The group is 57, 59, ..., 71; its average is (57 + 71) ÷ 2 = 64, so the sum is 8 × 64 = 512 = 8³.

Privacy · Terms · Refunds · Delivery