What does matrices act on different spaces mean in QFT? I have a Dirac kinetic term in a Lagrangian. 
$$ i\bar{\psi}\gamma^\mu D_\mu\psi
 = i\bar{\psi}\gamma^\mu\partial_\mu\psi
 + g\bar{\psi}\gamma^\mu\psi A^a_\mu T^a,$$
However, I usually heard that people say that:

$\gamma_{\mu}$ and $T^a$
  are both matrices, but they act in different spaces and are not multiplied with each other as matrices.
  They therefore commute with each other.

What does this sentence mean? On what spaces are they acting on? In the case of $SU(3)$, I know $T^a$ is a $3\times3$ matrix, how should I understand this "multiplication" in the Lagrangian term?
Another question I don't understand is that for example, I know how $SU(2)$ acts on a doublet and $U(1)$ acts on a field. How should I understand the multiplication of $SU(2)\times U(1)$ with a doublet? I have little knowledge of Group theory.
Many thanks!
 A: What it means is that our Lagrangian lives in the direct product space. In particular, the standard model space is 
$$
SM = P \times SU(3)_c \times U(1)_{Y} \times SU(2)_L
$$
where $P$ stands for the poincare group. The "$\times$" symbol means that each of these spaces is separate, and doesn't talk to one another. 
As a consequence, any representation of these spaces (i.e. matrices) completely commute, since if they didn't then they would somehow "know" about one another. 
A: A simple example of how operators act in different spaces and then commute is a quantum mechanical two-particle system, A and B. A (non-entangled) state will be the following:
$$\left | \psi \right > = \left | A \right > \times \left | B \right >$$
A operator $O_1$ acting on the first particle is actually $O^A_1 \times I^B$, and $O_2$ acting on the second particle is $I^A \times O^B_2$. A product of these operators acting on the state will be:
$$(O^A_1 \times I^B) (I^A \times O^B_2) (\left | A \right > \times \left | B \right >) = (I^A \times O^B_2) (O^A_1 \times I^B) (\left | A \right > \times \left | B \right >) = (O^A_1 \left | A \right >) \times (O^B_2 \left | B \right >)$$
In the same way, $\gamma$ and $T$ are operators in different spaces, so they act on the full state of the system as $\gamma_\mu \times I_2$ and $I_1 \times T^a$.
Multiplication of elements of different groups can be understood in the following way: (using a field and a doublet as an example)
Let $\phi$ be a field and $\begin{pmatrix}A\\B\end{pmatrix}$ a doublet; then, we REPRESENT then "simply multiplied" in the doublet, as indicated: $\left | \psi \right > = \begin{pmatrix} {\psi A} \\ \psi B\end{pmatrix}$; but this is just a notation, we have to take care, because $\phi$ and $(A, B)$ transforms differently. This is not just a doublet as before.
If T acts on the field and $R_\theta$ is the rotation operator on the doublet, we would have:
$$T R_\theta \left | \psi \right > = R_\theta T \left | \psi \right > = \begin{pmatrix} T(\psi) \cdot (Acos\theta + Bsin\theta) \\ T(\psi) \cdot (-Asin\theta + Bcos\theta) \end{pmatrix}$$
Note that this is exactly the same thing as the cross-product notation above, in my quantum mechanical example. Different operators act on different parts of our full state. $T$ is, in fact, $T \times I_{doublet}$, and so on.
