I'm trying to understand the concept of free groups , and from what I've learned so far , a group $G$ is called a free group , if there is a subset $S ⊂ G$ such that any element of G can be written uniquely as a product of elements of S , and their inverses .
So , is $\Bbb{6Z}$ a free group ? or $\Bbb{Z}/17\Bbb{Z}$ ? or the group
$$A = \left\langle\begin{pmatrix} 1 & 1 \\ 0 & 1\end{pmatrix} , \begin{pmatrix} 0 & 2 \\ -1 & 0\end{pmatrix}\right\rangle$$
Let's take for example $\Bbb{18Z}$ (the coset $18k , k \in \Bbb{Z}$) , which is a subset of $\Bbb{6Z}$ (the coset $6k , k \in \Bbb{Z}$) .
So , by the definition of free groups , do I need to take for example an element of $\Bbb{6Z}$ , e.g. $12$ , and few elements of $\Bbb{18Z}$ , and build (with them and their inverses) the element $12$ ?
Free groups may be defined via an "universal property" as follows:
Note that there are infinitely many free groups generated by a set $S$. The universal property implies the following:
Of course, an essential result is that for a given set $S$, there always exists a free group generated by that set. That group can be constructed in the following way: Let $S_i= S\times i$ for $i=1,-1$. Let $\overline{G}$ be the set of finite (possibly empty) sequences in $S_1\cup S_{-1}$. A sequence in $\overline{G}$ is said to be "reduced" if no two consecutive elements of the sequence are of the forme $(s,i)(s,-i)$ for some $s\in S$. Note that every sequence in $\overline{G}$ can be uniquely reduced.
Finally, let $G$ be the subset of $\overline{G}$ consisting of the reduced sequences, with group operation given by concatenation followed by reduction. Then $G$ is a free group of $S$ (the identity of $G$ is the empty sequence $()$), with $\phi(s)=(s,1)$. If $g:S\rightarrow H$, we simply define $G((s_1,i_1),\ldots,(s_n,i_n))=g(s_1)^{i_1}\cdots g(s_n)^{i_n}$.
In particular, is $S\neq\varnothing$, then take $s\in S$ and consider any function $f:S\rightarrow\mathbb{Z}$ such that $f(s)=1$. By the universal property, there exists a homomorphism $F:G\rightarrow\mathbb{Z}$ such that $F(\phi(s))=1$. Therefore, $F$ is surjective, and hence $G$ must be infinite.
Now you can easily verify that your definition of free group is equivalent to the one I gave here (in your case, $G$ is a free group generated by $S\subseteq G$ and $\phi$ is simply the inclusion).
Now we know that $\mathbb{Z}/17\mathbb{Z}$ is not free since it is finite. $\mathbb{Z}$ is the free group generated by $\left\{a\right\}$, for if $\phi:a\in\left\{a\right\}\mapsto 1\in\mathbb{Z}$ and $f:a\in\left\{a\right\}\mapsto f(a)\in H$, then $F(n)=f(a)^n$ "extends" $f$ in the above sense.
The case of the matrices is more difficult. But as in the above answer, there exists a subgroup of $SL(2,\mathbb{Z})$ which is a free group generated by two elements (if I'm not mistaken, those two elements are $\begin{pmatrix} 1 & 2\\0 & 1\end{pmatrix}$ and $\begin{pmatrix} 1 & 0\\ 2 & 1\end{pmatrix}$).