Skip to main content

Linear Least Squares Methods

  • Chapter
  • First Online:
Exercises in Computational Mathematics with MATLAB

Part of the book series: Problem Books in Mathematics ((PBM))

  • 7454 Accesses

Abstract

The method of least squares is the standard method for finding an approximate solution of a linear system with more equations than unknowns. Such systems occur in data fitting where one determines the fit by minimizing the sum of squares of the difference between the observed and the fitted values. The linear least squares problem also occurs in statistical regression analysis, in signal processing, and in many other applications.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 19.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 29.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 39.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Show first that \(\langle \boldsymbol{b}_{\rm{max}},\boldsymbol{v}_{j}\rangle =\langle \boldsymbol{b},\boldsymbol{v}_{j}\rangle\) for j = 1, 2, , k.

  2. 2.

    Show that if \({\boldsymbol{b}_{\rm{max}}}_{1}\) and \({\boldsymbol{b}_{\rm{max}}}_{2}\) both satisfies (10.2) then \({\boldsymbol{b}_{\rm{max}}}_{1} = {\boldsymbol{b}_{\rm{max}}}_{2}\).

  3. 3.

    Suppose \(\boldsymbol{h} = \boldsymbol{f}_{1} + \boldsymbol{g}_{1} = \boldsymbol{f}_{2} + \boldsymbol{g}_{2}\). Show that \(\boldsymbol{f}_{1} -\boldsymbol{f}_{2} \in {\rm{max}}\cap \mathcal{G}\).

  4. 4.

    If \(\boldsymbol{f} \in \text{span}(\boldsymbol{A})\) then \(\boldsymbol{f} = \boldsymbol{A}\boldsymbol{x}\) for some \(\boldsymbol{x}\).

  5. 5.

    Let \(\boldsymbol{b} \in \mathbb{R}^{m}\). Define \(\boldsymbol{b}_{1}\) as the orthogonal projection of \(\boldsymbol{b}\) onto \(\text{span}(\boldsymbol{A})\) and use (10.2).

  6. 6.

    Use (10.1) to find \(\boldsymbol{b}_{1}\).

  7. 7.

    Use the fact that \({\rm{max}}\cap \mathcal{G} =\{ \boldsymbol{0}\}\).

  8. 8.

    The least squares solution is \(\boldsymbol{x} = \boldsymbol{A}^{\dag }\boldsymbol{b}\).

  9. 9.

    Use (10.3).

  10. 10.

    Note the ordering of the coefficient of a polynomial in MATLAB. For example \(p(x) =\alpha _{2} +\alpha _{1}x\) in the linear case.

  11. 11.

    To compute x 2 use the instruction x.*x.

  12. 12.

    Vandermonde matrix.

  13. 13.

    If \(\boldsymbol{u} = (u_{i-n_{\ell}},\ldots,u_{i},\ldots,u_{i+n_{r}})^{T} \in \mathbb{R}^{m}\) then \(\|\boldsymbol{u}\|_{2} = \left (\sum _{j=i-n_{\ell}}^{i+n_{r}}u_{ j}^{2}\right )^{1/2}\).

References

  1. J. Bastien, Introduction à l’analyse numérique: Applications sous MATLAB, Dunod, 2003.

    Google Scholar 

  2. A. Biran, M. Breiner, MATLAB6 for Engineers, Prentice Hall, 2002, 3th ed.

    Google Scholar 

  3. A. Björck, Numerical Methods for Least Squares Problems, SIAM, 1996.

    Google Scholar 

  4. K. Chen, P. Giblin, A. Irving, Mathematical Explorations with MATLAB, Cambrige Univ. Press, 1999.

    Google Scholar 

  5. E. Cohen, R. F. Riesenfeld, G. Elber, Geometric Modeling with Splines: An Introduction, A.K. Peters, Ltd., 2001.

    Google Scholar 

  6. J. Cooper, MATLAB Companion for Multivariable Calculus (a), Academic Press, 2001.

    Google Scholar 

  7. M. Crouzeix, A. Mignot, Analyse numérique des équations différentielles, Masson, 1989.

    Google Scholar 

  8. C. de Boor, A Practical Guide to Splines, Springer-Verlag, 2001, Rev. Ed.

    Google Scholar 

  9. P. Deuflhard, A. Hohmann, Numerical Analysis in Modern Scientific Computing, An Introduction, Springer-Verlag, 2003, 2nd ed.

    Google Scholar 

  10. A. Fortin, Analyse numérique pour ingénieurs, Ed. de l’Ecole Polytechnique de Montréal, 1995.

    Google Scholar 

  11. W. Gander, J. Hřebíček, Solving Problems in Scientific Computing using MAPPLE and MATLAB, Springer-Verlag, 2004, 4th ed.

    Google Scholar 

  12. S. Godounov, V. Riabenki, Schémas aux différences, MIR, 1977.

    Google Scholar 

  13. G.H. Golub, C.F. Van Loan, Matrix Computations, The Johns Hopkins Univ. Press, 1996, 3rd Ed.

    Google Scholar 

  14. A. Greenbaum, Iterative mMethods for Solving Linear Systems, SIAM, 1997.

    Google Scholar 

  15. F. Gustafsson, N. Bergman, MATLAB for Engineers Explained, Springer-Verlag, 2003.

    Google Scholar 

  16. D.J. Higham, N. Higham, MATLAB Guide, SIAM, 2005, 2nd Ed.

    Google Scholar 

  17. A. Kharab, R. B. Guenther, Introduction to Numerical Methods (a): a MATLAB Approach, Chapman and Hall, 2002.

    Google Scholar 

  18. P. Lascaux and R. Théodor, Analyse numérique matricielle appliquée à l’art de l’ingénieur, vol 1 and 2, Dunod, 2004.

    Google Scholar 

  19. A.J. Laub, Matrix Analysis for Scientists and Engineers, SIAM, 2005.

    Google Scholar 

  20. P. Linz, R. Wang, Exploring Numerical Methods: An Introduction to Scientific Computing using MATLAB, Jones and Barlett Pub., 2003.

    Google Scholar 

  21. D. Marsh, Applied Geometry for Computer Graphics and CAD, Springer-Verlag, 1999.

    Google Scholar 

  22. C. B. Moler, Numerical Computing with MATLAB, SIAM, 2004.

    Google Scholar 

  23. G.M. Phillips, Interpolation and Approximation by Polynomials, CMS Books in Mathematics, Springer-Verlag 2003.

    Google Scholar 

  24. A. Quarteroni, R. Sacco, F. Saleri Numerical Mathematics, Springer-Verlag, 2000.

    Google Scholar 

  25. A. Quarteroni, R. Sacco, F. Saleri Scientific Computing with MATLAB, Springer-Verlag, 2003.

    Google Scholar 

  26. D. Salomon, Curves and Surfaces for Computer Graphics, Springer-Verlag, 2006.

    Google Scholar 

  27. M. Schatzman, Numerical Analysis: A Mathematical Introduction, Oxford Univ. Press, 2002.

    Google Scholar 

  28. B.J. Schroers, Ordinary Differential Equations: a Practical Guide, Cambridge Univ. Press, 2011.

    Google Scholar 

  29. E. Süli, D. Mayers, An introduction to Numerical Analysis, Cambridge Univ. Press, 2003.

    Google Scholar 

  30. L.N. Trefethen & D. Bau III, Numerical Linear Algebra, SIAM, 1997.

    Google Scholar 

  31. C.F. Van Loan, K.-Y. Daysy Fan, Insight Through Computing, SIAM, 2010.

    Google Scholar 

  32. H. B. Wilson, L. H. Turcotte, D. Halpern, Advanced Mathematics and Mechanics Applications using MATLAB, Chapman and Hall, 2003, 3rd ed.

    Google Scholar 

  33. K. Yosida, Functional Analysis, Springer-Verlag, 1980, 6–th ed.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Lyche, T., Merrien, JL. (2014). Linear Least Squares Methods. In: Exercises in Computational Mathematics with MATLAB. Problem Books in Mathematics. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-43511-3_10

Download citation

Publish with us

Policies and ethics