# Why $f(x,y)=y^2$ instead of $f(y)=y^2$?

If I have a function $f(x,y)=y^2$, is it equivalent with $f(y)=y^2$?

Are there any differences?

Is $f(x,y)=y^2$ a multivariable function despite no $x$?

• The funcion $y^2$ is constant in $x$, so no, there is no difference. It can be treated as a single-variate function. – Peter Aug 26 '16 at 21:42
• What is the domain of each function? For two functions to be equal, they must have same domain. – Bernard Masse Aug 26 '16 at 21:42

$f(x,y) = y^2$ is a function of two variables that happens to depend on just one of them. It is not the same as $f(y) = y^2$, which is a function of one variable, but for some purposes it can be regarded as equivalent.

$f(x,y)=y^2$ is a function from $\mathbb{R}^2$ to $\mathbb{R}$, while $f(y)=y^2$ is function from $\mathbb{R}$ to $\mathbb{R}$, so no, they are not the same function.

See this recent answer for what must be true in order for two functions to be equivalent.

Let

$$\begin{array}{rcl} f \,\, : & \mathbb R^2 &\to \mathbb R\\ & (x,y) &\mapsto y^2\end{array}$$

and

$$\begin{array}{rcl} g \,\, : & \mathbb R &\to \mathbb R\\ & y &\mapsto y^2\end{array}$$

Thus, $g$ is the restriction of $f$ to the $y$-axis $\{(0,\gamma) \mid \gamma \in \mathbb R\}$ and $f$ is the extension of $g$ to $\mathbb R^2$. In terms of the graphs of $f$ and $g$, the graph of $g$ is the projection of the graph of $f$ onto the $yz$-plane and the graph of $f$ is the lifting of the graph of $g$ along an axis parallel to the $x$-axis.