18.06 Problem Set 8¶

Due Friday, April 8.

Problem 1 (5+5+5 points)¶

Recall that a (real) unitary matrix $Q$ is a square matrix such that $Q^T = Q^{-1}$, or equivalently $\Vert Qx \Vert = \Vert x \Vert$ for any $x$.

We give a function randQ(n) below to generate a random $n\times n$ real unitary matrix $Q$ for testing purposes.

(a) From the properties of $Q$ above, what can you say about $\det Q$? Check your deduction with a few random $Q$ matrices, calling det(randQ(5)) or similar.

(b) From the properties of $Q$ above, what can you say about an eigenvalue $\lambda$ of $Q$, if the eigenvalue is real?

(c) Compute the eigenvalues of a few random $3\times 3$ real unitary matrices, with λ = eigvals(randQ(3)). What do you notice (no proofs required)? Try plotting the imaginary parts of the eigenvalues versus the real parts, given by imag.(λ) and real.(λ) respectively, for a bunch of random Q's), using the code outline below.

In [ ]:
using LinearAlgebra

# generate a random (Haar-uniform) n x n real unitary matrix
# using the algorithm from https://arxiv.org/abs/math-ph/0609050
function randQ(n)
    QR = qr(randn(n,n))
    return QR.Q * Diagonal(sign.(diag(QR.R)))
end
In [ ]:
# code outline for 1c:

using PyPlot
for i = 1:20
    # do some plotting of eigenvalues
end
axis("equal") # scale the x and y axes equally
title("problem 1c")
xlabel("real part")
ylabel("imaginary part")

Problem 2 (5+5+5+5 points)¶

(a) If $P$ is a $3 \times 3$ projection matrix onto a 2d subspace of $\mathbb{R}^3$, then what is its determinant?

(b) If $A$ is an $11 \times 11$ matrix satisfying $A^T = -A$ (anti-symmetric), use the properties of determinants to say what $\det A$ must be.

(c) What are the determinants of $\begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} \begin{pmatrix} 1 & -4 & 5 \end{pmatrix}$ and $\begin{pmatrix} 1 & -4 & 5 \end{pmatrix} \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}$?

(d) If $U = \begin{pmatrix} 1 & 4 & 6 \\ & 2 & 5 \\ & & 3 \end{pmatrix}$, what is the determinant of $U^{-3}$?

Problem 3 (5+5+5+5 points)¶

$A = \begin{pmatrix} 1 & -1 & -1 \\ -1 & 1 & 0 \\ -1 & -1 & 0 \end{pmatrix}$ has eigenvalues $\lambda_1 = -1$, $\lambda_2 = 1$, and $\lambda_3 = 2$ and corresponding eigenvectors are $x_1 = \begin{pmatrix} 2 \\ 1 \\ 3 \end{pmatrix}$, $x_2 = \begin{pmatrix} 0 \\ 1 \\ -1 \end{pmatrix}$, and $x_3 = \begin{pmatrix} -1 \\ 1 \\ 0 \end{pmatrix}$.

Find the eigenvectors and eigenvalues of the following matrices. (If you find yourself trying to solve a cubic equation, stop! Very little calculation should be required.)

(a) $2A$

(b) $A^3$

(c) $2I + 3A + 4A^2$

(d) $P A P$ where $P = \begin{pmatrix} & 1 & \\ 1 & & \\ & & 1 \end{pmatrix}$. (Hint: What does $P$ do to a vector? What is $P^{-1}$? Hence $PAP$ and $A$ are __________.)

Problem 4 (10+5 points)¶

For the matrix $A$ of problem 3:

(a) Compute $A^{50} x$ where $x = \begin{pmatrix} 3 \\ -1 \\ 4 \end{pmatrix}$.

(b) Check your answer in Julia.

Problem 5 (10 points)¶

(From Strang section 5.1, problem 18.)

Use row operations to show that this $3 \times 3$ "Vandermonde determinant" is: $$ \det \begin{pmatrix}1 & a & a^2 \\ 1 & b & b^2 \\ 1 & c & c^2 \end{pmatrix} = (b-a) (c-a) (c-b) \, . $$