A rectangular garden measures 4 ft by 5 ft. A sidewalk runs diagonally from one corner to the opposite corner. Find the length of the sidewalk.

Using the Pythagorean theorem, we see that the length of the sidewalk is equal to $\sqrt{4^2+5^2}=\sqrt{41}=\boxed{\sqrt{41}\text{ feet}}$.

To find the length of the sidewalk, we can use the Pythagorean theorem, which states that in a right-angled triangle, the square of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides.

In this case, the garden forms a right-angled triangle.

The two sides of the triangle are the length and width of the garden, which are 4 ft and 5 ft, respectively.

Let's calculate the length of the sidewalk step by step:

Step 1: Square the length (4 ft) and the width (5 ft) of the garden:
4^2 = 16 square ft
5^2 = 25 square ft

Step 2: Add the squares of the two sides:
16 + 25 = 41 square ft

Step 3: Take the square root of the sum calculated in step 2 to find the length of the sidewalk:
√41 = approximately 6.4 ft

Therefore, the length of the sidewalk is approximately 6.4 ft.