Are linear algebraic groups always finite-dimensional? Recall that a complex linear algebraic group $G$ is an affine algebraic group (i.e. an affine group variety over $\mathbb C$).
It's a well-known fact that there is always a closed embedding $$G \hookrightarrow \operatorname{GL}(n, \mathbb C).$$
My concern is that this seems to imply that $G$ is finite-dimensional as a variety, just because $\operatorname{GL}(n, \mathbb C)$ is for any particular integer $n$ (it has codimension 1 in $\mathbb A^{n^2}$, hence dimension $n^2-1$). This doesn't mesh well with my intuition, because I vaguely know that if $R$ is a non-Noetherian $\mathbb C$-algebra, then $\operatorname{Spec} R$ should be infinite-dimensional as a variety. Unfortunately I don't know any of these examples well-enough to try to construct a group operation on one of them to figure out what's happening.
I'd appreciate it if someone could explain why it should be true that any $G$ should be finite-dimensional; for example if having the group law places some restriction on the size of $G$ that I'm not seeing. It's also possible that my claim is wrong or doesn't make sense in some way; if so I'd also be happy if someone could point out the mistake. Thanks.
EDIT: To clarify on Qiaochu's comment: a linear algebraic group $G$ for me is an $k$-variety $G$ equipped with the structure of a group such that both the group multiplication $G \times G \to G$ and the inversion $G \to G$ are morphisms of varieties. But I think the issue was actually that I don't know the definition of variety: these need to have finite type. Thanks all.
 A: For the sake of being explicit, here's a simple example of an infinite-dimensional affine group scheme, even a reduced one. You might call it infinite-dimensional affine space $\mathbb{A}^{\infty}$. Its functor of points takes a commutative $k$-algebra $R$ ($k$ the underlying field) and assigns 
$$R \mapsto R^{\infty} = \prod_{i=1}^{\infty} R$$
with group operation given by pointwise addition. As a Hopf algebra,
$$\mathbb{A}^{\infty} = \text{Spec } k[x_1, x_2, \dots ]$$
with comultiplication given by extending
$$\Delta x_i = x_i \otimes 1 + 1 \otimes x_i$$
(which should look familiar if you've ever written down the Hopf algebra of functions on affine space $\mathbb{A}^n$). You can think of $\mathbb{A}^{\infty}$ as a cofiltered limit of the finite-dimensional affine spaces, and this picture can be generalized to arbitrary affine group schemes. 
A: Matt Samuel's comment did it for me: I'd misunderstood the definition of "affine variety". Originally I thought this was just a reduced scheme over $\mathbb C$ except that we only consider the closed points (i.e. look at $\operatorname{MSpec} R$ for some reduced $\mathbb C$-algebra $R$). Now I see that the various true definitions all require some finiteness condition on the variety (e.g. from a scheme point of view, we want it to have finite type over $\mathbb C$). Thanks all.
