Assignment 2
Numerical Linear Algebra February 7, 2008 1
— David Wagner 2008/02/14 11:14
Work any 7 of the following problems. You make work more for additional credit.
✔Problem 1
1. Suppose a1 and a2 are linearly independent vectors, L = span{a1, a2}, and b is a vector not in L. By minimizing the function φ(s, t) = ½||b − (sa1 + ta2)||², find a formula for the projection of b onto the subspace L. Answer: if A = [a1 a2], then P = A(A*A)-1A*.
- Assume given are real scalars or vectors in ℜn;
- A=[a1 a2]; Pb = L = A[s t]*;
- A=
; A*=
. Note the row and column indices.

(
)- The minimum of this function occurs at the smallest distance between b and a linear combination of a1 and a2. This will occur when both first partials are zero and second partials are positive.
=
=0
=
=0
>0✔
>0✔


=![[matrix{2}{2}{a_11 a_12 a_21 a_22}][matrix{2}{1}{b_1 b_2}] [matrix{2}{2}{a_11 a_12 a_21 a_22}][matrix{2}{1}{b_1 b_2}]](http://wiki.waggy.org/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=cache_mathplugin%3amath_976_b41d4707df4a220581ea3d60398a51b6.png)
=![[matrix{2}{2}{a_11 a_12 a_21 a_22}][matrix{2}{1}{b_1 b_2}] [matrix{2}{2}{a_11 a_12 a_21 a_22}][matrix{2}{1}{b_1 b_2}]](http://wiki.waggy.org/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=cache_mathplugin%3amath_976_b41d4707df4a220581ea3d60398a51b6.png)
- A*A[s t]* = A*b. Recall the row and column indices are as noted above.
- (A*A)-1A*b = [s t]*
- A(A*A)-1A*b = A[s t]* = Pb
- → P = A(A*A)-1A*✔
Problem 2
2. Suppose that A is an n × n matrix. Consider solving Ax = b, by minimizing the quadratic functional φ(x) = ½||Ax − b||². Show by taking partial derivatives that ∇φ(x) is just A∗(Ax − b). (Consider φ = φ(x1, x2, …, xn), use the definition of Euclidean norm and Ax, then find ∂φ/∂xk, k = 1, …, n.)
. Assume real numbers.
; ![(Ax)^2 = [matrix{3}{1}{{sum{j=1}{n}{a_{1j}x_j} sum{i=1}{n}{sum{j=1}{n}{a_{ij}x_j}}} vdots {sum{j=1}{n}{a_{nj}x_j} sum{i=1}{n}{sum{j=1}{n}{a_{ij}x_j}}} } ] (Ax)^2 = [matrix{3}{1}{{sum{j=1}{n}{a_{1j}x_j} sum{i=1}{n}{sum{j=1}{n}{a_{ij}x_j}}} vdots {sum{j=1}{n}{a_{nj}x_j} sum{i=1}{n}{sum{j=1}{n}{a_{ij}x_j}}} } ]](http://wiki.waggy.org/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=cache_mathplugin%3amath_907_06baf6cff488016f2125831effeebbc0.png)
=
=
= 
= 
- The outermost sum (index i) simply adds the rows of the resultant column vector.
- The minimum of this sum of nonnegative values occurs when each term is minimized.
- Each term is minimal when partials xk are all zero. (And second partials at this point are positive; see above.)
- Only a few terms are retained in each partial.
- But looking at this monster makes me cross-eyed. If accounting was my thing, I'd be certified already.
= ½(Ax-b)*(Ax-b)
✔Problem 3
3. Consider the matrix
By hand calculation find the orthogonal projection P onto the range(A) and the image under P of the vector (1, 2, 3)T. (See problem 1.)
- P = P² = range(A) = Ax; v=[1 2 3]T. Find P, Pv.
- A* =
![[matrix{2}{3}{1 0 1 2 1 0}] [matrix{2}{3}{1 0 1 2 1 0}]](http://wiki.waggy.org/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=cache_mathplugin%3amath_980.5_959063978aea81cc096b63ed74dc1cc2.png)
- P = A(A*A)-1A* =
=
=
=![[matrix{3}{3}{{5/6} {1/3} {1/6} {1/3} {1/3} {-{1/3}} {1/6} {-{1/3}} {5/6}}] [matrix{3}{3}{{5/6} {1/3} {1/6} {1/3} {1/3} {-{1/3}} {1/6} {-{1/3}} {5/6}}]](http://wiki.waggy.org/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=cache_mathplugin%3amath_941.5_484ce1ca46c5188425bef5fa45f82fab.png)
- P =
![{1/6}[matrix{3}{3}{5 2 1 2 2 {-2} 1 {-2} 5}] {1/6}[matrix{3}{3}{5 2 1 2 2 {-2} 1 {-2} 5}]](http://wiki.waggy.org/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=cache_mathplugin%3amath_969.5_fbe5dea7f131208f95d70c83e9fd76e4.png)
- Pv =
![{1/6}[matrix{3}{3}{5 2 1 2 2 {-2} 1 {-2} 5}][matrix{3}{1}{1 2 3}] = [matrix{3}{1}{2 0 2}] {1/6}[matrix{3}{3}{5 2 1 2 2 {-2} 1 {-2} 5}][matrix{3}{1}{1 2 3}] = [matrix{3}{1}{2 0 2}]](http://wiki.waggy.org/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=cache_mathplugin%3amath_969.5_3b83662899785edcb8b58ab12512667f.png)
Problem 4
4. Show that if {vj} is a basis (not necessarily orthonormal) of a subspace L, then the closest point w to y in span({vj}) is given in terms of the Gramian matrix, Mij =<vi, vj>. (Use the fact that <y − w, v> = 0 for all v in L.) How is this related to the stiffness matrix used in finite element methods?
Problem 5
5. If P is an orthogonal projection, then I − 2P is unitary. Prove this algebraically and give a geometric interpretation.
- Projection is Idempotent: P = P² = PP
- Orthogonal: P = P*
Unitary
- (I - 2P)*(I - 2P) = (I - 2P)(I - 2P)* = I
- (I - 2P)-1 = (I - 2P)*
- (I - 2P)*(I - 2P)
- = (I* - 2P*)(I - 2P)
- = I*I - 2P*I - 2I*P +4P*P
- = I -2P* -2P +4PP
- = I -2P -2P +4P
- = I✔
The geometric interpretation has something to do with the fundamental theorem of linear algebra and projections into the fundamental subspaces.
Needs diagram
✔Problem 6
6. Let A ∈ Cn×n be hermitian symmetric (A = A∗). (a) Prove that all eigenvalues of A are real, and (b) Prove that if x and y are eigenvectors corresponding to distinct eigenvalues, then x and y are orthogonal.
- Hermitian: A=A*.
- Symmetric: aij=aji. ak (and ak*) is the column (or row) corresponding to lambdak. Note ak = ak*; whether it is a row or column is implied by context.
- Hermitian and symmetric implies a real matrix since
.
- i,j = 1,2,…,n
- Ax = λx = A*x
- Axk = λkxk = A*xk.
=
= ak*xk = ak xk.- Since ak is real, lambdak must be real.
- (λk xk)*xk = (ak xk)*xk. [Dot both sides.]
- λk (xk*xk) = xk*(ak* xk) = ak(xk*xk). [Do a little conjugate symmetry do-si-do.]
- (xk*xk) is real, as is ak ∴ lambdak must also be real.
Now part b.
- Ax = λxx = A*x; Ay = λyy = A*y; λx≠λy
- Ax = λxx
- (Ax)*y = (λxx)*y [Dot both sides again]
- x*(A*y) = λx(x*y) [More dancing, this time a cha-cha.]
- x*(λyy) = λx(x*y)
- λy*(x*y) = λx(x*y)
- The complex conjugate of a real number is itself: λy* = λy.
- λy(x*y) = λx(x*y)
- Since λx and λy are distinct and (assumed) nonzero, (x*y) must be zero.
- ∴ x is orthogonal to y.
✔Problem 7
7. What can be said about the eigenvalues of a unitary matrix U? (A unitary matrix is one whose adjoint is also its inverse, i.e., U−1 = U∗, equivalently U*U=I).
- Ux = λx
- U−1Ux = U−1λx = U*x
- Ix = U*λx
- xk=U*λkxk
=
=
= ![lambda_k
[matrix{4}{1}{
{u_{11} + u_{21}+ cdots + u_{j1}}
{u_{12} + u_{22} + cdots + u_{j2}}
vdots
{u_{1n} + u_{2n} + cdots + u_{jn}}
}] x_k lambda_k
[matrix{4}{1}{
{u_{11} + u_{21}+ cdots + u_{j1}}
{u_{12} + u_{22} + cdots + u_{j2}}
vdots
{u_{1n} + u_{2n} + cdots + u_{jn}}
}] x_k](http://wiki.waggy.org/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=cache_mathplugin%3amath_947.5_846ba0bf7cee6023029c28713eace254.png)
= 

| Each eigenvalue of a unitary matrix U is the multiplicative inverse of the sum of the corresponding matrix column. |
|---|
Problem 8
8. Let A be the operator defined by Au = −u'' acting on the space C²0[0, 1] of functions satisfying zero Dirichlet boundary conditions. If K is a positive integer we showed in class that λk = k²π² is an eigenvalue with associated eigenfunction sin(kπx). Fix n and consider the corresponding discrete problem on a finite difference grid of n − 1 interior points. Show that the eigenvalues of the matrix −n²A, where A is the matrix with ones on the sub- and super-diagonal, and -2 along the diagonal, are given by λk = 2(1 − cos(πk/n )) for k = 1, …, n − 1 with associated eigenvector (uk)j = sin(πkj/n) for j = 1, …, n − 1. What happens in the limit as n → ∞? (Hint: consider the analogy with the continuous problem above, now finding an eigenvector-eigenvalue pair amounts to solving a difference equation with boundary conditions. The role of the exponential functions is now played by vectors of the form uj = ξj, for instance. Challenging, but it can be done by following the ODE boundary value problem blueprint. If your ODE skills are a little rusty, you could just use the definition of eigenvalue-eigenvector pair and verify the assertion. Note that this approach will require adroit use of various trig identities.)
✔Problem 9
9. Let A be a symmetric matrix of order n, with eigenvalues λ1 ≤ λ2 ≤ · · · ≤ λn and define the Rayleigh quotient R(x) = <Ax, x>/<x, x>, x ≠ 0. Show that maxx R(x) = λn and minx R(x) = λ1. (Show that optimizing ˜R(x) = <Ax, x>, for ||x|| = 1 gives an equivalent problem, and use the fact that A has a complete set of orthonormal eigenvectors to expand an arbitrary unit vector in terms of this basis.)
- A ∈ ℜnxn; i ∈ [1,2,3,…,n].
- Ax = λx = (Ax)*x = (λx)*x = λ(x*x). [Dot both sides by x, then apply scalar linearity.]
- λ = (Ax)*x/(x*x) = <Ax, x>/<x, x> = R(x). [x ≠ 0 ⇒ (x*x) = <x, x> ≠ 0.]
- Clearly, the maximum R(x) is the maximum λ, λn, and the minimum R(x) is the minimum λ, λ1.
[Why does the problem statement suggest a more difficult solution?]
- R(x) = <Ax, x>/<x,x>, x ≠ 0. x ≠ 0 ⇒ <x,x> ≠ 0.
.- There are an infinite number of solutions to the original eigenvalue problem. One set of these (hatted x) is the one for which x forms an orthonormal basis: ||x|| = 1.
when
. [
are positive real numbers.]- ∴
. - Now, A has a complete set of real orthonormal eigenvectors
is unitary.
.
. Hatted x is a matrix and an orthonormal basis for A, and hatted lambda is a vector. A unit vector e wears a hat because that seems to be the fashion for norm 1 variables (though the lambda vector is not necessarily norm 1).
- The projection of a unit vector e onto fashionable x is
.†- This rotates or reflects the unit vector into x, without changing its length.
- The provided hint, ”…to expand an arbitrary unit vector in terms of this [orthonormal] basis,” is misleading; an orthonormal projection does not 'expand' any vector since it does not change its length.
- If 'expand' is meant to indicate term-by-term expansion, this really seems like a very long road to travel to duplicate the three lines before starting down this track.
✔Problem 10
10. Show that if x is a vector in ℜm, then ||x||∞ ≤ ||x||2. Show that if A is a n × n matrix, then ||A||∞ ≤ √n||A||2.
- Note that for all real x, |x| = √x² ≥ 0.
- Now suppose xmax be an element of x such that max|xmax| = max|xi|, and let y be a vector in ℜm-1 containing all xi but (one) xmax.
=
=
≤
= 
≤ 
≤
✔
Now, part 2. [Note, because this formula layout software does not have an asterisk (of all thing to omit) I have to use a circle or superscript T instead of a star in some places.]
≤ 
≤ 
≤ 
≤ 
≤ 
≤ 
≤
✔
✔Problem 11
11. An elementary matrix is one of the form E(u, v; σ) = I − σuv∗. Show that since E(u, v; σ)E(u, v; τ) = E(u, v; σ + τ − στv∗u) that for σ−1 + τ−1 = v∗u, E(u, v; σ) = E(u, v; τ )−1.
- E(u, v; σ) = E(u, v; τ )−1
- E(u, v; σ) E(u, v; τ ) = I
- E(u, v; σ + τ − στv∗u) = I
- I − (σ + τ − στv∗u)uv∗ = I
- (σ + τ − στv∗u)uv∗ = 0
- σuv∗ + τuv∗ − (στv∗u)uv∗ = 0
- σuv∗ + τuv∗ = (στv∗u)uv∗
- (σ + τ)uv∗ = (στv∗u)uv∗
- v∗u(σ + τ)uv∗ = (σ−1 + τ−1)(στv∗u)uv∗
- v∗u(σ + τ)uv∗ = (τv∗u)uv∗ + (σv∗u)uv∗
- (σ + τ)v∗uuv∗ = (σ + τ)v∗uuv∗✔
- These steps are all reversible, so just follow through this backwards.
[“No, Holmes, it is not elementary. And please stop calling me 'dear'.”]
Problem 12
12. A matrix, or the transpose of a matrix, Li(li) = E(li, ei, ; 1), where ej* li = 0, j ≤ i, is called an elementary triangular matrix. Show that Li−1 (li) = Li(−li) and det(Li) = 1. Explain how these matrices arise in the LU-factorization algorithm.



Discussion