Now that the motivation for the question has emerged (algebraicity of $M$ inside $G$), here is how to handle it. Let $G$ be a connected reductive $\mathbf{R}$-group, and $P$ a parabolic $\mathbf{R}$-subgroup of $G$, soand $P=L\ltimes U$ for the unipotent radical$S$ a maximal split $U$ of$\mathbf{R}$-torus in $P$ and Levi subgroup $L \subset P$, so [Edit: what follows(so $S$ is only foralso maximal as such in $G$). We may and do choose a minimal parabolic $\mathbf{R}$-subgroup $P_0$ of $G$ contained in $P$; I need to revisit this later and containing $S$.]
The set $L=Z_G(S)$$\Phi(G,S)$ of nontrivial $S$-weights on ${\rm{Lie}}(G)$ is the (possibly non-reduced) relative root system spanning a finite-index subgroup of the character lattice ${\rm{X}}(S')$ for $S' := (S \cap \mathbf{D}(G))^0$ a maximal split $\mathbf{R}$-torus in $S\subset P$$\mathscr{D}(G)$.
Clearly $P(\mathbf{R})=L(\mathbf{R})\ltimes N$ for $N:=U(\mathbf{R})$. DefineThe choice of $A:=S(\mathbf{R})^0$$P_0 \supset S$ corresponds to a positive system of roots in the relative root system, soor equivalently a basis $M$$\Delta$ of the relative root system, and there is designed to be a complement tonatural inclusion-preserving bijective correspondence between the set of parabolic $A$ in$\mathbf{R}$-subgroups $L(\mathbf{R})$. We seek an algebraic construction$Q$ of $M$. The maximal compact subgroup$G$ containing $P_0$ and the set of subsets of $S(\mathbf{R})$ is$\Delta$. In this way $S[2](\mathbf{R})$, and it is a complement$P$ corresponds to a subset $A$ in$I \subset \Delta$. Explicitly, $S(\mathbf{R})$ since$U := \mathscr{R}_u(P)$ we have $P = L_I \ltimes U$ for $L_I := Z_G(S_I)$ with $S_I := (\cap_{a \in I} \ker a)^0$ a subtorus of $S$. Thus, $P(\mathbf{R}) = L_I(\mathbf{R}) \ltimes N$ for the group $N:= U(\mathbf{R})$ that is a splitnilpotent $\mathbf{R}$-torus and(since $\mathbf{R}^{\times} = \mathbf{R}^{\times}[2] \times (\mathbf{R}^{\times})^0$$U$ is unipotent).
Let $M \subset L(\mathbf{R})$ be a maximal compact subgroup; typically$A = S_I(\mathbf{R})^0$. If I remember correctly, Langlands' definition/construction of $M$ given the above choices is disconnected since $L(\mathbf{R})$ may be disconnected though with finite component group. See Hochschild's book The Structure of Lie Groups foras the good theory of maximal compact subgroupsunique closed subgroup of Lie groups$L_I(\mathbf{R})$ with finite component group; this appliescompact center such that it is complementary to the Lie groupcentral closed subgroup $\mathcal{G}(\mathbf{R})$$A$ of $L_I(\mathbf{R})$. Your question is to show that $M = H(\mathbf{R})$ for any linear algebraica unique closed $\mathbf{R}$-groupsubgroup $\mathcal{G}$$H \subset L_I$ with reductive identity component such that $M$ meets every connected component of $H$.
By maximality Of course, such an $H$ is unique if it exists since its Lie algebra must be that of $M$ (so $H^0$ is uniquely determined in $G$) and conjugacy/existence results for all such,it is generated by $H^0$ and any finite subset of $M$ contains every central compact subgroup,meeting each of its finitely many connected components. The real task is existence of such asan $S[2](\mathbf{R})$$H$.
The "algebraicity" ofDefine $H = \mathscr{D}(L_I) \cdot T_I \cdot S[2]$ where $T_I$ is the theorymaximal anisotropic central subtorus of compact Lie groups ensures that $M=H(\mathbf{R})$ for a unique closed $\mathbf{R}$-subgroup$L_I$. Note that $H \subset L$ for which$H^0 = \mathscr{D}(L_I) \cdot T_I$, so $H^0$ is $\mathbf{R}$-anisotropic reductive, and $H(\mathbf{R})$ meets every connected component of $H$$L_I(\mathbf{R})$ since $S[2](\mathbf{R})$ does (as $S$ is maximal split in the connected reductive $L_I$).
Note that Since the connected reductive group $L/S$$H^0$ is unirational, so $\mathbf{R}$$H^0(\mathbf{R})$ is Zariski-anisotropicdense in $H^0$, so the groupequality $L(\mathbf{R})/S(\mathbf{R})=(L/S)(\mathbf{R})$ is$H = H^0 \cdot S[2]$ with connected compact. We claim$S[2]$ centralizing $H^0$ implies that the center of $H$$H(\mathbf{R})$ meets $H^0(\mathbf{R})$ is an isogeny complement toexactly $S$$Z_{H^0}(\mathbf{R})$, so the latter is of finite index in the center of $L$ as algebraic groups and that$H(\mathbf{R})$. Moreover, $M = H(\mathbf{R})$$Z_{H^0} = T_I$ by design of $H$, so $Z_{H^0}(\mathbf{R})$ is an exact complement tocompact since $A$ in$T_I$ is $L(\mathbf{R})$; i.e$\mathbf{R}$-anisotropic. Thus, the center of $M \times A \rightarrow L(\mathbf{R})$$H(\mathbf{R})$ is an isomorphismcompact. Certainly
By design $M \cap A = 1$$H \cap S_I$ is finite, andso $\dim M + \dim A = \dim L(\mathbf{R})$$H(\mathbf{R}) \cap A=1$ since $\mathscr{D}(L)$$A$ has no nontrivial finite subgroup. Thus, the multiplication map $H(\mathbf{R}) \times A \rightarrow L_I(\mathbf{R})$ is a closed embedding meeting every connected component, and hence this is an isomorphism if and only if the dimensions agree, or equivalently $\mathbf{R}$-anisotropic subgroup of$\dim H + \dim S_I = \dim L_I$. Once this is shown, it follows that $L$$H(\mathbf{R})$ satisfies all of the properties that uniquely characterize Langlands' construction $M$, so this $H$ would do the job.
Since $L_I$ is an isogeny complement tothe isogenous central quotient of the direct product of $\mathscr{D}(L_I)$ and the maximal central torus in $L$ (that$L_I$, in turnview of how $H$ was built it is containedequivalent to show that the split central torus $S_I$ in every$L_I$ and the maximal anisotropic central torus $T$$T_I$ in $L_I$ together generate the maximal central torus of $L$$L_I$. In other words, and contains $S$ by design ofis $L$ with$S_I$ actually maximal as a central split torus in $T/S$ anisotropic).$L_I$?
Thus, theOur task is entirely about whetherhas now been reduced to something in the Borel-Tits structure theory for connected reductive groups over arbitrary fields $M$ meets every$k$ as follows. Let $G$ be a connected componentreductive $k$-group, $S \subset G$ a maximal split $k$-torus, and $\Delta$ a basis of the relative root system $\Phi(G,S)$ of nontrivial $L(\mathbf{R})$$S$-weights on ${\rm{Lie}}(G)$. But it is a general fact (as provedThis set of weights spans a finite-index subgroup of the character lattice of the maximal split $k$-torus $S' := (S \cap \mathscr{D}(G))^0_{\rm{red}}$ in Hochschild's book$\mathscr{D}(G)$.) For a subset $I \subset \Delta$, define the $k$-subtorus $S_I = (\cap_{a \in I} \ker a)^0_{\rm{red}} \subset S$ and let $L_I := Z_G(S_I)$. The task is show that $S_I$ maximal compact subgroups of Lie groups with finite component group meet every connected componentas a central split $k$-torus in $L_I$.
For the good robust theory of maximal compact subgroups of Lie groups with finite component group,By the bookcentrality of Hochschild is$S_I$ in $L_I$ and the only reference I am aware$L_I(k)$-conjugacy of all maximal split $k$-tori in $L_I$ (of which provides a complete treatment$S$ is one such), it suffices to show that no larger $k$-subtorus of the analytic aspects$S$ is central in $L_I$. For the algebraicity aspects of compactBut (possibly disconnected) Lie groups$\Delta$ is linearly independent in ${\rm{X}}(S)$, oneso $S_I$ has codimension $\#I$ in $S$ and hence it suffices to look elsewhereshow that the adjoint action on $S/S_I$ on ${\rm{Lie}}(L_I)$ supports $\#I$ linearly independent weights. But $I$ itself is such a set of weights in the subset ${\rm{X}}(S/S_I) \subset {\rm{X}}(S)$.