I always stumble across the term "local" and "global" basis functions for finite elements. But could not find an explanation what the difference is. What is the difference and where do they occur?
The basis functions (or, equivalently, the shape functions) used in the finite element method are often constructed through the so-called reference element construction. The idea is to begin with a nicely shaped element in which the mathematical expressions for the basis functions are as simple as possible.
As an example, suppose that you have a triangular mesh. The simplest reference element is the triangle with the corner points $(0,0)$, $(0,1)$ and $(1,0)$. Now a local basis for the space of linear polynomials on the reference element is given by the expressions $x$, $y$ and $1-x-y$.
This local basis is not useful for computations per se. In order to obtain a basis that is defined in an arbitrary triangle of the given mesh, we are required to construct a local-to-global mapping from the reference triangle to each and every triangle of the given triangular mesh.
The global basis is the one constructed from the local basis using the local-to-global mapping and defined in an arbitrary triangle of the given mesh. I could go into details on how the local-to-global mapping is constructed but the distinction is now hopefully clear.
Thanks to knl for a decent generic answer. I will add to it by references going into details: