Line 138: | Line 138: | ||
<br> | <br> | ||
+ | |||
+ | ---- | ||
+ | ---- | ||
+ | <font face="serif"></font><math>\color{blue}\text{Related Problem: }</math> | ||
+ | |||
+ | <math> | ||
+ | \text{Given the matrix A and vector b:} | ||
+ | A=\begin{bmatrix} | ||
+ | 2 & 1 \\ | ||
+ | 3 & 1 \\ | ||
+ | 4 & 1 | ||
+ | \end{bmatrix} | ||
+ | b=\begin{bmatrix} | ||
+ | 3\\ | ||
+ | 4 \\ | ||
+ | 15 | ||
+ | \end{bmatrix} | ||
+ | </math> | ||
+ | |||
+ | <math> | ||
+ | '''Find the vector <math>x^{(\ast)}</math> that minimizes <math>\| Ax -b\|^{2}_2</math> ''' | ||
+ | </math> | ||
+ | |||
+ | '''Solution:''' | ||
+ | |||
+ | <math> | ||
+ | x^{(\ast)}=A^{\dagger}=(A^T A)^{-1}A^T b= \begin{bmatrix} | ||
+ | -0.5 & 0 & 0.5 \\ | ||
+ | 11/6 & 1/3 & 7/6 \\ | ||
+ | \end{bmatrix} | ||
+ | \begin{bmatrix} | ||
+ | 3\\ | ||
+ | 4 \\ | ||
+ | 15 | ||
+ | \end{bmatrix}=\begin{bmatrix} | ||
+ | 6 \\ | ||
+ | -\frac{32}{3} \\ | ||
+ | 0 | ||
+ | \end{bmatrix} | ||
+ | </math> | ||
Revision as of 18:07, 26 January 2013
QE2012_AC-3_ECE580-3
Solutions:
$ A = BC = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 0 & -1 \end{bmatrix} \begin{bmatrix} 1 & 0 &-1 \\ 0 & 1 & 0 \end{bmatrix} $
$ B^{\dagger} = (B^T B)^{-1}B^T = \begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix}^{-1} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & -1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2} \end{bmatrix} $
$ C^{\dagger} = C^T(CC^T)^{-1} =\begin{bmatrix} 1 & 0 \\ 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix}^{-1} = \begin{bmatrix} \frac{1}{2} & 0 \\ 0 & 1 \\ -\frac{1}{2} & 0 \end{bmatrix} $
$ A^{\dagger} = C^{\dagger}B^{\dagger} =\begin{bmatrix} \frac{1}{2} & 0 \\ 0 & 1 \\ -\frac{1}{2} & 0 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2} \end{bmatrix} = \begin{bmatrix} \frac{1}{2} & 0 & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2} \\ -\frac{1}{2} & 0 & 0 \end{bmatrix} $
$ x^{\ast} = A^{\dagger} b = \begin{bmatrix} \frac{1}{2} & 0 & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2} \\ -\frac{1}{2} & 0 & 0 \end{bmatrix}\begin{bmatrix} 0 \\ \frac{1}{2} \\ 1 \end{bmatrix} = \begin{bmatrix} 0 \\ \frac{1}{2} \\ 0 \end{bmatrix} $
Solution 2:
$ x^{(\ast)}=A^{\dagger}b $
Since $ A = BC = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 0 & -1 \end{bmatrix} \begin{bmatrix} 1 & 0 &-1 \\ 0 & 1 & 0 \end{bmatrix} $
$ B^{\dagger} = (B^T B)^{-1}B^T = \begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix}^{-1} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & -1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2} \end{bmatrix} $
$ C^{\dagger} = C^T(CC^T)^{-1} =\begin{bmatrix} 1 & 0 \\ 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix}^{-1} = \begin{bmatrix} \frac{1}{2} & 0 \\ 0 & 1 \\ -\frac{1}{2} & 0 \end{bmatrix} $
$ A^{\dagger} = C^{\dagger}B^{\dagger} =\begin{bmatrix} \frac{1}{2} & 0 \\ 0 & 1 \\ -\frac{1}{2} & 0 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2} \end{bmatrix} = \begin{bmatrix} \frac{1}{2} & 0 & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2} \\ -\frac{1}{2} & 0 & 0 \end{bmatrix} $
$ x^{\ast} = A^{\dagger} b = \begin{bmatrix} \frac{1}{2} & 0 & 0 \\ 0 & \frac{1}{2} & -\frac{1}{2} \\ -\frac{1}{2} & 0 & 0 \end{bmatrix}\begin{bmatrix} 0 \\ \frac{1}{2} \\ 1 \end{bmatrix} = \begin{bmatrix} 0 \\ \frac{1}{2} \\ 0 \end{bmatrix} $
$ \color{blue} \text{ The pseudo inverse of a matrix has the property } (BC)^{\dagger}=C^{\dagger}B^{\dagger} $
$ \color{blue}\text{Related Problem: } $
$ \text{Given the matrix A and vector b:} A=\begin{bmatrix} 2 & 1 \\ 3 & 1 \\ 4 & 1 \end{bmatrix} b=\begin{bmatrix} 3\\ 4 \\ 15 \end{bmatrix} $
$ '''Find the vector <math>x^{(\ast)} $ that minimizes $ \| Ax -b\|^{2}_2 $ </math>
Solution:
$ x^{(\ast)}=A^{\dagger}=(A^T A)^{-1}A^T b= \begin{bmatrix} -0.5 & 0 & 0.5 \\ 11/6 & 1/3 & 7/6 \\ \end{bmatrix} \begin{bmatrix} 3\\ 4 \\ 15 \end{bmatrix}=\begin{bmatrix} 6 \\ -\frac{32}{3} \\ 0 \end{bmatrix} $