1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Least Squares

  1. Apr 16, 2007 #1
    This is a pretty basic question, but I just want to make sure. The question is to find the least square solution for
    [tex] \newcommand{\colv}[2] {\left(\begin{array}{c} #1 \\ #2 \end{array}\right)}
    1 & 2\\
    2 & 4
    \right) x = \colv{2}{2}[/tex]

    I can just find the orthogonal projection of the two vectors, right? In other words, use the find [tex]w = a_1\mathbf{v_1} + a_2\mathbf{v_2}[/tex]
    [tex]\newcommand{\colv}[2] {\left(\begin{array}{c} #1 \\ #2 \end{array}\right)}
    a_1 {\colv{1}{2}} + a_2 {\colv{2}{4}} = {\colv{w_1}{w_2}}[/tex]
    [tex] a_1 = \frac{<b,v_1>}{||v_1||^2}[/tex]
    [tex] a_2 = \frac{<b,v_2>}{||v_2||^2}[/tex]

    I don't really want to use the method with positive definite because the numbers turn out sticky.

    Then solution can be expressed as [tex]\mathbf{z} = \mathbf{b} - \mathbf{w}[/tex], such that z is orthogonal to the range of K?
    Last edited: Apr 16, 2007
  2. jcsd
  3. Apr 16, 2007 #2
    Two problems I just thought of though. If I want to do an orthogonal projection the basis vectors must be orthogonal. I suppose I could convert to an orthogonal basis.

    Furthermore, K^T K = Kx will still not give an answer such that b is in the range of K. No wonder this problem was assigned, it's not as basic as I thought. :(

    So if I convert the second vector to an orthogonal vector with Gram-Schmitt then I can use the orthogonal projection as the least squares answer?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Least Squares
  1. Least squares (Replies: 8)

  2. Least Squares (Replies: 3)

  3. The least squares line (Replies: 4)

  4. Least-squares fit (Replies: 2)