Finding orthonormal set using Gram-Schmidt and least squares

Click For Summary

Homework Help Overview

The discussion revolves around finding an orthonormal set using the Gram-Schmidt process for a given 3x2 matrix and determining the least-squares solution for a specific vector. The original poster presents a matrix A and seeks to establish an orthonormal basis and explore its implications for least-squares solutions.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • The original poster attempts to find an orthonormal set q1, q2, q3 using the Gram-Schmidt process and questions the determination of the fundamental subspace containing q3. They also express confusion regarding the least-squares solution and the relationship between their orthonormal set and the matrix A.

Discussion Status

Participants are actively engaging with the original poster's attempts, providing clarifications about the relationship between the orthonormal set and the matrix A. Some participants suggest exploring the QR factorization and its implications for solving the least-squares problem, while others highlight the importance of understanding the construction of the matrix R.

Contextual Notes

There are indications of confusion regarding the application of the orthonormal basis to the least-squares solution, particularly in the context of the normal equations and the role of the matrix R in the factorization of A.

tatianaiistb
Messages
47
Reaction score
0

Homework Statement



A) Find an orthonormal set q1, q2, q3 for which q1,q2 span the column space A [1 1; 2, -1; -2,4] (this is a 3x2 matrix).

B) Which fundamental subspace contains q3?

C) What is the least-squares solution of Ax=b if b=[1 2 7]T?

Homework Equations



Gram-Schmidt

The Attempt at a Solution



A) So I figured out q1, q2, and q3 using Gram-Schmidt process. These are q1 = [1/3 2/3 -2/3]T, q2 = [2/3 1/3 2/3]T, and q3 = +-[-2/3 2/3 1/3]T

B) Don't know how to determine this

C) For the least square, since they are orthonormal sets, I used the formula x= [q1Tb; q2Tb] However, I'm not getting the right answer. In addition, I tried doing it the long way using the formula x=(ATA)-1ATb, I'm getting even different numbers... Please help!
 
Physics news on Phys.org
You found the orthonormal set (Q), but that is not equal to A. What is A equal to?
 
[1 1
2 -1 = A
-2 4]

I'm now only having trouble with part C. Thanks!
 
Yes, I understand. But there is another way to represent A using the orthogonal basis that you constructed and another factor of A. This factor, call it R, is an upper right triangular matrix. R is constructed such that QR = A. We note Q is orthogonal so Q^{T} = Q. Thus, using this factorization for A in the normal equations yields a linear triangualr system for solving the Least Squares problem.
 
I should add that, as part of the construction of Q, you will have already computed the elements of R.
 
Thanks Theo! I do understand about A=QR and the construction of it. But I don't understand how that can help me finding x(hat), which is the least-squares solution.

What I was thinking is that x(hat)=Q^T*b because Q has already orthonormal vectors.

I'm getting that x(hat) = (-3 6 3)^T, but it says the solution is supposed to be x(hat) = [1 2]^T which they supposedly got from q1^Tb and q2^Tb. However, if I multiply the very same q's I got (which I was confirmed are correct) by the given b, I'm not getting the given answer. So I'm going in circles... Any help?
 
Firstly, let me make a correction to one of my previous posts (post #4).

We note Q is orthogonal so Q^{T}=Q.

should read

We note Q is orthogonal so Q^{T}=Q^{-1}.

Secondly, return to the Normal equations for the Least Squares solution:

<br /> A^{T}A \, x = A^{T} \, b<br />
Now substitute the factor expresion for A, ie, A=QR
(QR)^{T}(QR)\,x = (QR)^{T}b
R^{T}(Q^{T}Q)\,R\,x = R^{T}Q^{T}b
R^{T}R\,x = R^{T}Q^{T}b
since Q^{T}Q=I. Now pre-multiply both sides by R^{-T} to yield
R\,x = Q^{T}b
It is this system that you need to solve for x to yield the Least Squares solution. Remember, just because you found the orthogonal basis for A doesn't mean its equal to A . There is a certain amount of translation and rotation of that basis to yield that A (hence the R factor).

Remember, R is triangular, so a simple backsolve operation will yield the solution (no need to compute R^{-1}).
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
8K
  • · Replies 4 ·
Replies
4
Views
2K