math.wiki
Number › Exponents and roots › Exponent notation › Perfect squares and perfect cubes
Open on the map
Math 6 · 6.EE.A.1 · 8.EE.A.2

Perfect squares and perfect cubes

Alma has a pile of square paving slabs. When can every one of them be laid as one full square, and how can she tell without trying?

Where you are 3 in Exponent notation

Why this exists

Alma is paving a courtyard with square slabs, and she wants them to form one full square, with no gaps and no slab left over. With 49 slabs she can: 7 rows of 7. With 50 she cannot, however she shuffles them. Ciro has the same question in a warehouse, where he stacks storage boxes, each a small cube, into one big solid cube. 27 boxes make a block 3 by 3 by 3; 28 boxes do not.

Some numbers come out as a full square or a full cube, and most do not. They turn up all through mathematics, in areas, volumes and square roots, so it pays to know the small ones on sight and to have a sure test for big ones.

Definition

A perfect square is a number you get by multiplying a whole number by itself. 49 is a perfect square because 49 = 7 \times 7. With an exponent this is written 7^2 and read “seven squared”. Perfect squares are also called square numbers.

A perfect cube is a number you get by using a whole number as a factor three times. 27 is a perfect cube because 27 = 3 \times 3 \times 3 = 3^3, read “three cubed”. They are also called cube numbers.

Zero counts as both, since 0 = 0 \times 0, but a courtyard of no slabs is not much of a square, so lists usually start at 1.

Intuition

The names come from shapes. Lay 7 rows of 7 slabs and you have an array whose rows and columns are the same length: a square with 7 slabs along each side. Counting the slabs is the area of a square with side 7, which is 7 \times 7 = 7^2. That is why the second power is called “squared”.

1^2 = 1
2^2 = 4
3^2 = 9
4^2 = 16
Figure 1A perfect square is a number of slabs that makes a full square.

A cube is built in layers. A 3 by 3 layer holds 3 \times 3 = 9 boxes, and 3 such layers stacked make a block 3 boxes along every edge, with 9 \times 3 = 27 boxes in all. Counting them is the volume of a box whose edges are all equal, so the third power is called “cubed”.

1^3 = 1
2^3 = 8
3^3 = 27
Figure 2A perfect cube is a number of boxes that stacks into a solid cube.

Now grow a square. Going from 6 by 6 to 7 by 7 adds a column of 6 down one side, a row of 6 along the bottom, and 1 slab in the corner, so 13 new slabs.

+6 +6 +1
7^2 = 6^2 + 6 + 6 + 1
Figure 3Growing a square by one slab per side adds 6 + 6 + 1 = 13 slabs.

So the squares spread apart: 1, 4, 9, 16, 25 are 3, 5, 7, 9 apart. Cubes spread faster: from 27 to 64 is already 37. Every number inside a gap is neither kind.

Results

The squares to 15^2 and the cubes to 10^3. These are worth knowing by heart, the way the times tables are.

\begin{array}{lll} 1^2 = 1 & 6^2 = 36 & 11^2 = 121 \\ 2^2 = 4 & 7^2 = 49 & 12^2 = 144 \\ 3^2 = 9 & 8^2 = 64 & 13^2 = 169 \\ 4^2 = 16 & 9^2 = 81 & 14^2 = 196 \\ 5^2 = 25 & 10^2 = 100 & 15^2 = 225 \end{array}
\begin{array}{ll} 1^3 = 1 & 6^3 = 216 \\ 2^3 = 8 & 7^3 = 343 \\ 3^3 = 27 & 8^3 = 512 \\ 4^3 = 64 & 9^3 = 729 \\ 5^3 = 125 & 10^3 = 1000 \end{array}

The between test. A number that lies strictly between two neighboring perfect squares, such as 6^2 = 36 and 7^2 = 49, is not a perfect square. A number strictly between two neighboring perfect cubes is not a perfect cube.

The exponent test. Write a whole number greater than 1 as a product of primes, its prime factorization. Then the number is

  • a perfect square exactly when every exponent is even,
  • a perfect cube exactly when every exponent is a multiple of 3,
  • both exactly when every exponent is a multiple of 6.

Halving every exponent gives the number that was squared; dividing every exponent by 3 gives the number that was cubed.

Numbers that are both. From 1 to 1000 there are three: 1, 64 = 8^2 = 4^3 and 729 = 27^2 = 9^3.

Why it is true

The between test. The bigger the side, the bigger the square. A whole number side is either 6 or less, giving at most 36 slabs, or 7 or more, giving at least 49. No whole number side lands strictly between, so nothing from 37 to 48 is a perfect square. Cubes work the same way.

The gaps are odd. Figure 3 shows the growth from side 6 to side 7: two strips of 6 and a corner, 6 + 6 + 1. Two equal strips make a double, which is always even, and one more makes it odd. The same picture works for any side, so the gap after every square is odd, and each gap is 2 more than the one before because each strip is 1 slab longer.

The exponent test. Take 15^2 = 15 \times 15. Since 15 = 3 \times 5,

15 \times 15 = 3 \times 5 \times 3 \times 5 = 3^2 \times 5^2

Each prime of 15 turns up twice, once from each copy, so every exponent in a perfect square is a doubled exponent, which is even. The other direction works too. Given 2^4 \times 5^2, every exponent is even, so each prime’s copies split into two equal halves:

2^4 \times 5^2 = (2^2 \times 5) \times (2^2 \times 5) = 20 \times 20

Both halves are the same number, so the whole is a perfect square. If one exponent is odd, that prime’s copies cannot be shared equally between two halves. Since a number has only one prime factorization (Every number has exactly one prime factorization), no other way of writing it can rescue it. For cubes, the copies of each prime must split into three equal groups, so every exponent must be a multiple of 3.

Both. An exponent that is even and a multiple of 3 is a multiple of 6. The smallest numbers built that way are 2^6 = 64 and 3^6 = 729; anything else (such as 2^{12}, 5^6 or 2^6 \times 3^6) is above 1000, and 1 is both because 1 = 1 \times 1 = 1 \times 1 \times 1.

Worked examples

Example 1

Is 200 slabs a square?

Alma has 200 slabs. Can she lay all of them as one full square? If not, what is the largest square she can lay, how many slabs are left over, and how many more would the next size up need?

Solution

From the list, 14^2 = 196 and 15^2 = 225 are neighboring squares, and

196 < 200 < 225

so 200 lies strictly between them and is not a perfect square: a side of 14 slabs uses too few and a side of 15 too many.

The largest full square is 14 by 14, using 196 slabs, with 200 - 196 = 4 left over. The next size up, 15 by 15, needs 225 slabs, which is 225 - 200 = 25 more than she has.

Example 2

Is 150 boxes a cube?

Ciro has 150 storage boxes. Can he stack all of them into one solid cube? If not, find the largest solid cube he can build, the boxes left over, and how many more the next size up would need.

Solution

5^3 = 125 and 6^3 = 216 are neighboring cubes, and 125 < 150 < 216, so 150 is not a perfect cube.

The largest solid cube is 5 by 5 by 5: five layers of 5 \times 5 = 25 boxes, which is 125 boxes, leaving 150 - 125 = 25. The next size, 6 by 6 by 6, needs 216, which is 216 - 150 = 66 more.

The 25 left over would make a sixth 5 by 5 layer, but that block is 5 by 5 by 6: a box, not a cube.

Example 3

Testing 576 and 288 with primes

Use prime factorization to decide whether 576 and 288 are perfect squares. For any that is, find the number that was squared.

Solution

Halving 576 again and again gives 288, 144, 72, 36, 18, 9: six halvings, and then 9 = 3 \times 3. So

576 = 2^6 \times 3^2

Both exponents, 6 and 2, are even, so 576 is a perfect square. Halving each exponent gives the side:

576 = (2^3 \times 3) \times (2^3 \times 3) = 24 \times 24 = 24^2

Check. 24 \times 20 = 480 and 24 \times 4 = 96, and 480 + 96 = 576.

288 is 576 \div 2, so it has one fewer 2:

288 = 2^5 \times 3^2

The exponent 5 is odd. Five 2s cannot be shared equally between two equal halves, so 288 is not a perfect square. The between test agrees, narrowly: 16^2 = 256 and 17^2 = 289, and 256 < 288 < 289.

Example 4

A cube beyond the list

Is 1728 a perfect cube? Is it a perfect square?

Solution

Halving gives 864, 432, 216, 108, 54, 27: six halvings, then 27 = 3 \times 3 \times 3. So

1728 = 2^6 \times 3^3

Both exponents, 6 and 3, are multiples of 3, so 1728 is a perfect cube. Dividing each exponent by 3 gives the edge, 2^2 \times 3 = 12, so 1728 = 12^3.

Check. 12 \times 12 = 144 and 144 \times 12 = 1728.

The exponent 3 is odd, so 1728 is not a perfect square. Ciro could stack 1728 boxes into a block 12 by 12 by 12, but Alma could not lay 1728 slabs as one square.

Example 5

The fewest packs for a square

Alma’s slabs come in packs of 180. What is the fewest packs she can buy so that all the slabs make one full square, and how long is its side?

Solution

The prime factorization of a pack is

180 = 2^2 \times 3^2 \times 5

Buying several packs multiplies 180 by the number of packs. The 2s and 3s already have even exponents, but 5 has exponent 1. To make that exponent even, the number of packs must supply at least one more 5, so it must be a multiple of 5, and the smallest such number is 5 itself:

180 \times 5 = 2^2 \times 3^2 \times 5^2 = 900

Halving the exponents gives the side, 2 \times 3 \times 5 = 30. Alma needs 5 packs, 900 slabs, laid 30 by 30.

Example 6

Squares that are also cubes

Which numbers from 1 to 1000 are both perfect squares and perfect cubes?

Solution

There are 31 perfect squares in that range but only 10 perfect cubes, so start from the cubes and test each one. Cubing a number triples every exponent in its prime factorization, and a square needs every exponent even.

CubePrime factorizationAll exponents even?
1^3 = 1no primes at allyes, 1 = 1^2
2^3 = 82^3no
3^3 = 273^3no
4^3 = 642^6yes, 64 = 8^2
5^3 = 1255^3no
6^3 = 2162^3 \times 3^3no
7^3 = 3437^3no
8^3 = 5122^9no
9^3 = 7293^6yes, 729 = 27^2
10^3 = 10002^3 \times 5^3no

The numbers are 1, 64 and 729. Ciro’s 64 boxes, for instance, stack into a 4 by 4 by 4 cube or lie flat as one 8 by 8 layer.

Boundaries

Whole numbers only. 2.25 = 1.5 \times 1.5 and \tfrac{1}{4} = \tfrac{1}{2} \times \tfrac{1}{2} are squares of numbers, but not perfect squares, because the number being squared is not a whole number. No square of whole slabs holds 2.25 slabs.

The between test only says no. It shows a number is not a perfect square when the number lies strictly between neighbors. A number equal to one of them is a perfect square.

The exponent test needs primes. 36 = 4 \times 9 shows each factor once, yet 36 = 6^2. Only the prime factorization, 2^2 \times 3^2, has the even exponents. The number 1 has no prime factors at all; it is a perfect square and a perfect cube because 1 = 1 \times 1 = 1 \times 1 \times 1.

All sides equal. 48 slabs fill a 6 by 8 rectangle exactly, but that is not a square.

Where this goes next

Going backwards, from 576 to 24, is finding a square root, which gets its own symbol in square roots; going from 1728 to 12 is a cube root. The between test is exactly how a square root that is not a whole number is pinned between two whole numbers, and splitting primes into equal pairs is how a square root is simplified. Squares and cubes inside longer calculations follow the order of operations, and 100 = 10^2 and 1000 = 10^3 are the first Powers of ten.

Exercises

Reading the lists

  1. Which of these are perfect squares: 48, 81, 110, 121, 140?
  2. Which of these are perfect cubes: 8, 16, 27, 200, 1000?
  3. Alma lays a full square with 12 slabs along each side. How many slabs does it use?
  4. Ciro stacks a solid cube with 7 boxes along each edge. How many boxes are in it, and how many are in its bottom layer?
  5. A full square of slabs uses 169 slabs. How many slabs run along each side?
  6. A solid cube of boxes uses 512 boxes. How many boxes run along each edge?

Between two squares or two cubes

  1. Name the two neighboring perfect squares each number lies between: (a) 90 (b) 130 (c) 210.
  2. Name the two neighboring perfect cubes each number lies between: (a) 50 (b) 100 (c) 700.
  3. Alma has 110 slabs. Find the largest full square she can lay, how many slabs are left over, and how many more the next size up would need.
  4. Ciro has 600 boxes. Find the largest solid cube he can stack, how many boxes are left over, and how many more the next size up would need.
  5. How many whole numbers lie strictly between 12^2 and 13^2? Are any of them perfect squares?

Using prime factorization

  1. Use prime factorization to decide whether 324 is a perfect square. If it is, find the number that was squared.
  2. Use prime factorization to decide whether 360 is a perfect square.
  3. Use prime factorization to decide whether 3375 is a perfect cube. If it is, find the number that was cubed.
  4. Is 1296 a perfect square? Is it a perfect cube? Use its prime factorization.
  5. Is 2025 a perfect square? If it is, find the number that was squared.
  6. Is 4000 a perfect square? Is it a perfect cube?

Making a square or a cube

  1. Slabs come in packs of 12. What is the fewest packs that make one full square, and what is its side?
  2. Boxes arrive in crates of 18. What is the fewest crates that stack into one solid cube, and what is its edge?
  3. What is the smallest whole number you can multiply 40 by to get a perfect cube? What cube do you get?
  4. What is the smallest whole number you can divide 252 by to get a perfect square? What square do you get?
  5. Find a number between 1000 and 5000 that is both a perfect square and a perfect cube.

Reasoning

  1. Explain why no perfect square ends in the digit 7.
  2. Explain why a number whose prime factorization has every exponent a multiple of 6 is both a perfect square and a perfect cube. For 2^6 \times 5^6, say which number is squared and which is cubed to make it.
  3. Using a square of slabs, explain why the gap between two neighboring perfect squares is always an odd number.
Answers
  1. 81 and 121, since 81 = 9^2 and 121 = 11^2. The others fall between neighbors: 48 between 36 and 49, 110 between 100 and 121, 140 between 121 and 144.
  2. 8, 27 and 1000, since they are 2^3, 3^3 and 10^3. 16 lies between 8 and 27, and 200 between 125 and 216.
  3. 144 slabs, since 12^2 = 144.
  4. 343 boxes, since 7^3 = 343. The bottom layer is 7 \times 7 = 49 boxes.
  5. 13, since 13^2 = 169.
  6. 8, since 8^3 = 512.
  7. (a) 81 and 100 (b) 121 and 144 (c) 196 and 225.
  8. (a) 27 and 64 (b) 64 and 125 (c) 512 and 729.
  9. A 10 by 10 square of 100 slabs, with 110 - 100 = 10 left over. The next size, 11 by 11, needs 121, so 121 - 110 = 11 more.
  10. An 8 by 8 by 8 cube of 512 boxes, with 600 - 512 = 88 left over. The next size needs 9^3 = 729, so 729 - 600 = 129 more.
  11. 24 whole numbers, and none is a perfect square. 12^2 = 144 and 13^2 = 169, and the numbers from 145 to 168 are 169 - 144 - 1 = 24 numbers, all strictly between neighboring squares.
  12. Yes. 324 = 2^2 \times 3^4, all exponents even, and halving them gives 2 \times 3^2 = 18, so 324 = 18^2.
  13. No. 360 = 2^3 \times 3^2 \times 5, and the exponents of 2 and 5 are odd.
  14. Yes. 3375 = 3^3 \times 5^3, both exponents multiples of 3, so 3375 = (3 \times 5)^3 = 15^3.
  15. 1296 = 2^4 \times 3^4. All exponents are even, so it is a perfect square, (2^2 \times 3^2)^2 = 36^2. The exponent 4 is not a multiple of 3, so it is not a perfect cube.
  16. Yes. 2025 = 3^4 \times 5^2, so 2025 = (3^2 \times 5)^2 = 45^2.
  17. Neither. 4000 = 2^5 \times 5^3. The exponents 5 and 3 are odd, so it is not a perfect square, and 5 is not a multiple of 3, so it is not a perfect cube.
  18. 3 packs, a 6 by 6 square. 12 = 2^2 \times 3, so one more 3 is needed: 12 \times 3 = 36 = 6^2.
  19. 12 crates, a cube with edge 6. 18 = 2 \times 3^2 needs two more 2s and one more 3, which is 2^2 \times 3 = 12: 18 \times 12 = 216 = 6^3.
  20. 25, giving 1000 = 10^3. 40 = 2^3 \times 5, so two more 5s are needed.
  21. 7, giving 36 = 6^2. 252 = 2^2 \times 3^2 \times 7, and removing the single 7 leaves all exponents even.
  22. 4096. It is 2^{12}, and 12 is a multiple of 6: 4096 = 64^2 = 16^3. It is the only one in that range, since the next, 5^6 = 15625, is far above 5000.
  23. The last digit of a product depends only on the last digits of the numbers multiplied. Squaring the digits 0 to 9 gives numbers ending in 0, 1, 4, 9, 6, 5, 6, 9, 4, 1. No 7 appears, so no perfect square ends in 7 (nor in 2, 3 or 8).
  24. Every exponent is even, so the copies of each prime split into two equal halves, and the number is a perfect square; every exponent is a multiple of 3, so the copies split into three equal groups, and it is a perfect cube. 2^6 \times 5^6 = 1{,}000{,}000. Halving the exponents gives 2^3 \times 5^3 = 1000, so it is 1000^2; dividing them by 3 gives 2^2 \times 5^2 = 100, so it is 100^3.
  25. To grow a square one slab longer on each side, add a column as long as the old side, a row just as long, and one corner slab, as in Figure 3. The column and row are equal, so together they make a double, which is even, and the corner adds 1, making the gap odd.
kg1128 · updated 2026-10-12 · CC-BY-SA-4.0