Complex Lie algebra vs Real Lie algebra in Physics A Lie algebra is a vector space $\mathfrak{g}$ over some field $F$ together with a binary operation $$\mathfrak{g}\times\mathfrak{g}\to\mathfrak{g}$$ called the Lie bracket satisfying the following axioms: Bilinearity, Alternativity, Jacobi identity, Anticommutativity.
(Correct me if I am wrong)*
A real Lie algebra is real vector space, while a complex Lie algebra is a complex vector space.
Given a complex Lie algebra $\mathfrak g$, a real Lie algebra $\mathfrak{g}_0$ is said to be a  real form of $\mathfrak g$ if the complexification $$\mathfrak{g}_0 \otimes_{\mathbb{R}} \mathbb{C} \simeq \mathfrak{g}$$ is isomorphic to $\mathfrak{g}$.
My question is:


*

*Where do we encounter Real Lie algebra in Physics? (this should be abundant.)
Do we have examples of both compact and noncompact real Lie group?




*Where do we encounter Complex Lie algebra in Physics? (this should be rare? or abundant?)
Do we have examples of both compact and noncompact complex Lie group?

 A: One interesting example: For the one-dimensional quantum simple harmonic oscillator, the operators $1$, $\hat{x}$ and $\hat{p}$ generate a real Lie algebra (the Heisenberg algebra). However, it is often useful to work instead in terms of the raising and lowering operators, so that our generators are $1, \hat{a},\hat{a}^\dagger$. Since $\hat{a} = \hat{x} + i\hat{p}$, the algebra they generate is the complexification of the Heisenberg algebra.
There is a useful sense in which the Lie algebra of any Lie group is "naturally" real, since it's a tangent space of a manifold. For example $GL_n(\mathbb{C})$, considered as an abstract Lie group, is a $2n^2$-dimensional manifold, so the Lie algebra is "really" a real vector space with $2n^2$ basis vectors. In physics we usually think of it as a complex vector space with $n^2$ basis vectors, but we don't have to. Every Lie algebra I can think of in physics comes from some Lie group, so complex Lie algebras come only from either complexification (as in the raising/lowering operator case) or from treating a $2n$-dimensional real Lie algebra as an $n$-dimensional complex Lie algebra. (I don't have a name for the latter process, or much understanding of it - suggestions welcome).
A: Compactness of a Lie-group is a property of topology, whereas compactness is also defined on Lie-algebras, but in that case it is an algebraic property. A Lie-algebra is called compact if its Killing-form is negative definite. Without going to deeply in the theory of Lie-algebras and Lie-groups, the Killing-form https://en.wikipedia.org/wiki/Killing_form    is the bilinear form used on the Lie-algebra, i.e. a kind of scalar product.
In the post of Daniel the Heisenberg group https://en.wikipedia.org/wiki/Heisenberg_group#Heisenberg_algebra  is mentioned, that group is nil-potent, it has a nil-potent Lie-algebra https://en.wikipedia.org/wiki/Nilpotent_Lie_algebra  . The Killing-form on a nil-potent Lie-algebra is zero, i.e. not at all (neither positive nor negative) definite.
Indeed there exist plenty of compact groups: SU(n), U(n), SO(n), and even Sp(n) and many more. All are real as the group elements are parametrised by real parameters (in case of the well-known rotation group SO(3) is the rotation-vector $\vec{\alpha} =(\alpha_1, \alpha_2, \alpha_3) \in \mathbb{R}^3$.
There is a famous real non-compact group in physics: the Lorentz-group which parametrised by  6 parameters $\vec{\alpha}$ and $\vec{v}$, the latter the 3-velocity. It is a real group as the parametrisation is real. As the parametrisation space of the velocity is open ($\vec{v}$ never reaches speed of light) is obviously non-compact.
For compact groups the representation theory is particularly simple, in particular the matrices representing group elements are unitary. This explains the great interest in compact groups, also as gauge group (Yang-Mills).
Each real and in particular the mentioned compact groups above can be complexified, i.e. means that the scalar multiplication of the corresponding Lie-algebra is done with complex numbers instead of real numbers. For the classification of the Lie-algebras it is easier to consider complex algebras, in particular since the field $\mathbb{C}$ is closed (algebra works "better" on closed fields, example is the for instance the fundamental theorem of algebra that only works on the field of complex numbers).
In the application of groups in physics real groups dominate, but in order to understand the group respectively the Lie-algebra structure it is often easier to consider the complexfied group. There is a completed representation theory of complexified semi-simple Lie-groups https://en.wikipedia.org/wiki/Representation_theory_of_semisimple_Lie_algebras   of which compact Lie-algebras is a subset.
Actually the restricted Lorentz-group can be considered as a complex group of 3 complex parameters $z =\vec{\alpha} + i\vec{v}$. It is then called $SO(3,\mathbb{C})$.
However, the Lorentz-group can also be considered as real group with 6 parameters.
As a real group the representation theory of the Lorentz-group is a bit more involved than the representation theory of the complexified Lorentz-group.
More details can be found in textbooks of semi-simple Lie-groups of which the Lorentz-group is one.
