How to prove that the result of multiplying two number of the same set is in the same set? I'm a chemist and I'm studying abstract algebra on my own so I don't know if this is a trivial question.
If I have for example two number $a$ and $b$  (where $ a,b \in \mathbb{Q} $). How can I prove that $a \times b \in \mathbb{Q} $ ? Of course I'm interested even if the numbers $\in \mathbb{Z}$ or any set. What I would like to know is the demonstration of this assumption, and if is valid for every set  ($\mathbb{N,Q,I,R} \ldots)$ and operation.
From what I'm reading seems that this is deduced because multiplication is an operation and so the set is closed under the operation $\times$. But why?
 A: In general, when we define in mathematics a strucuture $S$ this is (at least) a "couple" $\langle D, * \rangle$ made by a domain "$D$" of "objects" and an operation ("$*$", e.g. a binary one) defined on them, and we write :


$S = \langle D , * \rangle$.


In this case, "by definition" the domain is "closed under" the operation, i.e.

for all $a, b \in D$, we have that $a*b \in D$.

The simplest example is $\langle \mathbb N, + \rangle$.
But after having defined the structure, we can introduce new ("derived") operations, like "$-$" in $\mathbb N$. In this case, it is not true in general that the structure is still closed under the new operation.
If we put :

$a - b$ iff $\exists x (a = b+x)$

we have that, for example, $2 - 3$ is not defined in $\mathbb N$.
A: This does hold for your examples $\mathbb Q$ and $\mathbb Z$.
If $a,b \in \mathbb Q$, then $a=\frac{p}{q}$ and b = $\frac{r}{s}$ where $p,q,r,s \in \mathbb Z$ and $q,s \ne 0$ Now $a\times b = \frac{pr}{qs}$. And if $pr,qs \in \mathbb Z$, then $ab \in \mathbb Q$. So the first problem reduces to the second, as an exercise, try to prove the second part for yourself. 
It doesn't hold for all sets however. Consider set $A=\{3,4\}$. Now $3,4 \in A$, but $3\times4 \not \in A$
Also, this need not hold for all operations either. Consider subtraction. If $a,b \in \mathbb N$, $a-b \in \mathbb N$ need not be true. 
Consider division, if $a,b \in \mathbb Z$, $\frac{a}{b} \in \mathbb Z$ need not be true either.
If you consider $\sqrt{x}$ to be an operation, this this isn't valid on $\mathbb Q$ either. 

EDIT: Apparently I was mistaken in the definition of an 'operation'. According to one user, the original statement "is valid for every set and operation" is true by definition. See comment thread below.
A: The set of rationals is closed under multiplication. You can prove it if you take representation  $$a=\frac pq, b=\frac rs \implies a\times b= \frac {pr}{qs}$$, where $p,q,r,s$ are integers. Here we use the fact that $\mathbb{Z}$ is also closed under multiplication and has non zero divisors. However, for example irationals are not closed under multiplication. Note that $\sqrt{3}\sqrt{3}=3$.
A: Some abstract algebra books assume that multiplication is closed for the natural numbers, integers, rational numbers, real numbers and complex numbers.
Multiplication in the complex numbers is defined at the expense of multiplication in the real numbers. In fact the complex numbers themselves are constructed at the expense of the real numbers.
Multiplication in the real numbers is defined at the expense of multiplication in the rational numbers. In fact the real numbers themselves are constructed at the expense of the rational numbers.
Multiplication in the rational numbers is defined at the expense of multiplication in the integers. Once this is done, you can prove that multiplication in the rational numbers is closed. In fact the rational numbers themselves are constructed at the expense of the integer numbers.
Multiplication in the integers in defined at the expense of multiplication in the natural numbers. In fact the integers themselves are constructed at the expense of the natural numbers.
It works just the same for the sum.
So it boils down to knowing how to define multiplication in the natural numbers and then constructing each of the steps above.
Multiplication in the natural numbers is defined, by the way, at the expense of the sum in the natural numbers.
Some abstract algebra books deal with part of the process above. I've never seen it all done in an abstract algebra book. Usually sum in the natural numbers is assumed and the rest is done from there.
To see how the sum is defined in the natural numbers, you should pick up an elementary set theory book.
It goes roughly like this. One starts with the set of natural numbers (which can also be defined) to which something called $0$ belongs and a successor function, i.e., a function that given a natural number, yields what one would intuitively call its successor. Given a natural number $n$, it's common to denote it's successor by $n^+$.
From this one defines $+_{\mathbb N}$, recursively, as follows: let $m,n\in \mathbb N$, then


*

*$n+_{\mathbb N}0:=0$

*$n+_{\mathbb N}m^+:=(n+_{\mathbb N}m)^+$


From here one can prove the expected properties such as $n+_{\mathbb N}1=n^+, m+_{\mathbb N}(n+_{\mathbb N}k)=(m+_{\mathbb N}n)+_{\mathbb N}k$, etc.
Then multiplication in $\mathbb N$ can defined and one goes up from there.
I didn't focus on actually proving that multiplication in $\mathbb Q$ is closed because such a problem only arose to the OP because of his unawareness of the process explained above.
