Why not $SL_n (\mathbb R)$ in this exercise I just solved the following exercise:

Let $SL_2(\mathbb Z)$ denote the set of $2\times2$ matrices with integer entries and determinant $1$. Prove that $SL_2(\mathbb Z)$ is a subgroup of $GL_2(\mathbb R)$. Is $SL_n(\mathbb Z)$ a subgroup of $GL_n(\mathbb R)$?

It's clear that if $A,B \in SL_2(\mathbb Z)$ then also $AB \in SL_2(\mathbb Z)$ and that $A^{-1} \in SL_2 (\mathbb Z)$ follows from the Cayley-Hamilton formula for the inverse (it is clear the entries are integers). Similarly the answer to the question is clearly affirmative. 
What I don't quite get is why it is $\mathbb Z$ for the subgroup and $\mathbb R$ for the group. 
I believe that it is also true that $SL_n(\mathbb Z)$ is a subgroup of $GL_n(\mathbb Z)$ and $SL_n(\mathbb R)$ is a subgroup of $GL_n(\mathbb R)$. So why is it integers for the subgroup and reals for the group in the exercise? Does this setting have any special properties?
 A: The exercise would have been valid as well if it had used $GL_n(\mathbb{Z})$ as the large group. However, as has been pointed out in the comments, the important and interesting fact about $SL_n(\mathbb{Z})$ is that inverses of such matrices with integer coefficients again have integer coefficients. Had the exercise used $GL_n(\mathbb{Z})$ instead, the text (or you) would have first had to show that this was indeed a group, which would entail showing that the inverse of a matrix in $GL_n(\mathbb{Z})\subset GL_n(\mathbb{R})$ was again in $GL_n(\mathbb{Z})$, which would remove much of the interest from the above exercise.
A: $SL_n(\mathbb{R})$ is a subgroup of $GL_n(\mathbb{R})$. In fact, it is an algebraic subgroup of $GL_n(\mathbb{R})$ that is determined by the equation $\det A = 1$, where $A$ denotes the matrix. The reason is that the determinant function is multiplicative, i.e. $\det(AB) = \det(A) \det(B)$ and thus also $\det(A^{-1}) = \det(A)^{-1}$.
If $A \in SL_n(\mathbb{R})$, then there exists $A^{-1} \in GL_n(\mathbb{R})$ and by the above $\det(A^{-1})=1$, i.e. $A^{-1} \in SL_n(\mathbb{R})$.
Therefore $SL_n(\mathbb{R})$ is a(n algebraic) subgroup of $GL_n(\mathbb{R})$.
Moreover $SL_n(\mathbb{Z})$ is a subgroup of $GL_n(\mathbb{Z})$. The main point to check is that the inverse of a matrix in $SL_n(\mathbb{Z})$ has again integer coefficients. This is the case, since only the inverse of the determinant of $A$ occurs as denominator, which is $1$ for $A \in SL_n(\mathbb{Z})$.
Since $GL_n(\mathbb{Z})$ is a subgroup of $GL_n(\mathbb{R})$, one concludes that $SL_n(\mathbb{Z})$ is also a subgroup of $GL_n(\mathbb{R})$.
A: If the exercise had been about $GL_n (\mathbb Z)$ and $SL_n(\mathbb Z)$ then there would not have been much to prove. 
The only part in this exercise that makes it interesting in any way is to notice that the inverse of a matrix in $SL_n(\mathbb Z)$ has again integer coefficients. (which, if viewed as a subgroup of $GL_n(\mathbb R)$, is not immediate)
