Let $\text{Aut}(G)$ denote the contravariant functor on the category of schemes over $k$ which associates to $S/k$ the set of automorphisms of the base change $G_S$ as a group scheme over $S$. There is a natural transformation $$ G \longrightarrow \text{Aut}(G),\quad g \longmapsto \text{inn}_g $$ sending an $S$-valued point $g$ of $G$ to the inner automorphism of $G$ determined by $g$. The center $C$ of $G$ is by definition the kernel of this transformation, i.e., the functor which to $S$ associates those $g \in G(S)$ whose associated inner automorphism is trivial. The statement of the lemma is that this functor is representable by a closed subgroup scheme of $G$. \medskip\noindent Choose an integer $n \geq 1$. Let $G_n \subset G$ be the $n$th infinitesimal neighbourhood of the identity element $e$ of $G$. For every scheme $S/k$ the base change $G_{n, S}$ is the $n$th infinitesimal neighbourhood of $e_S : S \to G_S$. Thus we see that there is a natural transformation $\text{Aut}(G) \to \text{Aut}(G_n)$ where the right hand side is the functor of automorphisms of $G_n$ as a scheme ($G_n$ isn't in general a group scheme). Observe that $G_n$ is the spectrum of an artinian local ring $A_n$ with residue field $k$ which has finite dimension as a $k$-vector space (Varieties, Lemma \ref{varieties-lemma-algebraic-scheme-dim-0}). Since every automorphism of $G_n$ induces in particular an invertible linear map $A_n \to A_n$, we obtain transformations of functors $$ G \to \text{Aut}(G) \to \text{Aut}(G_n) \to \text{GL}(A_n) $$ The final group valued functor is representable, see Example \ref{example-general-linear-group}, and the last arrow is visibly injective. Thus for every $n$ we obtain a closed subgroup scheme $$ H_n = \Ker(G \to \text{Aut}(G_n)) = \Ker(G \to \text{GL}(A_n)). $$ As a first approximation we set $H = \bigcap_{n \geq 1} H_n$ (scheme theoretic intersection). This is a closed subgroup scheme which contains the center $C$. \medskip\noindent Let $h$ be an $S$-valued point of $H$ with $S$ locally Noetherian. Then the automorphism $\text{inn}_h$ induces the identity on all the closed subschemes $G_{n, S}$. Consider the kernel $K = \Ker(\text{inn}_h : G_S \to G_S)$. This is a closed subgroup scheme of $G_S$ over $S$ containing the closed subschemes $G_{n, S}$ for $n \geq 1$. This implies that $K$ contains an open neighbourhood of $e(S) \subset G_S$, see Algebra, Remark \ref{algebra-remark-intersection-powers-ideal}. Let $G^0 \subset G$ be as in Proposition \ref{proposition-connected-component}. Since $G^0$ is geometrically irreducible, we conclude that $K$ contains $G^0_S$ (for any nonempty open $U \subset G^0_{k'}$ and any field extension $k'/k$ we have $U \cdot U^{-1} = G^0_{k'}$, see proof of Lemma \ref{lemma-irreducible-group-scheme-over-field-qc}). Applying this with $S = H$ we find that $G^0$ and $H$ are subgroup schemes of $G$ whose points commute: for any scheme $S$ and any $S$-valued points $g \in G^0(S)$, $h \in H(S)$ we have $gh = hg$ in $G(S)$. \medskip\noindent Assume that $k$ is algebraically closed. Then we can pick a $k$-valued point $g_i$ in each irreducible component $G_i$ of $G$. Observe that in this case the connected components of $G$ are the irreducible components of $G$ are the translates of $G^0$ by our $g_i$. We claim that $$ C = H \cap \bigcap\nolimits_i \Ker(\text{inn}_{g_i} : G \to G) \quad (\text{scheme theoretic intersection}) $$ Namely, $C$ is contained in the right hand side. On the other hand, every $S$-valued point $h$ of the right hand side commutes with $G^0$ and with $g_i$ hence with everything in $G = \bigcup G^0g_i$. \medskip\noindent The case of a general base field $k$ follows from the result for the algebraic closure $\overline{k}$ by descent. Namely, let $A \subset G_{\overline{k}}$ the closed subgroup scheme representing the center of $G_{\overline{k}}$. Then we have $$ A \times_{\Spec(k)} \Spec(\overline{k}) = \Spec(\overline{k}) \times_{\Spec(k)} A $$ as closed subschemes of $G_{\overline{k} \otimes_k \overline{k}}$ by the functorial nature of the center. Hence we see that $A$ descends to a closed subgroup scheme $Z \subset G$ by Descent, Lemma \ref{descent-lemma-closed-immersion} (and Descent, Lemma \ref{descent-lemma-descending-property-closed-immersion}). Then $Z$ represents $C$ (small argument omitted) and the proof is complete.