If the above data points actually lay on a straight line y = C+Dt, we have:
Call the matrix A and the vector on the right-hand side. Of course this system is inconsistent, but we want to find such that is as close as possible to . As we’ve seen, the correct choice of is given by:
To compute this, first note that
Therefore, the best-fit line for the data is:
Here are the data points and the best-fit line on the same graph:
Let Then, we set and
We now compute If we denote then by the Gram-Schmidt process,
Let be any basis of a -dimensional subspace of Then by Gram-Schmidt orthogonalisation process, we get an orthonormal set with and for
Suppose we have matrix of dimension with Then by the application of the Gram-Schmidt orthogonalisation process yields a set of orthonormal vectors of In this case, for each we have
Bretscher, O. (2004). Linear Algebra with Applications, (3rd ed.). New York, NY: Prentice Hall.
Farin, G., & Hansford, D. (2004). Practical Linear Algebra: A Geometry Toolbox. London: AK Peters.
Friedberg, S. H., Insel, A. J., & Spence, L. E. (2002). Linear Algebra, (4th ed.). New York, NY: Prentice Hall.
Leon, S. J. (2006). Linear Algebra with Applications, (7th ed.). New York, NY: Pearson Prentice Hall.
McMahon, D. (2005). Linear Algebra Demystified. New York, NY: McGraw–Hill Professional.
Zhang, F. (2009). Linear Algebra: Challenging Problems for Students. Baltimore, MA: The Johns Hopkins University Press.