  Let G be a graph whose edges are labeled by ideals of a commutative ring. We
introduce a generalized spline, which is a vertex-labeling of G by elements of
the ring so that the difference between the labels of any two adjacent vertices
lies in the corresponding edge ideal. Generalized splines arise naturally in
combinatorics (em algebraic splines of Billera and others) and in algebraic
topology (certain equivariant cohomology rings, described by
Goresky-Kottwitz-MacPherson and others). The central question of this
manuscript asks when an arbitrary edge-labeled graph has nontrivial generalized
splines. The answer is `always', and we prove the stronger result that
generalized splines contain a free submodule whose rank is the number of
vertices in G. We describe all generalized splines when G is a tree, and give
several ways to describe the ring of generalized splines as an intersection of
generalized splines for simpler subgraphs of G. We also present a new tool
which we call the GKM matrix, an analogue of the incidence matrix of a graph,
and end with open questions.
