0

I encountered the problem below, and I know how to do the least squares for a system of equations with no solutions (inconsistent system) where the number of equations (rows) is greater than the number of variables (columns). In this problem, $m \ge n$, however, I am not clear how to set up the matrix A or vector b. My initial thought was to say $\begin{bmatrix}1 & 0\\0 & 1\\0 & 0\end{bmatrix}$ to satisfy the m $\ge$ n condition, however, I am not sure if this is the way to go. I am also not sure how to line up b for that matter to. Here's the question:-

"Let m $\ge$ n, let A be the $m \times n$ identity matrix (the principal submatrix of the $m \times m$ identity submatrix), and let b = [$b_1$,...,$b_m$] be a vector. Find the least squares solution of $Ax=b$ and the 2-norm error."

Appreciate any help!

user76020
  • 123
  • I think you have set up $A$ correctly, and $b$ is just the column $m$-vector with entries $b_1,\dots,b_m$. It looks like you just do the usual normal equations thing. Try it, see what happens. – Gerry Myerson Nov 10 '13 at 12:16
  • Earth to 76020, come in, please. – Gerry Myerson Nov 11 '13 at 12:27
  • Hey, sorry was a bit busy...yes this is exactly what I did and I get a result of b and 2-norm error as 0. – user76020 Nov 11 '13 at 17:27
  • I'm not sure what you mean by "a result of $b$". The least squares solution of the system --- the solution of the normal equation --- is going to be a 2-vector, whereas $b$ is a 3-vector. The 2-norm error is $|Ax-b|$, and that's not going to be zero (unless $b_3=0$), since, no matter what $x$ is, the 3rd component of $Ax$ is going to be zero. Maybe you should write out what you did so we can have a look. – Gerry Myerson Nov 11 '13 at 22:47

1 Answers1

0

$A^T=$ $\begin{bmatrix}1 & 0 & 0\\0 & 1 & 0\end{bmatrix}$

$A^TA$ =$\begin{bmatrix}1 & 0 & 0\\0 & 1 & 0\end{bmatrix}$ $\begin{bmatrix}1 & 0\\0 & 1\\0 & 0\end{bmatrix}$ = $\begin{bmatrix}1 & 0 \\0 & 1\end{bmatrix}$

$A^Tb$ = $\begin{bmatrix}1 & 0 & 0\\0 & 1 & 0\end{bmatrix}$ $\begin{bmatrix}b_1 \\ b_2\\.\\.\\b_m\end{bmatrix}$ = $\begin{bmatrix}b_1 \\ b_2\end{bmatrix}$

Normal Equation, $\begin{bmatrix}1 & 0 \\0 & 1\end{bmatrix}$ $\begin{bmatrix}x_1 \\ x_2\end{bmatrix}$ = $\begin{bmatrix}b_1 \\ b_2\end{bmatrix}$

Therefore $x_1=b_1$ and $x_2=b_2$

$x=(b_1,b_2)$, substituting back, $\begin{bmatrix}1 & 0\\0 & 1\\0 & 0\end{bmatrix}$ $\begin{bmatrix}b_1 \\ b_2\end{bmatrix}$ = $\begin{bmatrix}b_1 \\ b_2\end{bmatrix}$

And thus $ r=$ $\begin{bmatrix}0 \\ 0\end{bmatrix}$ and 2-norm error $= 0$

user76020
  • 123