A gardener is mowing a 20 by 40 yard rectangular pasture using a diagonal pattern. He mows from one corner of the pasture to the corner diagonally opposite. What is the length of this pass with the mower? Give your answer in simplified form. Recall from the Pythagorean Theorem that, for a right triangle, the square of the length of the diagonal is equal to the sum of the squares of the lengths of the sides.

We can think of the diagonal as the hypotenuse of a right triangle, with the sides of the rectangle as the other two sides.

Using the Pythagorean theorem, we have:

$20^2 + 40^2= c^2$

$400 + 1600= c^2$

$2000=c^2$

Taking the square root of both sides, we find $c=\boxed{20\sqrt{5}}$ yards.