This is a very basic questions about algebraic groups, which I'm just starting to learn a little bit about:
For an algebraic variety to be an algebraic group, the inverse map needs to be a morphism of algebraic varieties, but I don't see how this can be true. My understanding is that morphisms are locally polynomials.
Specifically, I'm working on a problem involving the multiplicative group of the affine line, but I don't see how the inverse map is a morphism of the variety given that it's not a polynomial.
Most elementary texts describe an affine variety as the zero locus of a set of polynomials in $\mathbb{A}^n$, whereas most algebraic geometers think of an affine variety as the spectrum of an integral domain. This creates some confusion when people on one side try to talk to people on the other side. So let me walk through how this works in the elementary setting.
Let's consider the algebraic group $GL_2(\mathbb{C})$. To an experienced algebraic geometer, the underlying variety is $$\operatorname{Spec} \mathbb{C}[x_{11}, x_{12}, x_{21}, x_{22}, (x_{11} x_{22} - x_{21} x_{12})^{-1}]$$
Okay, but what does that actually mean? Well, one way to say it is that we take the ring
$$\mathbb{C}[x_{11}, x_{12}, x_{21}, x_{22}, y] / (y(x_{11} x_{22} - x_{12} x_{21}) - 1)$$
That is, we add a variable which we force to be the inverse of $(x_{11} x_{22} - x_{21} x_{22})$. So we can think of $\operatorname{GL}_2(\mathbb{C})$ as the hypersurface in $\mathbb{A}^5$, with coordinates $(x_{11}, x_{12}, x_{21}, x_{22}, y)$, cut out by the equation
$$(x_{11} x_{22} - x_{21} x_{22})y = 1$$
With this representation, we have
$$\begin{pmatrix} x_{11} & x_{12} \\ x_{21} & x_{22} \end{pmatrix} \in \operatorname{GL}_2(\mathbb{C}) \leftrightarrow \left(x_{11}, x_{12}, x_{21}, x_{22}, \frac{1}{x_{11} x_{22} - x_{12} x_{21}}\right) \in \mathbb{A}^5_{\mathbb{C}}$$
From linear algebra, we know that
$$\begin{pmatrix} x_{11} & x_{12} \\ x_{21} & x_{22} \end{pmatrix}^{-1} = \frac{1}{x_{11} x_{22} - x_{12} x_{21}} \begin{pmatrix} x_{22} & -x_{12} \\ -x_{21} & x_{11} \end{pmatrix}$$
So, regarding $GL_2(\mathbb{C})$ as a hypersurface in $\mathbb{A}^5$, we have the inversion map
$$i(x_{11}, x_{12}, x_{21}, x_{22}, y) := (y x_{22}, -y x_{12}, -y x_{21}, y x_{11}, x_{11}x_{22} - x_{12}x_{21})$$
which, as desired, is a polynomial.
Of course as I said above as you learn more about algebraic geometry you will no longer think of $GL_2(\mathbb{C})$ as being embedded in $\mathbb{A}^5$, so you will no longer consider these maps to be polynomials in this sense.