Suppose that $A$ is a $3\times 3$ matrix with eigenvalues $\lambda_1 = 1, \lambda_2 = -1, \lambda_3 = 2$ and corresponding eigenvectors $x_1, x_2, x_3$.
(a) Give eigenvectors and eigenvalues of $(A^2 - 3A + 4I)^{-1}$
(b) For what value(s), if any, of the scalar $\mu$ is $B = A^2 - 3A + \mu I$ singular, which corresponds to $B$ having one or more eigenvalues equal to _______.
(c) $A^n x$ for large $n$ is very nearly parallel to _______ unless $x$ is _______.
(a) The eigenvalues of $(A^2 - 3A + 4I)^{-1}$ are $\boxed{1/2, 1/8, 1/2}$ and the corresponding eigenvectors are $\boxed{x_1, x_2, x_3}$ (same as $A$).
Note that if $x_i$ is eigenvector of $A$ with eigenvalue $\lambda_i$, then $x_i$ is an eigenvector of $A^2 - 3A + 4I$ with eigenvalue $\lambda_i^2 - 3\lambda_i + 4$. Here, $i$ can be $1,2, \text{ or }, 3$. This can be shown as $A x_i = \lambda_i x_i$ and $A^2 x_i = A A x_i = \lambda_i A x_i = \lambda_i^2 x_i$. Thus, $$ (A^2 - 3A + 4I)x_i = A^2 x_i - 3A x_i + 4x_i = \lambda_i^2 x_i - 3\lambda_i x_i + 4x_i = (\lambda_i^2 - 3\lambda_i + 4) x_i. $$ Hence, $x_i$ is an eigenvector of $A^2 - 3A + 4I$ with eigenvalue $\lambda'_i = \lambda_i^2 - 3\lambda_i + 4$ for $i = 1,2,3$.
So, the eigenvalues of $A^2 -3A + 4I$ are $$ \lambda'_1 = \lambda_1^2 - 3\lambda_1 + 4 = 2\\ \lambda'_2 = \lambda_2^2 - 3\lambda_2 + 4= 8\\ \lambda'_3 = \lambda_3^2 - 3\lambda_3 + 4 = 2. $$ The corresponding eigenvectors are (still) $x_1, x_2, x_3$.
The eigenvalues of the inverse of a matrix are the inverse of the eigenvalues of the original matrix. So, the eigenvalues of $(A^2 - 3A + 4I)^{-1}$ are $$ \frac{1}{\lambda'_1} = 1/2\\ \frac{1}{\lambda'_2} = 1/8\\ \frac{1}{\lambda'_3} = 1/2, $$ with the corresponding eigenvectors still being $x_1, x_2, x_3$.
(b) $B$ is singular if and only if $\boxed{\mu = 2\text{ or }-4}$. In this case, $B$ has one or more eigenvalues equal to $\boxed{0}$.
From the previous part, we know that $B$ has eigenvalues $\lambda_i^2 - 3\lambda_i + \mu$ for $i = 1,2,3$. $B$ is singular if and only if at least one of its eigenvalue is $0$: an eigenvalue of $0$ is equivalent to a nonzero vector in the nullspace, i.e. $N(B) \ne \{\vec{0}\}$, which is necessary for a singular square matrix. Finding the condition on $\mu$ for the eigenvalues to be $0$: $$ \lambda_1^2 - 3\lambda_1 + \mu = 0 \implies \mu = 2\\ \lambda_2^2 - 3\lambda_2 + \mu = 0 \implies \mu = -4\\ \lambda_3^2 - 3\lambda_3 + \mu = 0 \implies \mu = 2. $$ Otherwise, all the eigenvalues are nonzero and $B$ is nonsingular. So, $B$ is singular if and only if $\mu = 2\text{ or }4$.
(c) $A^n x$ for large $n$ is very nearly parallel to $\boxed{x_3}$ unless $x$ is in $\boxed{\text{span }x_1,x_2}$.
This is because $x_3$ is the eigenvector corresponding to the eigenvalue with largest absolute value, $2$. As eigenvectors form the basis, any vector $x$ can be written as $x = c_1 x_1 + c_2 x_2 + c_3 x_3$ for some scalars $c_1, c_2, c_3$. So, $$ A^n x = A^n (c_1 x_1 + c_2 x_2 + c_3 x_3) = c_1 A^n x_1 + c_2 A^n x_2 + c_3 A^n x_3\\ = c_1 \lambda_1^n x_1 + c_2 \lambda_2^n x_2 + c_3 \lambda_3^n x_3\\ = c_1 x_1 - c_2 x_2 + 2^n c_3 x_3. $$ As $2^n$ is very large for large $n$, $A^n x$ is very nearly parallel to $x_3$ unless $c_3 = 0$, which happens only if $x$ lies in the subspace spanned by $x_1$ and $x_2$.
Run using LinearAlgebra
followed by running eigvals(randn(3,3))
a few times.
Explain why a $3\times 3$ real matrix $A$ must have at least one real eigenvalue, and in fact this must be true for any $m \times m$ real matrix if $m$ is ______ (most general answer).
using LinearAlgebra
for i in 1:10
@show eigvals(randn(3,3))
end
# we note that every 3x3 matrix has at least one real eigenvalue
eigvals(randn(3, 3)) = ComplexF64[0.583690292842896 - 0.7398528277680065im, 0.583690292842896 + 0.7398528277680065im, 3.2512357055909313 + 0.0im] eigvals(randn(3, 3)) = [-2.3555910194618894, -0.28654456869938627, 0.3486437560538452] eigvals(randn(3, 3)) = ComplexF64[0.06271271481302623 + 0.0im, 0.1656061698222802 - 0.8172532479114281im, 0.1656061698222802 + 0.8172532479114281im] eigvals(randn(3, 3)) = [-1.009863708024413, -0.5012335078154004, 2.163442912822243] eigvals(randn(3, 3)) = ComplexF64[0.5018300424503404 - 0.8351006870408347im, 0.5018300424503404 + 0.8351006870408347im, 1.3013779446843015 + 0.0im] eigvals(randn(3, 3)) = ComplexF64[-0.6373954660277241 + 0.0im, 0.49400147215166135 - 1.2110357815981505im, 0.49400147215166135 + 1.2110357815981505im] eigvals(randn(3, 3)) = ComplexF64[-1.1660071934518366 + 0.0im, -0.32325499045360695 - 0.9341869177651894im, -0.32325499045360695 + 0.9341869177651894im] eigvals(randn(3, 3)) = ComplexF64[-0.8069374171616182 + 0.0im, 0.7289607501996821 - 0.9533353632496714im, 0.7289607501996821 + 0.9533353632496714im] eigvals(randn(3, 3)) = ComplexF64[-0.7641130405613745 + 0.0im, 0.4996979102123298 - 0.6694713847310743im, 0.4996979102123298 + 0.6694713847310743im] eigvals(randn(3, 3)) = [-1.7638661237424393, -0.8844880298685283, 0.40802454922799114]
Every $m \times m$ real matrix has at least one real eigenvalue if $m$ is odd.
There are multiple ways to see this:
As remarked in class (and as you may remember from high school), real-coefficient polynomials can have complex roots, but they must come in complex-conjugate pairs, and so there must be an even number of complex eigenvalues for a real matrix. If $m$ is odd, there must be at least one leftover real root.
This can be seen in the random examples above: the complex $\lambda$ come in conjugate pairs $\lambda = a+bi$ and $\bar{\lambda} = a-bi$.
You can easily show by simply conjugating the characteristic polynomial $p(\lambda)=\det(A-\lambda I)$ — if $\lambda$ is a root $p(\lambda)=0$, then conjugating gives $\overline{p(\lambda)}=p(\bar{\lambda})=0$, i.e. $\bar{\lambda}$ is also a root since the coefficients of $p$ are real.)
Just by thinking about the asymptotics $\lambda \to \pm \infty$, you can see that odd-degree polynomials $\det(A - \lambda I)$ must have at least one real root:
The leading term $\sim \lambda^m$ goes to $\pm \infty$ (flips sign) as $\lambda \to \pm \infty$ (all other terms are negligible for large $|\lambda|$), so the polynomial must cross the real axis somewhere in between.
Consider the following recurrence: $$ f_n = \frac{f_{n-2} - f_{n-1}}{2} $$
Suppose that we start it with $f_0=0$ and $f_1=1$. Then the first few terms in the sequence are: $$ f_0,f_1,f_2,\ldots = 0, 1, -\frac{1}{2}, \frac{3}{4}, -\frac{5}{8}, \frac{11}{16}, -\frac{21}{32}, \frac{43}{64}, -\frac{85}{128}, \frac{171}{256}, -\frac{341}{512}, \frac{683}{1024}, -\frac{1365}{2048}, \frac{2731}{4096}, \ldots $$
(a) Similar to the Fibonacci sequence from class, we can write this recurrence in matrix form: $$\begin{pmatrix} f_n \\ f_{n-1} \end{pmatrix} = A \begin{pmatrix} f_{n-1} \\ f_{n-2} \end{pmatrix}$$ for what matrix $A$?
(b) Therefore, write a formula for $f_n = \_\_^T A^n \_\_$: fill in the blanks with two column vectors.
(c) Find the eigenvalues of $A$ and corresponding eigenvectors.
(d) From (c), what should the ratio $f_n / f_{n-1}$ approach for large $n$? Check that your prediction matches what the terms in the sequence above appear to be doing.
(e) Give an exact formula for $f_n$, using (b) and writing ____ in the basis of ____.
(a) $\boxed{A = \begin{pmatrix} -\frac{1}{2} & \frac 1 2 \\ 1 & 0 \end{pmatrix}}$.
We have $f_n = \frac{f_{n-2} - f_{n-1}}{2} = -\frac{1}{2} f_{n-1} + \frac{1}{2} f_{n-2}$. And, we also know $f_{n-1} = f_{n-1}$. So, we can write this recurrence in matrix form as: $$ \begin{pmatrix} f_n \\ f_{n-1} \end{pmatrix} = \begin{pmatrix} -\frac{1}{2} f_{n-1} + \frac{1}{2} f_{n-2} \\ f_{n-1} \end{pmatrix} =\underbrace{\begin{pmatrix} -\frac{1}{2} & \frac 1 2 \\ 1 & 0 \end{pmatrix}}_{A} \begin{pmatrix} f_{n-1} \\ f_{n-2} \end{pmatrix}. $$
(b) $\boxed{f_n = \begin{pmatrix} 0 & 1 \end{pmatrix} A^n \begin{pmatrix} 1 \\ 0 \end{pmatrix}}$.
From (a), we know $\begin{pmatrix} f_2 \\ f_1 \end{pmatrix} = A \begin{pmatrix} f_1 \\ f_0 \end{pmatrix}$. If we apply $A^n$ to the vector $\begin{pmatrix} f_1 \\ f_0 \end{pmatrix}$, we get $$ A^n \begin{pmatrix} f_1 \\ f_0 \end{pmatrix} = \begin{pmatrix} f_{n+1} \\ f_{n} \end{pmatrix}. $$ Here, $f_1 = 1, f_0 =0$. As, we need second component of the vector $\begin{pmatrix} f_{n+1} \\ f_{n} \end{pmatrix}$, we can write $f_n = \begin{pmatrix} 0 & 1 \end{pmatrix} A^n \begin{pmatrix} 1 \\ 0 \end{pmatrix}$.
(c) The eigenvalues of $A$ are $\boxed{-1\text{ and }1/2}$. Corresponding eigenvectors are $\boxed{\begin{pmatrix} 1 \\ -1 \end{pmatrix}\text{ and }\begin{pmatrix} 1 \\ 2 \end{pmatrix}}$ respectively.
We find the eigenvalues of $A$ by finding the roots of the characteristic polynomial of $A$: $\text{det}(A - \lambda I) = 0$. Solving, $$ \text{det}\begin{pmatrix} -\frac{1}{2} - \lambda & \frac 1 2 \\ 1 & -\lambda \end{pmatrix} = 0\\ \lambda^2 + \frac{1}{2} \lambda - \frac{1}{2} = 0\\ (\lambda + 1)(\lambda - 1/2) = 0. $$ Hence, the eigenvalues are $-1, 1/2$.
Let us find eigenvectors corresponding to the eigenvalues. For $\lambda_1 = -1$, we have $$ \begin{pmatrix} -\frac{1}{2} & \frac 1 2 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} -x \\ -y \end{pmatrix}. $$ Solving, we get $y = -x$, so $\begin{pmatrix} 1 \\ -1 \end{pmatrix}$ is an eigenvector corresponding to $\lambda = -1$.
For $\lambda_2 = 1/2$, we have $$ \begin{pmatrix} -\frac{1}{2} & \frac 1 2 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} x/2 \\ y/2 \end{pmatrix}. $$ Solving, we get $y = 2x$, so $\begin{pmatrix} 1 \\ 2 \end{pmatrix}$ is an eigenvector corresponding to $\lambda = 1/2$.
(d) The ratio $f_n / f_{n-1}$ approaches $\boxed{-1}$ for large $n$. It matches with the sequence of terms given above: the last three ratios are ≈ -1.0015, -0.99927, and 1.00037, with the terms getting closer and closer to ±2/3.
The eigenvalues are $-1, 1/2$. As shown in 1(c), $A^n x$ becomes almost parallel to $x_\text{max}$, the eigenvector corresponding to the eigenvalue with largest magnitude (if $x$ has any component in direciton of $x_\text{max}$). Then, the ratio between coefficients in consecutive terms is simply the eigenvalue, which is $-1$ in this case.
More explicitly, suppose that we write the initial vector $x = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$ in the basis of the eigenvectors, i.e. $x = c_1 x_1 + c_2 x_2$ for some coefficients $c_1,c_2$. Then $$ \begin{pmatrix} f_{n+1} \\ f_n \end{pmatrix} = A^n x = \lambda_1^n c_1 x_1 + \lambda_2^n c_2 x_2 \approx (-1)^n c_1 x_1, $$ since $\lambda_2^n = (1/2)^n$ becomes negligible for large $n$ compared to $\lambda_1^n = (-1)^n$. We immediately see that increasing $n$ by 1 simply flips the sign of the $x_1$ term.
Alternatively, you could use the fact that $x_1 = \begin{pmatrix} 1 \\ -1 \end{pmatrix}$, so if $\begin{pmatrix} f_{n+1} \\ f_n \end{pmatrix}$ is parallel to this then $f_{n+1}/f_n = 1/-1 = -1$.
(e) $\boxed{f_n = \frac{2}{3}((1/2)^n-(-1)^{n} )}.$ We get this formula by using (b) and writing $\begin{pmatrix} f_1 \\ f_0 \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \end{pmatrix} = x$ in the basis of eigenvectors of $A$.
Similar to the previous part, we write $x$ in the basis of the eigenvectors, i.e. $x = c_1 x_1 + c_2 x_2$ for some coefficients $c_1,c_2$, but this time we solve the $2 \times 2$ linear system for the coefficients $c_1, c_2$. Here, this is simple enough to do by inspection, yielding: $$x = \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \underbrace{\frac{2}{3}}_{c_1} \underbrace{\begin{pmatrix} 1 \\ -1 \end{pmatrix}}_{x_1} + \underbrace{\frac{1}{3}}_{c_2} \underbrace{\begin{pmatrix} 1 \\ 2 \end{pmatrix}}_{x_2}$$ Therefore, we obtain: $$ A^n x = A^n \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \frac{2}{3} A^n \begin{pmatrix} 1 \\ -1 \end{pmatrix} + \frac{1}{3} A^n \begin{pmatrix} 1 \\ 2 \end{pmatrix} \\ = \frac{2}{3} (-1)^n \begin{pmatrix} 1 \\ -1 \end{pmatrix} + \frac{1}{3} \left(\frac{1}{2}\right)^n \begin{pmatrix} 1 \\ 2 \end{pmatrix}$$ and thus $f_n$ is simply the second component of this vector: $$ f_n = \frac{2}{3} (-1)^n (-1) + \frac{1}{3} \left(\frac{1}{2}\right)^n (2) \\ = \frac{2}{3} \left( -(-1)^{n} + \left(\frac{1}{2}\right)^n \right). $$
So, we have an exact formula for $f_n$ in terms of $n$, $$ f_n = \frac{2}{3} \left(\left(\frac{1}{2}\right)^n -(-1)^{n}\right). $$ and we can also easily see that $f_n \approx \pm \frac{2}{3}$ for large $n$.