ArticleslgStudy

science

Constrained least squares

Constrained least squares is a science 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 Constrained least squares rather than just read about it. In short: In constrained least squares one solves a linear least squares problem with an additional constraint on the solution. This means, the unconstrained equation 𝐗𝜷=𝐲 must be fit as closely as possible (in the least squares sense) while ensuring that some other property of 𝜷 is maintained.

Key takeaways

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

Reference excerpt

In constrained least squares one solves a linear least squares problem with an additional constraint on the solution. This means, the unconstrained equation 𝐗𝜷=𝐲 must be fit as closely as possible (in the least squares sense) while ensuring that some other property of 𝜷 is maintained. There are often special-purpose algorithms for solving such problems efficiently. Some examples of constraints are given below:

Equality constrained least squares: the elements of 𝜷 must exactly satisfy 𝐋𝜷=𝐝 (see Ordinary least squares). Stochastic (linearly) constrained least squares: the elements of 𝜷 must satisfy 𝐋𝜷=𝐝+𝝂, where 𝝂 is a vector of random variables such that E⁡(𝝂)=𝟎 and E⁡(𝝂𝝂T)=τ2𝐈. This effectively imposes a prior distribution for 𝜷 and is therefore equivalent to Bayesian linear regression. Regularized least squares: the elements of 𝜷 must satisfy ‖𝐋𝜷−𝐲‖≤α (choosing α in proportion to the noise standard deviation of y prevents over-fitting). The special case of equality with known standard deviation corresponds to the Discrepancy Principle for automatic regularization. Non-negative least squares (NNLS): The vector 𝜷 must satisfy the vector inequality 𝜷≥0 defined componentwise—that is, each component must be either positive or zero. Box-constrained least squares: The vector 𝜷 must satisfy the vector inequalities 𝒃ℓ≤𝜷≤𝒃u, each of which is defined componentwise. Integer-constrained least squares: all elements of 𝜷 must be integers (instead of real numbers). Phase-constrained least squares: all elements of 𝜷 must be real numbers, or multiplied by the same complex number of unit modulus. If the constraint only applies to some of the variables, the mixed problem may be solved using separable least squares by letting 𝐗=[𝐗𝟏𝐗𝟐] and 𝜷T=[𝜷𝟏T𝜷𝟐T] represent the unconstrained (1) and constrained (2) components. Then substituting the least-squares solution for 𝜷𝟏, i.e.

𝜷̂1=𝐗1+(𝐲−𝐗2𝜷2) (where + indicates the Moore–Penrose pseudoinverse) back into the original expression gives (following some rearrangement) an equation that can be solved as a purely constrained problem in 𝜷2.

𝐏𝐗2𝜷2=𝐏𝐲, where 𝐏:=𝐈−𝐗1𝐗1+ is a projection matrix. Following the constrained estimation of 𝜷̂2 the vector 𝜷̂1 is obtained from the expression above.

See also Bayesian linear regression Constrained optimization Integer programming

References

Worked examples

Example 1 — a first encounter with Constrained least squares

Start with the simplest possible case. Write down what Constrained least squares claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, 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 Constrained 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 Constrained 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 Constrained least squares

In research
Constrained least squares appears in science 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 Constrained 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
Constrained least squares is common in secondary-school and first-year university syllabi. It links to neighbouring topics Least squares, so understanding it makes those chapters shorter.
In everyday life
Look for Constrained 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 “Constrained least squares” →

How to study Constrained least squares in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Constrained 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 Constrained least squares out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Constrained least squares in simple terms?

In constrained least squares one solves a linear least squares problem with an additional constraint on the solution. This means, the unconstrained equation 𝐗𝜷=𝐲 must be fit as closely as possible (in the least squares sense) while ensuring that some other property of 𝜷 is maintained.

Why does Constrained least squares matter?

Because it connects several science 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 Constrained 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 Constrained least squares.

Tags

  • Least squares

Keep exploring