If it exists then, by definition, it is unique up to conjugation.
See for instance (Hofmann-Morris, def. 4.24).
Also every quotient of an almost connected group is almost connected.
This is (Antonyan, theorem 1.2).
In particular, in the above situation the subgroup inclusion
|Lie group||maximal compact subgroup|
|real general linear group||orthogonal group|
|its connected component||special orthogonal group|
|complex general linear group||unitary group|
|symplectic group||unitary group|
|complex symplectic group?||compact symplectic group|
|Narain group||two copies of the orthogonal group|
|special Lorentz/AdS etc. group|
|Lorentz / AdS spin group|
The following table lists specifically the maximal compact subgroups of the ”-series” of Lie groups culminating in the exceptional Lie groups .
|real form||maximal compact subgroup|
A maximal compact subgroup may not exist at all without the almost connectedness assumption. An example is the Prüfer group endowed with the discrete (-dimensional) smooth structure. This is a union of an increasing sequence of finite cyclic groups, each obviously compact.
A general survey is given in
Textbooks with relevant material include
M. Stroppel, Locally compact groups, European Math. Soc., (2006)
Karl Hofmann, Sidney Morris, The Lie theory of connected pro-Lie groups, Tracts in Mathematics 2, European Mathematical Society, (2000)
Original articles include
M. Peyrovian, Maximal compact normal subgroups, Proceedings of the American Mathematical Society, Vol. 99, No. 2, (1987) (jstor)
Sergey A. Antonyan, Characterizing maximal compact subgroups (arXiv:1104.1820v1)