{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 18.06 pset 11 (due Wed Nov 22 at 11am)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem 1 (5+5+10+5+5 points)\n", "\n", "(From Strang, section 6.4, problem 18.)\n", "\n", "Let $A$ be some rectangular (possibly non-square, possibly complex) matrix. Form the block matrix\n", "$$S = \\begin{pmatrix} 0 & A \\\\ A^H & 0 \\end{pmatrix} $$\n", "where \"0\" denotes a block of zeros of the appropriate size. Consider the eigenvalues λ and eigenvectors $x = (y,z)$ of S, satisfying $Sx = \\lambda x$:\n", "\n", "$$\n", "Sx = \\underbrace{\\begin{pmatrix} 0 & A \\\\ A^H & 0 \\end{pmatrix}}_S \\underbrace{\\begin{pmatrix} y \\\\ z \\end{pmatrix}}_x = \\lambda \\begin{pmatrix} y \\\\ z \\end{pmatrix} = \\lambda x\n", "$$\n", "\n", "**(a)** The eigenvalues of $S$ must be *real* because ...............\n", "\n", "**(b)** If $A$ is $m\\times n$, how big are the vectors $y$ and $z$, and how big are the two blocks of 0's in $S$?\n", "\n", "**(c)** Show that $-\\lambda$ is also an eigenvalue, with eigenvector $(y,-z)$.\n", "\n", "Check this for a random $3\\times 4$ matrix `A = rand(Complex{Float64},3,4)`, with `S = [ 0I A; A' 0I]`. Compute `eigvals(S)`: does it match your prediction?\n", "\n", "**(d)** Show (for the same $z$) that $A^HAz = \\lambda^2 z$, so that $\\lambda^2$ is an eigenvalue of $A^H A$. Check this via `eigvals(A'*A)`.\n", "\n", "**(e)** If $A = I$ ($2 \\times 2$), find all four eigenvectors and eigenvalues of $S$." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem 2 (5+10+5+5+5 points)\n", "\n", "(From Strang, section 6.4, problem 33.)\n", "\n", "Suppose $A^T = -A$, a real *antisymmetric* matrix (also called *skew-symmetric*). Form a random real antisymmetric $5\\times 5$ matrix in Julia via `A = randn(5,5); A = A - A'`.\n", "\n", "Explain the following facts about $A$, *and* check each fact numerically for your random `A` matrix:\n", "\n", "**(a)** $x^T A x = 0$ for every real vector $x$. (Try `x'*A*x` in Julia with `x = randn(5)`.)\n", "\n", "**(b)** The eigenvalues of $A$ (`eigvals(A)`) are **purely imaginary**. (There are multiple ways to show this, but it is a good excuse to review the proof from class that Hermitian matrices have real eigenvalues… almost the same proof works here.)\n", "\n", "**(c)** The determinant of $A$ (`det(A)`) is **positive or zero** (not negative).\n", "\n", "**(d)** The matrix $e^{A}$ is **unitary** (check `Q'*Q - I` for `Q = expm(A)`.) Why?\n", "\n", "**(e)** If you solve $dx/dt = Ax$ for any initial condition $x(0)$, then the length of $x$ is conserved: $\\Vert x(t) \\Vert = \\Vert x(0) \\Vert$ for all $t$. (In Julia, compare `norm(expm(A*t)*x)` to `norm(x)` for various `t`.)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem 3 (5+5+10+10 points)\n", "\n", "(From Strang, section 6.3, problem 31.)\n", "\n", "The **cosine of a matrix** can be defined like $e^A$, by copying the [Taylor series for](https://en.wikipedia.org/wiki/Trigonometric_functions#Series_definitions) $\\cos t$:\n", "\n", "$$\n", "\\cos A = I - \\frac{A^2}{2!} + \\frac{A^4}{4!} - \\frac{A^6}{6!} + \\cdots .\n", "$$\n", "\n", "**(a)** If $Ax = \\lambda x$, multiply each term in the series by $x$ to find an eigenvalue of $\\cos A$.\n", "\n", "**(b)** Explain, using the series, why $\\frac{d^2}{dt^2} \\cos(At) = -A^2 \\cos(At)$.\n", "\n", "**(c)** Explain why $u(t) = \\cos(At) u(0)$ solves $\\frac{d^2 u}{dt^2} = -A^2 u$, given the initial conditions $u(0)$ and $\\left . \\frac{du}{dt} \\right|_{t=0} = 0$.\n", "\n", "**(d)** If $A = \\begin{pmatrix} \\pi & \\pi \\\\ \\pi & \\pi \\end{pmatrix}$, it has eigenvectors $v_1 = \\begin{pmatrix} 1 \\\\ 1 \\end{pmatrix}$ and $v_2 = \\begin{pmatrix} 1 \\\\ -1 \\end{pmatrix}$. Find the corresponding eigenvalues, and use them to compute the matrix $\\cos A$." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem 4 (10+10+10 points)\n", "\n", "Suppose that $A$ is a $3\\times 3$ real-symmetric matrix with eigenvalues $\\lambda_1 = 0$, $\\lambda_2 = -1$, and $\\lambda_3 = -2$. You are given two corresponding eigenvectors $v_1 = \\begin{pmatrix} 1 \\\\ 0 \\\\ 1 \\end{pmatrix}$ (for $\\lambda_1$) and $v_3 = \\begin{pmatrix} 0 \\\\ 1 \\\\ 0 \\end{pmatrix}$ (for $\\lambda_3$).\n", "\n", "**(a)** Give an approximate solution at $t = 100$ to $\\frac{dx}{dt} = Ax$ for $x(0) = \\begin{pmatrix} 1 \\\\ 1 \\\\ 0 \\end{pmatrix}$. (Give the *numerical* value of a specific vector — no unknown coefficients or symbolic expressions!)\n", "\n", "**(b)** Give an eigenvector $v_2$ for $\\lambda_2$ and write the matrix $A$ as a product of three matrices. (You shouldn't need your answer here to answer part a!)\n", "\n", "**(c)** Suppose that we compute the sequence $x_0, x_1, x_2, \\ldots$ given by the recurrence $x_{n+1} = \\alpha A x_n$ for some scalar $\\alpha$. For what value(s) of α would you expect $x_n$ to approach **oscillating** (not exponentially growing, decaying, or constant) solutions for large $n$, for most initial $x_0$?" ] } ], "metadata": { "kernelspec": { "display_name": "Julia 0.6.0", "language": "julia", "name": "julia-0.6" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "0.6.0" } }, "nbformat": 4, "nbformat_minor": 2 }