I am trying to follow the steps here but am lost on how to proceed from step 9 to actually find the values of $a_0,a_1,a_2$ I don't see what step 10 has to do with step 9
2026-04-01 22:18:50.1775081930
Confused trying to follow least squares fitting polynomial
80 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in MATRICES
- How to prove the following equality with matrix norm?
- I don't understand this $\left(\left[T\right]^B_C\right)^{-1}=\left[T^{-1}\right]^C_B$
- Powers of a simple matrix and Catalan numbers
- Gradient of Cost Function To Find Matrix Factorization
- Particular commutator matrix is strictly lower triangular, or at least annihilates last base vector
- Inverse of a triangular-by-block $3 \times 3$ matrix
- Form square matrix out of a non square matrix to calculate determinant
- Extending a linear action to monomials of higher degree
- Eiegenspectrum on subtracting a diagonal matrix
- For a $G$ a finite subgroup of $\mathbb{GL}_2(\mathbb{R})$ of rank $3$, show that $f^2 = \textrm{Id}$ for all $f \in G$
Related Questions in LEAST-SQUARES
- Is the calculated solution, if it exists, unique?
- Statistics - regression, calculating variance
- Dealing with a large Kronecker product in Matlab
- How does the probabilistic interpretation of least squares for linear regression works?
- Optimizing a cost function - Matrix
- Given matrix $Q$ and vector $s$, find a vector $w$ that minimizes $\| Qw-s \|^2$
- Defects of Least square regression in some textbooks
- What is the essence of Least Square Regression?
- Alternative to finite differences for numerical computation of the Hessian of noisy function
- Covariance of least squares parameter?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?


Equation (10) doesn't follow from (9). Notice that (9) and (12) are identical. The article is just pointing out that you can differentiate the residual with respect to the coefficients of the interpolating polynomial to obtain (9)/(12); or you can use the Vandermonde matrix equation (10) to explicitly derive (9)/(12).
Edit: Suppose we're given the data
\begin{align*} (x_{1},y_{1}) &= (-2,-2)\\ (x_{2},y_{2}) &= (-1,-2)\\ (x_{3},y_{3}) &= (1,1)\\ (x_{4},y_{4}) &= (2,3) \end{align*}
and suppose we want to find the best quadratic polynomial fit to these points in the $2$-norm sense, i.e.,
\begin{equation*} y = a_{0} + a_{1}x + a_{2}x^{2}. \end{equation*}
Then we have
\begin{equation*} X = \left(\begin{array}{ccc} 1 & x_{1} & x_{1}^{2}\\ 1 & x_{2} & x_{2}^{2}\\ 1 & x_{3} & x_{3}^{2}\\ 1 & x_{4} & x_{4}^{2} \end{array}\right) = \left(\begin{array}{ccc} 1 & -2 & 4\\ 1 & -1 & 1\\ 1 & 1 & 1\\ 1 & 2 & 4 \end{array}\right) \end{equation*}
and
\begin{equation*} \mathbf{y} = \left(\begin{array}{c} y_{1}\\ y_{2}\\ y_{3}\\ y_{4} \end{array}\right) = \left(\begin{array}{c} -2\\ -2\\ 1\\ 3 \end{array}\right). \end{equation*}
Then we have
\begin{equation*} X^{T}X = \left(\begin{array}{ccc} 4 & 0 & 10\\ 0 & 10 & 0\\ 10 & 0 & 34 \end{array}\right) \end{equation*}
so
\begin{equation*} \left(X^{T}X\right)^{-1} = \left(\begin{array}{ccc} 17/18 & 0 & -5/18\\ 0 & 1/10 & 0\\ -5/18 & 0 & 1/9 \end{array}\right). \end{equation*}
Then we have
\begin{equation*} \left(X^{T}X\right)^{-1}X^{T} = \left(\begin{array}{ccc} 17/18 & 0 & -5/18\\ 0 & 1/10 & 0\\ -5/18 & 0 & 1/9 \end{array}\right)\left(\begin{array}{cccc} 1 & 1 & 1 & 1\\ -2 & -1 & 1 & 2\\ 4 & 1 & 1 & 4 \end{array}\right) = \left(\begin{array}{cccc} -1/6 & 2/3 & 2/3 & -1/6\\ -1/5 & -1/10 & 1/10 & 1/5\\ 1/6 & -1/6 & -1/6 & 1/6 \end{array}\right) \end{equation*}
and finally,
\begin{equation*} \mathbf{a} = \left(\begin{array}{c} a_{0}\\ a_{1}\\ a_{2} \end{array}\right) = \left(X^{T}X\right)^{-1}X^{T}\mathbf{y} = \left(\begin{array}{cccc} -1/6 & 2/3 & 2/3 & -1/6\\ -1/5 & -1/10 & 1/10 & 1/5\\ 1/6 & -1/6 & -1/6 & 1/6 \end{array}\right)\left(\begin{array}{c} -2\\ -2\\ 1\\ 3 \end{array}\right) = \left(\begin{array}{c} -5/6\\ 13/10\\ 1/3 \end{array}\right). \end{equation*}
Then the least-squares quadratic polynomial fit to the data is
\begin{equation*} y = -\frac{5}{6} + \frac{13}{10}x + \frac{1}{3}x^{2}. \end{equation*}
Here is a plot of the data along with the quadratic least-squares fit:
It's pretty close! That's the beauty of the least-squares approximation. ;)