This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
gibson:teaching:fall-2015:iam961:iam961-hw2 [2015/09/29 13:10] gibson created |
gibson:teaching:fall-2015:iam961:iam961-hw2 [2015/09/30 08:58] (current) gibson |
||
---|---|---|---|
Line 4: | Line 4: | ||
$A=U \Sigma V^\dagger$ where $U,\Sigma,$ and $V$ are real-valued matrices. | $A=U \Sigma V^\dagger$ where $U,\Sigma,$ and $V$ are real-valued matrices. | ||
- | **Problem 2:** Show that if $A$ is $m \times n$ and $B$ is $ l \times n$, the product $AB^*$ can be written as | + | **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*} | \begin{eqnarray*} | ||
Line 11: | Line 11: | ||
where $a_j$ and $b_j$ are the columns of $A$ and $B$. This is more a matter of understanding and proper use | 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! | + | of notation than any kind of deep proof. It should take about three lines. |
- | **Problem 3:** | + | **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> | ||
+ | A = | ||
+ | -0.0954915028125262 -1.2449491424413903 | ||
+ | 0.6571638901489170 0.7135254915624212 | ||
+ | x = | ||
+ | 1.50000000000000 | ||
+ | 1.00000000000000 | ||
+ | </code> | ||
+ | (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 | ||
+ | <code> | ||
+ | x = | ||
+ | 1.50000000000000 | ||
+ | 1.00000000000000 | ||
+ | </code> | ||
+ | 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$. 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)? |