This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gibson:teaching:fall-2015:iam961:iam961-hw2 [2015/09/29 13:30] gibson |
gibson:teaching:fall-2015:iam961:iam961-hw2 [2015/09/30 08:58] (current) gibson |
||
---|---|---|---|
Line 13: | Line 13: | ||
of notation than any kind of deep proof. It should take about three lines. | of notation than any kind of deep proof. It should take about three lines. | ||
- | **Problem 3:** Given the following 2 x 2 matrix $A$ and 2-vector $x$, | + | **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$, | ||
<code> | <code> | ||
A = | A = | ||
Line 26: | Line 44: | ||
(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$. | (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. | + | %%(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? | (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$ | + | (e) Plot the vector $x$ on the $v_1, v_2$ plot |
<code> | <code> | ||
x = | x = | ||
Line 36: | Line 54: | ||
1.00000000000000 | 1.00000000000000 | ||
</code> | </code> | ||
- | Figure out where $Ax$ will be on the $u_1, u_2$ plot using the SVD, as follows | + | Now figure out where $y=Ax$ will be on the $u_1, u_2$ plot **geometrically** using the SVD, as follows |
\begin{eqnarray*} | \begin{eqnarray*} | ||
- | Ax = U \Sigma V^\dagger x = u_1 \sigma_1 v_1^\dagger x + u_2 \sigma_2 v_2^\dagger x | + | 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*} | \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$. Do this all by eye or with a ruler. | ||
+ | (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)? |