ArticleslgStudy

mathematics

Numerical methods for linear least squares

Numerical methods for linear least squares is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Numerical methods for linear least squares rather than just read about it. In short: Numerical methods for linear least squares entails the numerical analysis of linear least squares problems. Introduction A general approach to the least squares problem m i n ‖ y − X β ‖ 2 {\displaystyle \operatorname {\,min} \,{\big \|}\mathbf {y} -X{\boldsymbol {\beta }}{\big \|}^{2}} can be described as follows.

Key takeaways

  • Numerical methods for linear least squares belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Numerical methods for linear least squares to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Numerical methods for linear least squares from memory before moving on to harder problems.

Reference excerpt

Numerical methods for linear least squares entails the numerical analysis of linear least squares problems.

Introduction A general approach to the least squares problem m i n ‖ y − X β ‖ 2 {\displaystyle \operatorname {\,min} \,{\big \|}\mathbf {y} -X{\boldsymbol {\beta }}{\big \|}^{2}} can be described as follows. Suppose that we can find an n by m matrix S such that XS is an orthogonal projection onto the image of X. Then a solution to our minimization problem is given by

β = S y {\displaystyle {\boldsymbol {\beta }}=S\mathbf {y} }

simply because

X β = X ( S y ) = ( X S ) y {\displaystyle X{\boldsymbol {\beta }}=X(S\mathbf {y} )=(XS)\mathbf {y} }

is exactly a sought for orthogonal projection of y {\displaystyle \mathbf {y} } onto an image of X (see the picture below and note that as explained in the next section the image of X is just a subspace generated by column vectors of X). A few popular ways to find such a matrix S are described below.

Inverting the matrix of the normal equations The equation

( X T X ) β = X T y {\displaystyle (\mathbf {X} ^{\rm {T}}\mathbf {X} )\beta =\mathbf {X} ^{\rm {T}}y} is known as the normal equation. The algebraic solution of the normal equations with a full-rank matrix XTX can be written as

β ^ = ( X T X ) − 1 X T y = X + y {\displaystyle {\hat {\boldsymbol {\beta }}}=(\mathbf {X} ^{\rm {T}}\mathbf {X} )^{-1}\mathbf {X} ^{\rm {T}}\mathbf {y} =\mathbf {X} ^{+}\mathbf {y} }

where X+ is the Moore–Penrose pseudoinverse of X. Although this equation is correct and can work in many applications, it is not computationally efficient to invert the normal-equations matrix (the Gramian matrix). An exception occurs in numerical smoothing and differentiation where an analytical expression is required. If the matrix XTX is well-conditioned and positive definite, implying that it has full rank, the normal equations can be solved directly by using the Cholesky decomposition RTR, where R is an upper triangular matrix, giving:

R T R β ^ = X T y . {\displaystyle R^{\rm {T}}R{\hat {\boldsymbol {\beta }}}=X^{\rm {T}}\mathbf {y} .}

The solution is obtained in two stages, a forward substitution step, solving for z:

R T z = X T y , {\displaystyle R^{\rm {T}}\mathbf {z} =X^{\rm {T}}\mathbf {y} ,}

followed by a backward substitution, solving for β ^ {\displaystyle {\hat {\boldsymbol {\beta }}}} :

R β ^ = z . {\displaystyle R{\hat {\boldsymbol {\beta }}}=\mathbf {z} .}

Both substitutions are facilitated by the triangular nature of R.

Orthogonal decomposition methods Orthogonal decomposition methods of solving the least squares problem are slower than the normal equations method but are more numerically stable because they avoid forming the product XTX. The residuals are written in matrix notation as

r = y − X β ^ . {\displaystyle \mathbf {r} =\mathbf {y} -X{\hat {\boldsymbol {\beta }}}.}

The matrix X is subjected to an orthogonal decomposition, e.g., the QR decomposition as follows.

X = Q ( R 0 ) {\displaystyle X=Q{\begin{pmatrix}R\\0\end{pmatrix}}\ } , where Q is an m×m orthogonal matrix (QTQ=I) and R is an n×n upper triangular matrix with r i i > 0 {\displaystyle r_{ii}>0} . The residual vector is left-multiplied by QT.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Numerical methods for linear least squares

Start with the simplest possible case. Write down what Numerical methods for linear least squares claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Numerical methods for linear least squares before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Numerical methods for linear least squares ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Numerical methods for linear least squares

In research
Numerical methods for linear least squares appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Numerical methods for linear least squares in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Numerical methods for linear least squares is common in secondary-school and first-year university syllabi. It links to neighbouring topics Least squares, Numerical linear algebra, so understanding it makes those chapters shorter.
In everyday life
Look for Numerical methods for linear least squares outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Numerical methods for linear least squares” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Numerical methods for linear least squares in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Numerical methods for linear least squares means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Numerical methods for linear least squares out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Numerical methods for linear least squares in simple terms?

Numerical methods for linear least squares entails the numerical analysis of linear least squares problems. Introduction A general approach to the least squares problem m i n ‖ y − X β ‖ 2 {\displaystyle \operatorname {\,min} \,{\big \|}\mathbf {y} -X{\boldsymbol {\beta }}{\big \|}^{2}} can be desc…

Why does Numerical methods for linear least squares matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Numerical methods for linear least squares?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Numerical methods for linear least squares.

Tags

  • Least squares
  • Numerical linear algebra

Keep exploring