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$
Each of the points (1,3), (-1,-5) and (-2,12) satisfies the equation $y = ax^2 + bx + c$ for some unknown a,b,c. The task is to find a,b and c. Start by substituting each of the points into the equation, we have
$$ \begin{align} 3 &= a(1)^2 + b(1) + c \\ -5 &= a(-1)^2 + b(-1) + c \\ 12 &= a(-2)^2 + b(-2) + c \end{align}$$ We can write this more compactly as a matrix equation $$ \begin{bmatrix} 1 & 1 & 1\\ 1 & -1 & 1\\ 4 & -2 & 1 \end{bmatrix} \begin{bmatrix}a\\ b\\ c \end{bmatrix} = \begin{bmatrix} 3\\ -5\\ 12\end{bmatrix} $$
Write the augmented matrix and do elementary row operations $$ \begin{bmatrix} 1 & 1 & 1 & 3\\ 1 & -1 & 1& -5\\ 4 & -2 & 1 & 12 \end{bmatrix} \Rightarrow \begin{bmatrix} 1 & 1 & 1 & 3\\ 0 & -2 & 0 & -8\\ 0 & -6 & -3 & 0 \end{bmatrix} \Rightarrow \begin{bmatrix} 1 & 1 & 1 & 3\\ 0 & -2 & 0 & -8\\ 0 & 0 & -3 & 24 \end{bmatrix} $$ and now, back substitution. starting with the last row, $$\begin{align}-3c &= 24 \\ c &= -8 \end{align} $$ and then the second row $$\begin{align} -2b &= -8 \\ b &= 4 \end{align}$$ and finally back substituting these into the first row $$\begin{align}a + b + c &= 3 \\ a + (4) + (-8) &= 3 \\ a &= 7\end{align}$$
So, I think the equation is: $$ y = 7x^2 + 4x -8 $$
Please check my work, I did this in a hurry.