I've read books which have this statement, without explanation : 'every finite group is an algebraic group'. I'm trying to understand what exactly they mean. The definition I have in my mind of a group scheme $ G $ over a base field $ k $ is a representable functor $$ G : (\text{Sch}/k)^{op} \rightarrow (\text{Grp}) $$ I discussed this with my professor and here's what he explained to me (which I find very beautiful):

Suppose $ G $ is a finite group. Consider the affine scheme $ X_G = \coprod_{g \in G} \text{spec} (k) = \text{spec} ( \prod_{g \in G} k) $ which is the disjoint union of $ |G| $ copies of $ \text{spec} (k) $. This gives the corresponding Yoneda functor and for any $ k $-scheme $ S $, we have $$ X_G(S) = \text{Hom} (S, X_G) = \text{Hom}_{k} \left( \prod_{g \in G} k, \Gamma(S, \mathcal{O}_S) \right) $$ Now, a $ k $-algebra morphism from $ \prod_{g \in G} k $ to $ \Gamma(S, \mathcal{O}_S) $ is determined by knowledge of the images of the idempotents $ e_g \in \prod_{g \in G} k $. So $$ X_G(S) = \{ (s_g)_{g \in G} | s_g \in \Gamma(S, \mathcal{O}_S) , \sum s_g = 1, s_g s_{g'} = 0, (s_g)^2 = s_g \} $$ The group structure is given by $ (s_g) \cdot (t_g) = (u_g) $ where $ u_g = \sum_{hk=g} s_h t_k $. The fact that $ (u_g) $ also satisfies the property of being in $ X_G(S) $ is clear from computation. $ X_G(S) $ indeed becomes a group with identity given by $ (a_g) : a_e = 1 $ and $ a_g = 0 $ when $ g \neq e $ and the inverse of $ (s_g) $ is $ (t_g) $ with $ t_g = s_{g^{-1}} $.

So my (poorly phrased) question: Is this the only way to view a finite group as a group scheme or are there other ways too?

For context, this really came up in a discussion about quotients in algebraic groups. If $ G $ is $ GL_n $ and $ T $ is a maximal torus with normalizer $ N_G(T) $, then $ N_G(T)/T = S_n $, the symmetric group on $ n $ letters.

constant: i.e., its group of rational points is $G$, regardless of the ground field (whereas, for example, $\mu_3(\mathbb R)$ is trivial while $\mu_3(\mathbb C)$ has order $3$). (I think—this is my naïve understanding, as a mere user of and not expert in group schemes, and hopefully someone will correct me if I've used the words incorrectly.) $\endgroup$