Composition and definition of functions I have an excercise which i don't understand what a i doing wrong. 
Let $\mathbb{R}$ be the rational numbers set. Let $h$ and $g$ be functions from $\mathbb{R}$ to $\mathbb{R}$:
$$
g(x)=x+1;\quad h(x)=2x-1
$$
Then I have to compose $h \;\mathrm{o}\; g$ or $h(g(x))$:
$$
h(g(x))=h(x+1)=2(x+1)-1
$$
Then the question is: if $h \;\mathrm{o}\; g$ is defined from $\mathbb{R}$ to $\mathbb{R}$, the answer is Yes but I don't know why. 
We know that $0$ isn't an element in $\mathbb{R}$ so:
$$
2x+1=0\quad x=-0.5
$$
So for the value $-0.5$ the function isn't defined?
What am I doing wrong here?
 A: Well as said before everthing is fine, 0 is part of the rational numbers set so the function is defind.
A: If $g$ is a funtion from $A$ to $B$ and $h$ is a function from $B$ to $C$, then surely $h\circ g$ is a function from $A$ to $C$.
This also holds if $A=B=C$ as here.
Your doubts can only sten from some misinterpretations of the objects used.


*

*If $\mathbb R$ is the set of real numbers (as that is what this symbol conventionally denotes) then clearly $0\in\mathbb R$ and your doubt does not apply.

*If the question is concerend with rational numbers then the conventional symbol would rather be $\mathbb Q$, not $\mathbb R$. Still, $0$ is a rational number, so no problem here.

*If you really want $\mathbb R$ to denote some set that does not contain $0$ and still $g,h$ should be functions from that set to itself, it is possible that you rather want to talk about the set of irrational numbers. This set does not have a generally accepted notation, sometimes $\mathbb I$ is used, but most would just write $\mathbb R\setminus \mathbb Q$ without further abbreviation. Your doubt is still not valid in this case as the problematic $x=-0.5$ turns out to be rational (that is not irrational).

