To find the maximum number of bookshelves Gavin can use while distributing his 9 math books and 12 science books evenly, we need to determine the greatest common divisor (GCD) of the two quantities.
First, we will find the GCD of 9 and 12. We can do this by listing the divisors of each number:
- The divisors of 9 are: 1, 3, 9
- The divisors of 12 are: 1, 2, 3, 4, 6, 12
The common divisors of 9 and 12 are: 1 and 3. The greatest of these is 3.
Now, let's verify that Gavin can distribute both types of books evenly across 3 bookshelves:
-
For the math books: \[ \frac{9 \text{ math books}}{3 \text{ bookshelves}} = 3 \text{ math books per bookshelf} \]
-
For the science books: \[ \frac{12 \text{ science books}}{3 \text{ bookshelves}} = 4 \text{ science books per bookshelf} \]
Since both calculations result in whole numbers, Gavin can indeed use 3 bookshelves, each containing exactly 3 math books and 4 science books.
Thus, the greatest number of bookshelves Gavin can use is \(\boxed{3}\).