# Find the n-dimensional parabola that fits a set of points

Let's say that I have a set of $N$ vectors $X_i$ of dimension $n$ :

$$X_i = [x_1,x_2,...x_n]$$

For each vector $X_i$, I have a corresponding scalar $y_i$.

My aim is to find the function $y=f([x_1,x_2,...,x_n])$ that minimize the quantity :

$$\chi^2 = \sum_{i=1}^N [y_i-f(X_i)]^2$$

I have reasons to believe that $f$ is an N dimensional parabola (i.e. a polynomial of order 2 in $x_1,x_2,...,x_n$). Is there a straightforward, mathematical way to deduce this parabola from the $X_i$ and $y_i$ that I have at my disposal ?

Ideally, I would like to express this "best-fit" parabola as : $$f(X_i) = (X_i - \mu) C^{-1} (X_i - \mu)^T + K$$ with $\mu$ a vector of dimension $n$, C a $n\times n$ symmetric matrix, and $K$ a constant.

• Sorry if t wasn't clear enough : $f$ has to be a second order polynomial, i.e. here a $n$-dimensional parabola. – S.I. Aug 1 '17 at 19:38