Why is the Yang-Mills gauge group assumed compact and semi-simple? What is the motivation for including the compactness and semi-simplicity assumptions on the groups that one gauges to obtain Yang-Mills theories?  I'd think that these hypotheses lead to physically "nice" theories in some way, but I've never, even from a computational perspective. really given these assumptions much thought.
 A: As Lubos Motl and twistor59 explain, a necessary condition for unitarity is that the Yang Mills (YM) gauge group $G$ with corresponding Lie algebra $g$ should be real and have a positive (semi)definite associative/invariant bilinear form $\kappa: g\times g \to \mathbb{R}$, cf. the kinetic part of the Yang Mills action. The bilinear form $\kappa$ is often chosen to be (proportional to) the Killing form, but that need not be the case.
If $\kappa$ is degenerate, this will induce additional zeromodes/gauge-symmetries, which will have to be gauge-fixed, thereby effectively diminishing the gauge group $G$ to a smaller subgroup, where the corresponding (restriction of) $\kappa$ is non-degenerate.
When $G$ is semi-simple, the corresponding Killing form is non-degenerate.
But $G$ does not have to be semi-simple. Recall e.g. that $U(1)$ by definition is not a simple Lie group. Its Killing form is identically zero. Nevertheless, we have the following YM-type theories:


*

*QED with $G=U(1)$.

*the Glashow-Weinberg-Salam model for electroweak interaction with  $G=U(1)\times SU(2)$.
A: I recommend that you to read the chapter 15.2 in "The Quantum Theory of Fields" Volume 2 by Steven Weinberg, he answers precisely your question.
Here a short summary
In a gauge theory with algebra generators satisfying
$$
[t_\alpha,t_\beta]=iC^\gamma_{\alpha\beta}t_\gamma
$$
it can be checked that the field strength tensor $F^\beta_{\mu\nu}$ transforms as follows
$$
\delta F^\beta_{\mu\nu}=i\epsilon^\alpha C^\beta_{\gamma\alpha} F^\gamma_{\mu\nu}
$$
We want to construct Lagrangians. A free-particle kinetic term must be a quadratic combination of $F^\beta_{\mu\nu}$ and Lorentz invariance and parity conservation restrict its form to
$$
\mathcal{L}=-\frac{1}{4}g_{\alpha\beta}F^\alpha_{\mu\nu}F^{\beta\mu\nu}
$$
where $g_{\alpha\beta}$ may be taken symmetric and must be taken real for the Lagrange density to be real as well. The Lagrangian above must be gauge-invariant thus it must satisfy
$$
\delta\mathcal{L}=\epsilon^\delta g_{\alpha\beta}F^\alpha_{\mu\nu}C^\beta_{\gamma\delta}F^{\gamma\mu\nu}=0
$$
for all $\epsilon^\delta$. In order not to impose any functional restrictions for the field strengths $F$ the matrix $g_{\alpha\beta}$ must satisfy the following condition
$$
g_{\alpha\beta}C^\beta_{\gamma\delta}=-g_{\gamma\beta}C^\beta_{\alpha\delta}
$$
In short, the product $g_{\alpha\beta}C^\beta_{\gamma\delta}$ is anti-symmetric in $\alpha$ and $\gamma$.
Furthermor the rules of canonical quantization and the positivity properties of the quantum mechanical scalar product require that the matrix $g_{\alpha\beta}$ must be positive-definite. Finally one can prove that the following statements are equivalent  


*

*There exists a real symmetric positive-definite matrix $g_{\alpha\beta}$ that satisfies the invariance condition above. 

*There is a basis for the Lie algebra for which the structure constants $C^\alpha_{\beta\gamma}$ are anti-symmetric not only in the lower indices $\beta$ and $\gamma$ but in all three indices $\alpha$, $\beta$ and $\gamma$.  

*The Lie algebra is the direct sum of commuting compact simple and $U(1)$ subalgebras.  


The proof for the equivalence of these statements as well as a more in-detail presentation of the material can be found in the aforementioned book by S. Weinberg.
A proof for the equivalence for $g_{\alpha\beta}=\delta_{\alpha\beta}$ (actually the most common form) was given by M. Gell-Mann and S. L. Glashow in Ann. Phys. (N.Y.) 15, 437 (1961)
A: It's because you want the kinetic part of the Yang Mills action $$ \int Tr({\bf{F^2}}) dV$$ to be positive definite.  To guarantee this, the Lie algebra inner product you're using (Killing form) needs to be positive definite.  This is guaranteed if the gauge group is compact and semi-simple.  (I'm not sure if it's only if G is compact and semi simple though.  Maybe someone else could fill in this detail).
A: These answers are repetitions of an argument that is insufficient and incorrect to explain why the lie algebra metric must be positive definite.
In fact, Weinberg never proves his assertion that canonical quantization and unitarity impose the requirement that the metric be positive definite and a counter argument is easily found in QED.  And nobody questions authority.
After gauge fixing QED in the Feynmann gauge we obtain
$\partial_\mu A^\nu \partial^\mu A_\nu$.  We can write this with a spacetime metric (not the lie algebra metric) using the convention $g=diag(-1,1,1,1)$. Then we obtain $-\partial_\mu A_0\partial^\mu A_0+\partial_\mu A_i\partial^\mu A_i$.
You therefore have kinetic terms which are negative.  However, it is well known (as per BRST treatment of QED) that nevertheless the theory has unitarity and is well behaved.
This happens also in quantum mechanics. The lagrangian $-\dot x^2+x^2$ is just as well behaved as the usual H.O. because they have the same equations of motion.
Now, you can see that having lagrangians with negative kinetic terms lead to consistent theories.  Therefore, having an SO(3,1) Lie Algebra also leads to a properly behaved theory.
I then ask those who repeat scriptures to prove, instead of repeat, that YM with SO(3,1) lie algebra leads to negative norm states, loss of unitarity or other fundamental properties that renders it unsuited to describe nature.
