# Can a function be found to fit any set of points?

Could a function be found for any set of points, assuming those points didn't contradict the definition of function?

I mean, given a bunch of (x, y) pairs, could a function be found where when you input the x given in each pair, the output is the y?

I've run into many questions like this in highschool mathematics. Questions like "Find a function who's graph goes through the points (-5,10) and (7,-10)". Now I'm wondering if a function could be found no matter which points, and no matter how many points you're given.

Also, is there any method for finding these functions? Any applications of this? Any more information on the idea? I'm just looking for information about this thing I've been wondering about.

-
Depends on what you mean by "function." – Qiaochu Yuan Sep 20 '11 at 3:10
If there's only a finite number of points then you can explicitly construct a polynomial that hits them (interpolation). – anon Sep 20 '11 at 3:15
Yes, you can even find very nice functions (polynomials) when there are only finitely many points given. And you can always define a function to have the given values at the given points, and value $0$ elsewhere; this is a perfectly fine function from the mathematical point of view. If you have a more restrictive notion of what a "function" is (e.g., it must be given by some sort of "formula"), then you'll need to specify that. – Arturo Magidin Sep 20 '11 at 3:44
... and for an infinite set of points $(x_j, y_j),\ j = 1 \ldots \infty$ such that $\{x_j\}$ has no finite limit points, you can construct an entire function (i.e. an infinite series $f(z) = \sum_{k=0}^\infty c_k z^k$ that converges for all $z$) that hits them. – Robert Israel Sep 20 '11 at 4:29