Question: I am having trouble calculating the quadratic curve $f(x)$ that goes through 3 points;
for example a curve that goes through $A(1,3), B(-1,-5), and C(-2,12)$.
I can only guess that the curve is upwards and that I may create the system:
$$
y\_1 = ax^2\_1 + bx\_1 + c\\
y\_2 = ax^2\_2 + bx\_2 + c\\
y\_3 = ax^2\_3 + bx\_3 + c
$$
assuming that the points are in the format $A(x,y)$ and from this point what do I do?
Do I build a matrix and use the Gaussian eliminations?

EDIT: I also know that $f(4) = 120$

Answer: 
The matrix you are about to build is a [Vandermonde Matrix](http://en.wikipedia.org/wiki/Vandermonde_matrix):
$$
\vec y = \pmatrix{1&x\_1&x\_1^2\\1&x\_2&x\_2^2\\1&x\_3&x\_3^2\\}\pmatrix{c\\b\\a}
$$

*A square Vandermonde matrix is thus invertible if and only if the $x\_i$ are distinct; an explicit formula for the inverse is known.[$^{\text[2]}$](http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19660023042.pdf "download me...")*
You don't need matrices to calculate the answer

$$a=((y\_1-y\_2)-(y\_2-y\_3)(x\_1-x\_2)/(x\_2-x\_3))/((x\_1^2-x\_2^2)-(x\_2^2-x\_3^2)(x\_1-x\_2)/(x\_2-x\_3))$$ 

$$b=((y\_1-y\_2)-a(x\_1^2-x\_2^2))/(x\_1-x\_2)$$ 

$$c=y\_1-ax\_1^2-bx\_1$$ 

If you want to check you got the correct result then 

$$c=y\_2-ax\_2^2-bx\_2$$ 

and 

$$c=y\_3-ax\_3^2-bx\_3$$ 

should give the same values of c