When do $M_n, GL_n, SL_n$ commute with direct products? We know, for example, that $SL_2(\mathbb Z/n\mathbb Z)\cong \oplus_{p\mid n}SL_2(\mathbb Z/p^{e_p}\mathbb Z)$. To what extend does this hold in general? That is, if we're given, say, some commutative ring $R$ with a decomposition $R\cong \oplus_i R_i$, when is it true that $F(R)\cong \oplus_i F(R_i)$, where $F=M_n, GL_n, SL_n$? Any references, proofs, (counter)examples would be welcome. 
 A: A matrix of size $n\times m$ over $\prod_\alpha R_\alpha$ is a family $(m_{ij})_{ij}$ where $m_{ij} \in \prod_\alpha R_\alpha$. But this means $m_{ij} = (m_{ij}^\alpha)_\alpha$ for some $m_{ij}^\alpha$'s. 
You can now reorder stuff and get that a matrix over this ring is actually a family of matrices, by noting that you can put $M^\alpha_{ij} = m_{ij}^\alpha$, and $M^\alpha$ is an $n\times m$ matrix this way. 
This seems really stupid, and it is : it's just the fact that products and powers commute. 
Now it's really easy to see (purely computational) that addition and multiplication correspond to pointwise addition and multiplication : it's the case because it is in $\prod_\alpha R_\alpha$. Let me do multiplication for instance : suppose I have two matrices $M, N$. If I compute the $ij$ coordinate of their product, it is $\displaystyle\sum_k M_{ik}N_{kj}$ : this is an element of the produt ring, so it's a family $((\displaystyle\sum_k M_{ik}N_{kj})^\alpha)_\alpha$; but the definition of the operations on the product ring tells us that the $\alpha$th coordinate is $\displaystyle\sum_k M_{ik}^\alpha N_{kj}^\alpha$, that is, its $\alpha$th coordinate is the $ij$th coordinate of $M^\alpha N^\alpha$. 
So what I just proved (well, I proved part of it) is that "taking the $\alpha$th coordinate" is a morphism from $M_{n\times m}(\prod_\alpha R_\alpha)\to \prod_\alpha M_{n\times m }(R_\alpha)$. It's also really easy to check it's an isomorphism (just as easy to check bijectivity as to exhibit the inverse, I'll leave that to you).
Ok now take $m=n$, and let's look at $\det$. The thing is, $\det$ has an explicit formula in terms of sums and products, and so it will, too, commute with taking the $\alpha$th coordinate. Indeed, write $\det(M^\alpha) = \displaystyle\sum_\sigma \epsilon(\sigma)\prod_i M^\alpha_{i\sigma(i)} = (\displaystyle\sum_\sigma \epsilon(\sigma)\prod_i M_{i\sigma(i)})^\alpha = \det(M)^\alpha$. 
It remains to check two things : invertible elements of $\prod_\alpha R_\alpha$ are families of invertible elements of $R_\alpha$, and $1$ in $\prod_\alpha R_\alpha$ is the sequence of $1\in R_\alpha$ (actually you should check the second fact first). With these, it will follow that $GL_n(\prod_\alpha R_\alpha) \cong \prod_\alpha R_\alpha$, and $SL_n(\prod_\alpha R_\alpha) \cong \prod_\alpha SL_n(R_\alpha)$. 
And actually, if you think about how trivial or stupid what we did was, you'll start having trouble making the difference between the two : what's the difference between an $n\times m$ sequence of $A$-indexed families, and an $A$-indexed family of $n\times m$-sequences ? The answer : not much. 
