Double coset representatives and structure of hecke algebras Let $GL_n(F_q)$ be the general linear group over finite field $F_q$ and $B_n$ be its borel subgroup consisting of all upper triangular matrices. Then the double cosets $B_n\backslash GL_n(F_q)/B_n$ are parametrised by the permutation group $S_n$, which can be viewed as permutation matrices. Further by the theory of representations of symmetric groups, it follows that the number of symmetric permutation matrices is equal to the number of irreducible representations(with multiplicities) of the Hecke algebra $C[B_n\backslash GL_n(F_q)/B_n]$. 
My question is: how far is it true? In the sense that suppose I am given a general matrix group (with entries not necessarily from a field) $G$ with a subgroup $B$ such that double cosets $B\backslash G/B$ can be parametrised by symmetric matrices, then is it true that the Hecke algebra $C[B\backslash G/B]$ is commutative?   
 A: I'm not sure I understand the first paragraph, but regarding the second I think this goes by the name of "Gelfand's trick", used to prove eg commutativity of the spherical Hecke algebra attached to $G=GL_n(Q_p)$ and $B=GL_n(Z_p)$ --- namely we first discover that we can write down coset representatives that are invariant under transposition (in this case diagonal matrices with powers of $p$ on the diagonal). Then we recall that transposition is an anti-isomorphism of the group algebra with itself. Thus the Hecke algebra is a subalgebra on which an anti-isomorphism acts as the identity, hence it is in fact commutative. The same trick will work in your general situation.
A: This question seems slightly strangely phrased to me: the case $\mathbb C[B_n\backslash GL_n(F_q)/B_n]$ gives you a Hecke algebra which is not commutative. It has the same dimension of the group algebra of the symmetric group, and by deformation techniques it's known to have the same number of irreducible representations, but none of this requires commutativity (though that does hold sometimes, and David's answer about the Gelfand trick is a very slick strategy).
If you're interested in where the theory of Hecke algebras relating representations of the symmetric group $S_n$ and the representations of $\text{GL}_n(\mathbb F_q)$ extends to, then there are a number of directions. For a finite group of Lie type $G$, the classification of all irreducible representations hinges on generalizations of the kind of Hecke algebra you mention, where instead of the double-coset algebra, you consider twisted versions of it which are endomorphism algebras of certain "cuspidal" representations of (rational) Levi subgroups of $G$. These turn out to have presentations like the Hecke algebra attached to $S_n$, though sometimes with parameters which are various powers of $q$. One standard reference is Carter's book on finite groups of Lie type, where there is discussion of these endomorphism algebras. (A crucial ingredient is usually that $G$ has a $BN$ pair, so that the $B$--double cosets are indexed by a Coxeter group.)
Similar kinds of Hecke algebras (though now infinite-dimensional "affine" Hecke algebras) arise when studying representations of p-adic groups, Roger Howe has a nice article in Lecture Notes in Math 1804 on the use of Hecke algebras in the p-adic theory -- slight generalisations of the affine Hecke algebras used to study the case of representations generated by an Iwahori fixed vector turn out to allow you to study surprisingly large parts of the representation theory of p-adic groups.
