If $r$ is positive and the line whose equation is $x + y = r$ is tangent to the circle whose equation is $x^2 + y ^2 = r$, then $r$ equals
$\textbf{(A) }\frac{1}{2}\qquad \textbf{(B) }1\qquad \textbf{(C) }2\qquad \textbf{(D) }\sqrt{2}\qquad  \textbf{(E) }2\sqrt{2}$
The circle $x^2 + y^2 = r$ has center $(0,0)$ and radius $\sqrt{r}$. Therefore, if the line $x + y = r$ is tangent to the circle $x^2 + y^2 = r$, then the distance between $(0,0)$ and the line $x + y = r$ is $\sqrt{r}$.
The distance between $(0,0)$ and the line $x + y = r$ is
\[\frac{|0 + 0 - r|}{\sqrt{1^2 + 1^2}} = \frac{r}{\sqrt{2}}.\]
Hence,
\[\frac{r}{\sqrt{2}} = \sqrt{r}.\]
Then $r = \sqrt{r} \cdot \sqrt{2}$, so $\sqrt{r} = \sqrt{2}$, which means $r = \boxed{2}$ or (B), $2$.