# Function from points

1. Sep 30, 2008

### Juan Pablo

Just out of curiosity, is it possible to get a function from, say 5 points? If so how?
I don't want a full explanation just someone to point me to the right direction.

Thanks!

2. Sep 30, 2008

### Staff: Mentor

You can put a straight line through every 5 points, it just have to be thick enough.

Question is so vague that it is impossible to answer. Are points known exactly, or are their values only approximate? Are you allowed to use any function, or only functions from some set (like polynomials)?

3. Sep 30, 2008

### Juan Pablo

The points are exact, I can use any function

4. Sep 30, 2008

### HallsofIvy

Staff Emeritus
Given any finite number of points, there exist an infinite number of functions whose graph passes thorough them. (As long as all points have different x values, of course.) Given n+1 points, there exist a unique polynomial of degree n whose graph passes through them. You could for example write the polynomial as
$$y= a_nx^n+ a_{n-1}x^{n-2}+ \cdot\cdot\cdot+ a_2x^2+ a_1x+ a_0$$
Replacing x and y with the n+ 1 x and y values from the n+ 1 points gives you n+1 equations for the n+1 coefficients an, ..., a1, a0.