Trivial line bundles

Let $X$ be a variety and $\mathbb{C}$ be the field of complex. Then $L = X \times \mathbb{C}$ is a trivial line bundle. The set of sections of this line bundle is $\Gamma(X, L)$ which consisting all functions $s: X \to L$ such that $\pi \cdot s = id$, where $\pi: L \to X$ is the projection map. Why $\Gamma(X, L)$ is the same as the set of all regular functions on $X$? Thank you very much.

-
Is the representation-theory tag appropriate? – Rasmus Jan 9 '11 at 17:29
no, i got rid of it. – Sean Tilson Jan 9 '11 at 17:38

This is true for any trivial bundle. By the categorical definition of product we know that all maps $X \to X \times \mathbb{C}^n$ are in bijective correspondence with pairs of maps $X \to X$ and $X \to \mathbb{C}^n$. Now since we know it is a section and that $\pi$ is just the projection onto the $X$ factor the map $X \to X$ is forced to be the identity. So what is left, just our map $X \to \mathbb{C}^n$ which must be a morphism in whatever category you are working in, hence regular. Note that the case you asked about is when $n=1$ and that in fact $\mathbb{C}^n$ could be replace by any object $Y$ in whatever category you are working in. This is a fact about trivial bundles or products rather, not line bundles.
Hi Sean, thank you very much. Is $\Gamma(X, L)$ in my question isomorphic to $\mathbb{C}$? – user Jan 9 '11 at 18:30
Is $\Gamma(X, L)$ (or the space of all regular functions on $X$) a finite dimensional vector space? What is the basis of $\Gamma(X, L)$ (or the space of all regular functions on $X$)? – user Jan 9 '11 at 18:41
I doubt that $\Gamma (X,L)$ is isomorphic to $\mathbb{C}$, I also don't really know any algebraic geometry. Usually though, regardless of whether or not the bundle is trivial, the sections of a bundle are some sort of module over the ring of functions on the base space. So in particular, yes, this space of sections is a vector space (that is true for any vector bundle). – Sean Tilson Jan 9 '11 at 20:22
@user: It depends. If your variety is compact then the only regular functions on it are constant maps, so $\Gamma(X,L) = \mathbb C$. If your variety is not compact, then you can have lots of functions, see for example if you take $X = \mathbb C$. – Gunnar Þór Magnússon Jul 18 '11 at 11:06