Proper Writing of Functions of Vectors

62 Views Asked by At

Let $x \in \mathbb{R}^n$ and $y \in \mathbb{R}^m$. Consider a real-valued function $f = f(x,y)$. Which of the following is the more correct writing of this map, or are they equivalent? $$ f: \mathbb{R}^n \times \mathbb{R}^m \to \mathbb{R} \\ f: \mathbb{R}^{n + m} \to \mathbb{R} \\ $$

2

There are 2 best solutions below

0
On BEST ANSWER

For $f=f(x,y)$ the first definition $$ f:\mathbb{R}^m\times\mathbb{R}^n\to \mathbb{R} $$ is correct.

The second definition $$ f:\mathbb{R}^{m+n}\to \mathbb{R} $$ drops the grouping information for the arguments: it says $f = f(x)$ which is a function of arity 1 while your given $f(x,y)$ has arity 2.

I would consider these to be different type signature definitions.

Of course one can give 1:1 maps for the arguments, in this sense they are the same.

Another example:

For $m = n = 2$, the first one would be $$ f:\mathbb{R}^2\times\mathbb{R}^2\to \mathbb{R} $$

The second $$ f:\mathbb{R}^4\to \mathbb{R} $$

And then there is $f: \mathbb{C}\times \mathbb{C} \to \mathbb{R}$.

0
On

In the end of the day, they are the same. However, the first one is better when studying the implicit/inverse function theorems... when you write $$f: \Bbb R^n \times \Bbb R^m \to \Bbb R,$$ your function gets two arguments, $f({\bf x},{\bf y})$ with ${\bf x}\in \Bbb R^n$ and ${\bf y} \in \Bbb R^m$. If you write $$f: \Bbb R^{n+m}\to \Bbb R,$$ your function only gets one argument, $f({\bf z})$, with ${\bf z} \in \Bbb R^{n+m}$.

If you "glue together" $\bf x$ and $\bf y$ you get an element of $\Bbb R^{n+m}$. The issue is that $$\Bbb R^{n+m} = \{ (x_1,\cdots,x_{n+m})\mid x_i \in \Bbb R, \forall\,i=1,\ldots,n+m \} \\ \Bbb R^n \times \Bbb R^m = \{ ({\bf x},{\bf y}) \mid {\bf x}\in \Bbb R^n , \, {\bf y}\in\Bbb R^m \}, $$ but we identify these sets naturally.