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?
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.