# Domain and range

I just need some clarifications. I'm given a function of two variables $f(x,y)=2-x^2-y^2+2x-4y$ and I'm asked to find the domain and range of it. Now I know that the domain of this is all real numbers but would it be correct to say that the range would also be the set of all real numbers?

Not neccesarily.

\begin{align} 2-x^2-y^2+2x-4y&=-(x-1)^2+1-(y-2)^2+4+2\\&=-(x-1)^2-(y-2)^2+7\\&\le7 \text{ for all } x,y\in{\Bbb{R}} \end{align}

• oh right it's R x R thank you so much for the help – madison May 18 '15 at 1:36
• You're welcomed. And the others also have contributed. – Mythomorphic May 18 '15 at 1:37

The domain is NOT $\mathbb{R}$. The domain is $\mathbb{R}\times\mathbb{R}$, as it is a function of two variables.

The range is $\{z\in \mathbb{R} \colon z\leq 7\}$. You can see this by noting that the parabola $p(x)=-x^2+2x$ has range $\{z\in \mathbb{R} \colon z\leq 1\}$ (simply find the vertex) and the parabola $q(y)=-y^2-4y$ has range $\{z\in \mathbb{R} \colon z\leq 4\}$.

So the sum of these two functions (and 2) has range $\{z\in \mathbb{R} \colon z\leq 1+4+2=7\}$.

The domain is actually the set $\mathbb{R} \times \mathbb{R}$, which is the set of pairs of real numbers, since this is a function of two variables. The range is not the entire set $\mathbb{R}$. Far away from the origin it behaves like $-x^2 - y^2$, so there is no way it can achieve all positive values.

• yes i completely forgot that it's supposed to be R x R thanks for the help though – madison May 18 '15 at 1:37