What is the trace in the Chern-Simons action I have been looking at the Chern-Simons Lagrangian in $(2+1)$-dimensional spacetime $M$ in terms of a gauge field $A$:
$$ S[A] = \frac{k}{4 \pi}\int_M \text{Tr}(A \wedge \text{d}A+ \frac{2}{3}A \wedge A \wedge A). $$
The Chern-Simons theory allows $A$ to be a "Lie algebra valued $n$-form". According to Wikipedia, a Lie algebra $n$-form is defined as an object $A \in (\mathfrak{g} \times M) \otimes \wedge^k T^*(M) $, where $\mathfrak{g}$ is a Lie algebra and $T^*(M)$ is the cotangent bundle. I believe this means that I can take my gauge field $A$ and decompose it as
$$ A = \tilde{A} \otimes \omega = A_{\mu}^a T_a \otimes \text{d}x^\mu$$
where $\tilde{A}$ is a Lie algebra valued field on spacetime, $\omega$ is an n-form and $\{ T_a \}$ and $\{ \text{d}x^\mu\}$ are the bases for $\mathfrak{g}$ and $T^*(M)$ respectively. 
From studying Yang-Mills theory, I am aware that I can produce objects which are scalar with respect to gauge transformations by using the Killing form 
$$ K(X,Y) = \text{Tr}(\text{ad}X \text{ad}Y)$$
where ad is the adjoint representation of the Lie algebra, however the trace notation "Tr" in the Chern-Simons action has always bothered me - is it really a trace in the usual matrix sense? Some literature seems to suggest that the "trace" is in fact an invariant bilinear form on our Lie algebra, i.e. a Killing form. It is at this point that I get confused. 
My question
If Tr is to be interpreted as an inner product, what does $ \text{Tr}(A \wedge \text{d}A)$ and $ \text{Tr}(A \wedge A \wedge A)$ mean? An inner product should take two arguments so what are the arguments in each case and how do I explicitly evaluate this? 
 A: Generally speaking, for a compact connected Lie group $G$ of the form,
$$G  = U(1) \times \dots \times U(1) \times G_1\times\dots\times G_s$$
where $G_i$ are compact, simple Lie groups, $\langle \cdot,\cdot\rangle_{\mathfrak g}$ is an $\mathrm{Ad}_G$-invariant, positive definite scalar product on $\mathfrak g$ which can be constructed as the direct sum of:


*

*a positive definite scalar product on $\mathfrak{u}(1)\times\dots\times \mathfrak{u}(1)$;

*$\mathrm{Ad}_{G_i}$-invariant positive definite scalar products on $\mathfrak g_i$, which may always be constructed by, for example, the negative of the Killing form.


Now suppose we have a Lie algebra-valued one form, $A$, by the notation $\langle A, A\rangle$ we mean taking the wedge product and the inner product, above defined.
Now the notation $\mathrm{Tr}$ is misleading because to construct the Lagrangian, we take wedge products, and then evaluate an inner product, which happens to involve a trace, but I find it more proper to note we are taking an inner product. Thus by,
$$\mathrm{Tr}(A\wedge A \wedge A)$$
we mean $\langle [A,A],A\rangle$ (with wedge products implied), up to some constant depending on the normalization chosen for the structure constants. Two useful references are:


*

*Mathematical Gauge Theory by Mark J.D. Hamilton

*Differential Geometry, Gauge Theory and Gravity by M. Göckeler and T. Schücker

