[Math] The meaning of notation like $f\colon \mathbb R^2 \to \mathbb R$, $x \in \mathbb R^n$, and $x \in \mathbb R$.

functionslinear algebranotation

I am in second year university and am taking linear algebra this semester. Never having been a strong maths student, I am certainly struggling with some basic concepts and especially notation.

I have tried searching on the web but have had difficulty in finding something which properly explains the meaning of notation like

$$ f: \Bbb{R^2} \to \Bbb{R}$$ or the difference between
$x\in \Bbb{R^n}$ and $x \in \Bbb{R}$

I can basically read these, and know the literal pronounciation of the symbols, but have no idea what they actually mean.

The first one would be $f$ maps $\Bbb{R^2}$ to $\Bbb{R}$. What does this mean exactly?

Is it saying that on an $(x,y)$ plane, the function $f$ returns a single number?
E.g $f(x) = 3x^2$
$f(1) = 3$?

Is the second one saying that $x$ is an element of a vector space with $n$ elements $(ax_1, bx_2,….,a_nx_n)$, whereas the first one is saying that $x$ is just some real number?

I would really appreciate if someone could help me with this, either explaining it or referring me to a nice book that is appropriate at a beginner level.
Further more does this type of notation have any specific name?

Best Answer

When we say that $x \in \mathbb R$, we mean that $x$ is simply a (one-dimensional) scalar that happens to be a real number. For example, we might have $x = -2$ or $x = 42$.

On the other hand, when we say that $\vec x \in \mathbb R^2$, we mean that $\vec x$ is a two-dimensional vector whose two components are both real numbers. In other words, $\vec x$ is an ordered pair in the Cartesian plane that has the form $(x_1, x_2)$, where $x_1,x_2 \in \mathbb R$. For example, we might have $\vec x = (-1, 7)$ or $\vec x = (\pi, 2.54)$.

When we define a function $f\colon \mathbb R^2 \to \mathbb R$, we mean that $f$ maps each ordered pair (which contains two numbers as input) to a single number (as output). For example, we could define such a mapping by: $$ f((x_1, x_2)) = 2x_1 + 3x_2 $$ so that in this case, $f$ would map $\vec x = (-1, 7)$ to $2(-1) + 3(7) = 19$. [Usually, we like to abuse this notation a bit and drop one of the pairs in the double pair of brackets so that we just write it as $f(x_1, x_2)$ instead.] You can visualize this three dimensionally by plotting the point $(-1, 7, 19)$ and all other triples of the form $(x_1, x_2, f(x_1, x_2))$. Using Wolfram|Alpha, we can plot this to obtain a plane passing through the origin $(0, 0, 0)$. In fact, this is the subspace consisting of all possible linear combinations of the basis vectors $(1, 0, 2)$ and $(0, 1, 3)$:

enter image description here

Related Question