Least squares problem - Leon Ch 5, sec.3, prob.3

Click For Summary

Homework Help Overview

The discussion revolves around a least squares problem involving the system Ax = b, where A is a matrix and b is a vector. Participants are analyzing the rank of matrix A and its implications for the existence of solutions to the normal equations.

Discussion Character

  • Exploratory, Assumption checking, Problem interpretation

Approaches and Questions Raised

  • Participants are questioning the rank of matrix A and its implications for the uniqueness of the solution. Some are interpreting the solution given in the book as a line in R^2, while others express confusion over the inconsistency of the equations derived from A and b.

Discussion Status

There is an ongoing exploration of the problem, with participants offering various interpretations and questioning the assumptions made about the rank of A. Some have provided insights into the nature of the equations and the implications of singular matrices, while others are discussing alternative methods for approaching the problem.

Contextual Notes

Participants note potential typos in the problem statement and the matrix A, which may affect the interpretation of the problem. There is also mention of the challenges associated with using Gaussian elimination and the implications of singular matrices in the context of least squares solutions.

IntroAnalysis
Messages
58
Reaction score
0

Homework Statement


For the system Ax = b, find least squares solution.

A = (1 2) ; b = (3, 2, 1)T
----(2 4)
----(1 -2)



Homework Equations


I know if A is an m x n matrix of rank n, the normal equations

ATAx = ATb

have a unique solution x = (ATA)-1ATb

However, the matrix A is not linearly independent, and is only rank = 1.

Using Gaussian elimination, I think this system of equations is inconsistent. But book gives
answer {(1 - 2α, α)T; α real}

I don't see how they get this. Aren't these the equations of 3 parallel lines?
 
Physics news on Phys.org
isn't A of rank 2?

i would interpret {(1 - 2α, α)T; α real} as a line in R^2
 
Something is wrong. The problem as stated has a unique solution. The book implies an infinite number of solutions, which isn't true based on the problem statement. Maybe there is a typo in A?
 
shouldn't the least squares solution to a 2 variable case be a "line of best fit" relating the variables?
 
Yes, I believe you are correct. I've attached my work. Also, (ATA) is singular, so
there isn't an inverse of (ATA). Of course, the only examples I see in this section of the book are invertible.

Again, anyone know how they come up with their solution {(1 - 2α, α)T such that α real}?
 

Attachments

  • 5.3_Question3.jpg
    5.3_Question3.jpg
    31.3 KB · Views: 506
No, A isn't a rank of 3. The vectors (2, 4) and (-1, -2) are linear combinations of (1, 2). Hence, rank of A is the one vector (1,2). The nonzero rows of the row echelon matrix form a basis for the row space.
 
you've written (1,-2) in the original problem
 
Darn it, you are correct, I obviously was having problems using Latex for set notation.
Set A should be row 1: 1 2
row 2: 2 4
row 3: -1 -2

and b = (3, 2, 1)T

Thanks for noticing the typo.
 
Your three equations are

x+2y = 3
2x+4y = 2
-x-2y=1

These equations are inconsistent so they can't all be satisfied. You are looking for (x,y) that minimizes the sum of squares of the errors:

w = (x+2y-3)2+(2x+4y-2)2+(-x-2y-1)2

I would work it as a two variable calculus minimization problem.
 
  • #10
IntroAnalysis said:
Darn it, you are correct, I obviously was having problems using Latex for set notation.
Set A should be row 1: 1 2
row 2: 2 4
row 3: -1 -2

and b = (3, 2, 1)T

Thanks for noticing the typo.

You also have a typo in your hand written analysis that you posted. Look at your calculation of ATA. The last row of A has a typo. To answer your question how the book got their answer, you need to look at solving ATAx = ATb. It is singular as you state. This means there is either no solution or an infinite number of them. In this particular case you end up with two identical equations which is the same as one equation with two unknowns. Let one of the unknowns take on an arbitrary value (the book let x2 = a) and you'll get your answer.
 
Last edited:
  • #11
Correct, (ATA) should come out to
(6 12)
(12 24)

The determinant = 144 - 144 = 0, so still singular.

If I take the person's advice and take partial derivatives of w w.r.t x and y:

w = (x - 2y - 3)2 + (2x + 4Y - 2)2 + (-x - 2y - 1)2

I get dw/dx = 12x + 24y - 12 = 12(x + 2y -1) = 0
dw/dy = 24x + 48y - 24 = 24(x + 2y -1) = 0

letting y = α, then x = 1 - 2α and the solution {(1 - 2α), α; for all α element of Real}

This looks like the long way to get at what N(AT) looks like.
 
  • #12
I saw my professor about this problem yesterday. While the method suggested here works, it is not the best way to solve this problem.

See attached. But we know that : (ATA)x = ATb is always consistent.

So we can solve reducing it with Row Echelon Form. This is the most efficient way to solve this problem.

I was relying on following the examples from this section too much. My professor had said (when showing how cumbersome finding an inverse matrix can be), "No one solves them like this." I thought he meant they use computers or calculators. That is where I got confused.
 

Attachments

  • 5.3_Question3Solved.jpg
    5.3_Question3Solved.jpg
    28.3 KB · Views: 494

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
4
Views
5K
  • · Replies 23 ·
Replies
23
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
7K