## Announcements:

Today we finish Section 4.2, discuss Appendix D and start Section 4.3. Continue reading Section 4.3 and Appendix D for next class. We'll also learn how Google ranks page next class. Work through recommended homework questions.

Help Centers: Monday-Friday 2:30-6:30 in MC 106.

### Review Questions

True/false: $\det(A B) = (\det A)(\det B)$.

True/false: $\det(A+B) = \det A + \det B$.

Question: $\det (3 I_2) = \query{3^2 \det I_2 = 3^2 = 9}$

Question: $\bdmat{rrr} 0 & 0 & a \\ 0 & b & c \\ d & e & f \edmat = \query{-\bdmat{rrr} d & e & f \\ 0 & b & c \\ 0 & 0 & a \edmat = -abd \qtext{(not triangular!)}}$

### Partial review of last class: Cofactors and Cramer's Rule

For an $n \times n$ matrix $A$, write $A_{ij}$ for the matrix obtained from $A$ by deleting the $i$th row and the $j$th column. Then $\det A_{ij}$ is called the $(i,j)$-minor of $A$, and $$C_{ij} = (-1)^{i+j} \det A_{ij} .$$ is called the $(i,j)$-cofactor of $A$.

Notation: If $A$ is an $n \times n$ matrix and $\vb \in \R^n$, we write $A_i(\vb)$ for the matrix obtained from $A$ by replacing the $i$th column with the vector $\vb$: $$A_i(\vb) = [ \va_1 \cdots \va_{i-1} \, \vb \,\, \va_{i+1} \cdots \va_n \,]$$

Theorem 4.11: Let $A$ be an invertible $n \times n$ matrix and let $\vb$ be in $\R^n$. Then the unique solution $\vx$ of the system $A \vx = \vb$ has components $$x_i = \frac{\det(A_i(\vb))}{\det A},\quad \text{for } i = 1, \ldots, n$$

### New material: Matrix Inverse using the Adjoint

Suppose $A$ is invertible. We'll use Cramer's rule to find a formula for $X = A^{-1}$. We know that $AX = I$, so the $j$th column of $X$ satisfies $A \vx_j = \ve_j$. By Cramer's Rule, $$x_{ij} = \frac{\det(A_i(\ve_j))}{\det A}$$ By expanding along the $i$th column, we see that $$\det(A_i(\ve_j)) = C_{ji}$$ So $$x_{ij} = \frac{1}{\det A} C_{ji},\qtext{i.e.,} X = \frac{1}{\det A} [C_{ij}]^T$$ The matrix $$\kern-5ex \adj A := [C_{ji}] = [C_{ij}]^T = \bmat{cccc} C_{11} & C_{21} & \cdots & C_{n1} \\ C_{12} & C_{22} & \cdots & C_{n2} \\ \vdots & \vdots & \ddots & \vdots \\ C_{1n} & C_{2n} & \cdots & C_{nn} \emat$$ is called the adjoint of $A$.

Theorem 4.12: If $A$ is an invertible matrix, then $$A^{-1} = \frac{1}{\det A} \adj A$$

Example: If $A = \bmat{rr} a & b \\ c & d \emat$, then the cofactors are \begin{aligned} C_{11} &= + \det [d] = +d & C_{12} &= - \det [c] = -c \\ C_{21} &= - \det [b] = -b & C_{22} &= + \det [a] = +a \\ \end{aligned} so the adjoint matrix is $$\adj A = \bmat{rr} d & -b \\ -c & a \emat$$ and $$A^{-1} = \frac{1}{\det A} \adj A = \frac{1}{\det A} \bmat{rr} d & -b \\ -c & a \emat$$ as we saw before.

See Example 4.17 in the text for a $3 \times 3$ example. This is not generally a good computational approach. It's importance is theoretical.

### Appendix D: Polynomials

You should read this Appendix yourself. I will cover it briefly.

A polynomial is a function $p$ of a single variable $x$ that can be written in the form $$p(x) = a_0 + a_1 x + a_2 x^2 + \cdots + a_n x^n$$ where the coefficients $a_i$ are constants. The highest power of $x$ appearing with a non-zero coefficient is called the degree of $p$.

Examples: $2 - 0.5 x + \sqrt{2} x^3$, $\ \ln \left(\Large\frac{e^{5x^3}}{e^{3x}}\right) = \query{\ln(e^{5x^3-3x}) = 5x^3-3x}$

Non-examples: $\sqrt{x}$, $\ 1/x$, $\ \cos(x)$, $\ \ln(x)$.

(The text gives more examples, non-examples and explanations.)

Addition of polynomials is easy: $$(1 + 2x - 4x^3) + (3 - 3x^2 + 6x^3) = 4 + 2x -3x^2+2x^3$$

To multiply polynomials, you use the distributive law and collect terms: \kern-4ex \begin{aligned} (x + 3)(1 + 2x + 4x^2) &= x ( 1 + 2x + 4x^2) + 3 ( 1 + 2x + 4x^2) \\ &= x + 2x^2 + 4x^3 + 3 + 6x + 12x^2 \\ &= 3 + 7x + 14x^2 + 4x^3 \end{aligned} Note that $\deg(f(x)g(x)) = \deg(f(x)) + \deg(g(x))$.

If $f$ and $g$ are polynomials, sometimes you can find a polynomial $q$ such that $f(x) = g(x) q(x)$, and sometimes you can't. If you can, then we say that $g$ is a factor of $f$.

Example: Is $(x-2)$ a factor of $x^2 - x - 2$?

Solution: If it is, then the quotient has degree 1. So suppose $x^2 - x - 2 = (x-2)(ax+b)$. Then $ax^2 = x^2$, so $a=1$. And $-x = -2ax+bx = -2x+bx$, so $b=1$. Check the constant term: $-2 = -2b$. It works, so $x^2 - x - 2 = (x-2)(x+1)$, and the answer is "yes".

Example: Is $(x-2)$ a factor of $x^2 + x - 2$?

Solution: If it is, then the quotient has degree 1. So suppose $x^2 + x - 2 = (x-2)(ax+b)$. Then $ax^2 = x^2$, so $a=1$. And $x = -2ax+bx = -2x+bx$, so $b=3$. Check the constant term: $-2 = -2b$. Nope, so the answer is "no".

The above ad hoc method works for a degree 1 polynomial. For higher degrees, one can use long division (see Example D.4). But the degree 1 case will be most important to us, and is made even simpler by the following result:

Theorem D.2 (The Factor Theorem): Let $f$ be a polynomial and let $a$ be a constant. Then $f(a) = 0$ if and only if $x - a$ is a factor of $f(x)$.

When $f(a) = 0$, we say that $a$ is a zero of $f$ or a root of $f$.

It is clear that if $f(x) = (x - a) q(x)$, then $f(a) = 0$. The book explains the other direction.

Once you find a zero, you can use the ad hoc method shown above to find the other factor $q$. We'll see more examples soon.

Our interest will be in finding all zeros of a polynomial $f$ of degree $n$. By the above, if you find a zero $a$, then $f(x) = (x-a) q(x)$, where $q$ has degree $n-1$. If there is another root $b$ of $f$, it must be a root of $q$, and so $q$ will factor as $q(x) = (x-b) r(x)$, where $r$ has degree $n-2$. Since the degrees are going down by one, there can be at most $n$ distinct roots in total:

Theorem D.4 (The Fundamental Theorem of Algebra): A polynomial of degree $n$ has at most $n$ distinct roots.

### Section 4.3: Eigenvalues and Eigenvectors

Recall from Section 4.1:

Definition: Let $A$ be an $n \times n$ matrix. A scalar $\lambda$ (lambda) is called an eigenvalue of $A$ if there is a nonzero vector $\vx$ such that $A \vx = \lambda \vx$. Such a vector $\vx$ is called an eigenvector of $A$ corresponding to $\lambda$.

The eigenvectors for a given eigenvalue $\lambda$ are the nonzero solutions to $(A - \lambda I) \vx = \vec 0$.

Definition: The collection of all solutions to $(A - \lambda I) \vx = \vec 0$ is a subspace called the eigenspace of $\lambda$ and is denoted $E_\lambda$. In other words, $$E_\lambda = \null(A - \lambda I) .$$ It consists of the eigenvectors plus the zero vector.

By the fundamental theorem of invertible matrices, $A - \lambda I$ has a nontrivial null space if and only if it is not invertible, and we now know that this is the case if and only if $\det (A - \lambda I) = 0$.

The expression $\det (A - \lambda I)$ is always a polynomial in $\lambda$. For example, when $A = \bmat{rr} a & b \\ c & d \emat$, \kern-8ex \begin{aligned} \det(A- \lambda I) &= \bdmat{cc} a-\lambda & b \\ c & d-\lambda \edmat = (a - \lambda)(d-\lambda) - bc \\ &= \lambda^2 - (a+d)\lambda + (ad - bc) \end{aligned} If $A$ is $3 \times 3$, then $\det(A - \lambda I)$ is equal to $$\kern-8ex (a_{11} - \lambda) \bdmat{cc} a_{22} - \lambda\! & a_{23} \\ a_{32} & \!a_{33} - \lambda \edmat - a_{12} \bdmat{cc} a_{21} & a_{23} \\ a_{31} & \!a_{33} - \lambda \edmat + a_{13} \bdmat{cc} a_{21} & \!a_{22} -\lambda \\ a_{31} & a_{32} \edmat$$ which is a degree 3 polynomial in $\lambda$.

Similarly, if $A$ is $n \times n$, $\det (A - \lambda I)$ will be a degree $n$ polynomial in $\lambda$. It is called the characteristic polynomial of $A$, and $\det (A - \lambda I) = 0$ is called the characteristic equation.

Finding eigenvalues and eigenspaces: Let $A$ be an $n \times n$ matrix.

1. Compute the characteristic polynomial $\det(A - \lambda I)$.
2. Find the eigenvalues of $A$ by solving the characteristic equation $\det(A - \lambda I) = 0$.
3. For each eigenvalue $\lambda$, find a basis for $E_\lambda = \null (A - \lambda I)$ by solving the system $(A - \lambda I) \vx = \vec 0$.

So we need to get good at solving polynomial equations. Solutions are called zeros or roots. We saw above that a degree $n$ polynomial has at most $n$ distinct roots. Therefore:

Theorem: An $n \times n$ matrix $A$ has at most $n$ distinct eigenvalues.

Example 4.18: Find the eigenvalues and eigenspaces of $A = \bmat{rrr} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 2 & -5 & 4 \emat$.

Solution: 1. On board, compute the characteristic polynomial: $$\det (A - \lambda I) = - \lambda^3 + 4 \lambda^2 - 5 \lambda + 2$$ 2. To find the roots, it is often worth trying a few small integers to start. We see that $\lambda = 1$ works. So by the factor theorem, we know $\lambda - 1$ is a factor: $$- \lambda^3 + 4 \lambda^2 - 5 \lambda + 2 = (\lambda - 1)(\query{-} \lambda^2 + \query{3} \lambda \toggle{+ \text{?}}{-2}\endtoggle)$$ Now we need to find roots of $-\lambda^2 + 3 \lambda - 2$. Again, $\lambda = 1$ works, and this factors as $-(\lambda - 1)(\lambda - 2)$. So $$\kern-4ex \det (A - \lambda I) = - \lambda^3 + 4 \lambda^2 - 5 \lambda + 2 = - (\lambda - 1)^2 (\lambda - 2)$$ and the roots are $\lambda = 1$ and $\lambda = 2$.

3. To find the $\lambda = 1$ eigenspace, we do row reduction: $$\kern-8ex [A - I \mid 0\,] = \bmat{rrr|r} -1 & 1 & 0 & 0 \\ 0 & -1 & 1 & 0 \\ 2 & -5 & 3 & 0 \emat \lra{} \bmat{rrr|r} 1 & 0 & -1 & 0 \\ 0 & 1 & -1 & 0 \\ 0 & 0 & 0 & 0 \emat$$ We find that $x_3 = t$ is free and $x_1 = x_2 = x_3$, so $$E_1 = \left\{ \colll t t t \right\} = \span \left( \colll 1 1 1 \right)$$ So $\colll 1 1 1$ is a basis of the eigenspace corresponding to $\lambda = 1$. Check!

Finding a basis for $E_2$ is similar; see text.