====== IAM 961 HW2, fall 2016 ====== **Problem 1:** Prove that any real-valued matrix $A$ has a real-valued SVD, i.e. an SVD factorization $A=U \Sigma V^\dagger$ where $U,\Sigma,$ and $V$ are real-valued matrices. Hint: Do not re-do the existence uniqueness proof we did in class with a restriction to real matrices. Start with a possibly complex SVD $A=U \Sigma V^*$ (where $U$ and $V$ are possibly complex but $\Sigma$ is necessarily real), and use this to show there must be real-valued unitary $U'$ and $V'$ that also form an SVD $A=U' \Sigma V'^* $. I suspect it will be helpful to express the SVDs as sums over columns of $U$ and $V$, i.e. $A = \sum_{j=1}^p \sigma_j u_j v^*_j$, as shown in problem 3.) **Problem 2:** Show that if $A$ is m x n and $B$ is p x n, the product $AB^*$ can be written as \begin{eqnarray*} AB^* = \sum_{j=1}^n a_j b^*_j \end{eqnarray*} where $a_j$ and $b_j$ are the columns of $A$ and $B$. This is more a matter of understanding and proper use of notation than any kind of deep proof. It should take about three lines. **Problem 3:** Let $A$ be an m x n matrix with SVD $A = U\ \Sigma V^*$. By applying the results of problem 2 to the matrices $U$ and $\Sigma V^*$, show that \begin{eqnarray*} A = \sum_{j=1}^p \sigma_j u_j v^*_j \end{eqnarray*} where $p = \min\{m,n\}$. For simplicity you can assume $m \geq n$ so that $p=n$. Note that if $r \leq p$ is the number of nonzero singular values (or equivalently, the rank of $A$), then clearly one can also write the sum going to just $r$ instead of $p$. **Problem 4:** Continuing from problem 3, let \begin{eqnarray*} A_{\nu} = \sum_{j=1}^{\nu} \sigma_j u_j v^*_j \end{eqnarray*} where $\nu \leq p = \min\{m,n\}$. Show that $A_{\nu}$ is the closest rank-$\nu$ approximation to $A$ in the 2-norm, i.e. that \begin{eqnarray*} \| A - A_{\nu} \|_2 = \inf_{ B \in \mathbb{C}^{m\times n}, rank{B} \leq \nu} \| A-B \|_2 = \sigma_{\nu+1} \end{eqnarray*} (where $\sigma_{\nu+1} = 0$ if $\nu = p$). This is Theorem 5.8 in Trefethen & Bau. You can follow that proof, just write it out in your own words, improving on presentation & argument where you can. **Problem 5:** Given the following 2 x 2 matrix $A$ and 2-vector $x$, A = -0.0954915028125262 -1.2449491424413903 0.6571638901489170 0.7135254915624212 x = 0.8 0.2 (a) compute the SVD $A=U \Sigma V^\dagger$. (b) make two plots, one showing the columns of $v_1, v_2$ of $V$ as an orthogonal basis for the domain of $A$, and another showing the columns of $u_1, u_2$ of $U$ as the same for the range of $A$. %%(c)%% superimpose a unit circle $C = \{x \,\, \vert \,\, |x| = 1\}$ on the $v_1, v_2$ plot. (d) superimpose the image of that unit circle under $A$ on the $u_1, u_2$ plot. I.e. for $x \in C$ plot $Ax$. What can you say about the image of $C$ under $A$ in relation to the SVD? (e) Plot the vector $x$ on the $v_1, v_2$ plot. Now figure out where $y=Ax$ will be on the $u_1, u_2$ plot **geometrically** using the SVD, as follows \begin{eqnarray*} y = Ax = U \Sigma V^\dagger x = u_1 \sigma_1 v_1^\dagger x + u_2 \sigma_2 v_2^\dagger x \end{eqnarray*} Following this formula, measure (with a ruler!) the components of $x$ along $v_1$ and $v_2$. Multiply those lengths by the scaling factors $\sigma_1$ and $\sigma_2$. Then measure out the scaled lengths along $u_1$ and $u_2$, and add those components together to get the position of the vector $y=Ax$. You can do this measuring in the units of your ruler without worrying about coordinating those units with the unit length on your plot. (f) Now compute $y=Ax$ numerically and plot it on the $u_1, u_2$ plot. Does it match what you came up with in (e)?