My square patio is tiled with square tiles, all the same size. All the tiles are gray, except the tiles along the two diagonals, which are all yellow. (The corners are yellow, the center is yellow, and all the tiles along the diagonal in between are yellow.) If there are yellow tiles, how many gray tiles are there?
Let's call the number of tiles along each side of the square patio "n".
The total number of tiles on the patio is n x n = n^2.
There are two diagonals of yellow tiles, each of which has n yellow tiles. So there are a total of 2n yellow tiles.
To find the number of gray tiles, we need to subtract the number of yellow tiles from the total number of tiles:
n^2 - 2n
This is the number of gray tiles on the patio.