The euqaion of a quadratic function is given by:

we need to find the values of the constants a, b and c. To do this we use the points given and plug the values of x and y in the equation above.
For the point (-2,0) we have that x=-2 and y=0; then we have:

For the point (1,0) x=1 and y=0 then we have the equation:

Finally for the point (0,2) x=0 and y=2 then we have the equation:

Hence we have the system of equations:

Now to solve this sytem we plug the value of c given by the third equation into the first and second equations to get:

To solve this new system we multiply the second equation by 2:

we add the equations:

Now we solve for a:

hence a=-1.
Finally to get b we plug the values of a and c in the first of our originals equations:

and solve for b:

Hence b=-1.
Now that we have the values of the constant we have that the equation is:
