$x_1,x_2\in \mathbb R^2 $ or $(x_1,x_2)\in \mathbb R^2 $ for this function?

48 Views Asked by At

Say I have the function $f(x_1,x_2)=x_1+x_2$ and I want to use vector notation.

Q1:

I set $\mathbf x=x_1\hat e_1+x_2\hat e_2=(x_1,x_2)$, so $f(x_1,x_2)=f(\mathbf x)$ and I now have $f(\mathbf x)=x_1+x_2$. I guess this is correct?

Q2

But should I write $$ f(\mathbf x)=x_1+x_2, \quad x_1,x_2\in \mathbb R^2 \quad \tag 1 $$ or $$ f(\mathbf x)=x_1+x_2, \quad (x_1,x_2)\in \mathbb R^2 \quad \tag 2 $$

2

There are 2 best solutions below

0
On

As long as your point gets across with no confusion, any notation is just fine.

For example, technically speaking, for $f:\mathbb R^2\to\mathbb R$, we should, following strict notation, be writing $f((x_1,x_2))$, but we commonly shorten that to $f(x_1,x_2)$.


That said, I would say you can either write

$(x_1,x_2)\in\mathbb R^2$

because that means that the tuple $(x_1,x_2)$ is an element of $\mathbb R^2$ (and, implicitly, that the two elements of the tuple are elements of $\mathbb R$)

or you could write

$x_1, x_2\in \mathbb R$

as that means "both $x_1$ and $x_2$ are elements of $\mathbb R$ (and, therefore, the tuple $(x_1,x_2)$ is an element of $\mathbb R^2$).


I would say that $x_1,x_2\in\mathbb R^2$ is awkward notation that is not standard for what you are trying to say and can therefore introduce confusion.

0
On

Say I have the function $f(x_1,x_2)=x_1+x_2$ and I want to use vector notation.

Q1:

I set $\mathbf x=x_1\hat e_1+x_2\hat e_2=(x_1,x_2)$, so $f(x_1,x_2)=f(\mathbf x)$ and I now have $f(\mathbf x)=x_1+x_2$. I guess this is correct?

People often slide between these two forms. Typical is to write $$ f: \Bbb R^2 \to \Bbb R : \mathbf x= (x_1, x_2) \mapsto x_1 + x_2 $$ or $$ f: \Bbb R^2 \to \Bbb R : (x_1, x_2) \mapsto x_1 + x_2. $$

One slight challenge is that not everyone writes vectors as list of numbers, i.e. $(x_1, x_2, x_3)$; some folks use column vectors. Then the "pun" between $\mathbf x$ and $(x_1, x_2)$ becomes less clear.

Q2

But should I write $$ f(\mathbf x)=x_1+x_2, \quad x_1,x_2\in \mathbb R^2 \quad \tag 1 $$ or $$ f(\mathbf x)=x_1+x_2, \quad (x_1,x_2)\in \mathbb R^2 \quad \tag 2 $$

For this, I'd be inclined to write

$$ f(\mathbf x)=x_1+x_2, \quad \mathbf x = (x_1, x_2) \in \mathbb R^2 \quad \tag 1 $$.

None of these is really satisfactory, for you really should commit to $f$ being a function of one argument (a vector) or two arguments ( a pair of real numbers). The right way to write the thing, in this first case, would be $$ f( (x_1, x_2) ) = x_1 + x_2 $$ which looks rather better with column vectors: $$ f( \begin{bmatrix}x_1\\ x_2\end{bmatrix} ) = x_1 + x_2. $$

Be people are generally sloppy, and I don't think I've ever seen anyone (except a programmer who had to write code!) use anything like the first of those two. The second is relatively common, although sometimes the parentheses get dropped, alas.