How can the inverse map be a morphism of algebraic varieties? 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. 
 A: 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.
A: Let $k$ be algebraically closed, and let $G$ be the closed set $Z = V(XY-1)$. This can be identified with $k^{\ast}$, via $t \mapsto (t, \frac{1}{t})$.  We want to show that the "inverse map" $\phi: Z \rightarrow Z$ given by $\phi(t,\frac{1}{t}) = (\frac{1}{t},t)$ is a morphism of varieties.  

Fact: let $Z_1 \subseteq k^n$ and $Z_2 \subseteq k^m$ be Zariski closed sets, and $\phi: Z_1 \rightarrow Z_2$ a function.  Then $\phi$ is a morphism if and only if there exist polynomials $f_i(X_1, ... , X_n) \in k[X_1, ... , X_n], 1 \leq i \leq n$ such that $$\phi(x_1, ... , x_n) = (f_1(x_1, ... , x_n), ... , f_m(x_1, ... , x_n))$$ for every $(x_1, ... , x_n)$.

Now take $Z_1 = Z_2 = Z$, and $n = m = 2$.  Let $f_1(X,Y) = Y$, and $f_2(X,Y) = X$.  Then clearly for $(x,y) \in Z$ (that is, for $(x,y) \in k^2$ satisfying $x= \frac{1}{y}$) $$\phi(x,y) =  (\frac{1}{x},\frac{1}{y}) = (y,x) = (f_1(x,y),f_2(x,y)) $$ 
