# HW #9, due 3:50pm Friday, April 20

Note: Webwork sets for 6.1 and 6.2 are also due on April 20.

# 5.4

6. (A linear transformation of polynomials)

30. (Find the B-matrix of a transformation.)

Note that to invert an nxn matrix P, you can augment it with the nxn identity matrix, get the reduced row echelon form of that, and your inverse is the last n columns. For example if P is 3x3:

Pinv = rre( augmented( P, eye(3) ) )[:,3:]
# Note to self: Maybe I should add a function inverse() to the mth309 module.


32. (Find a diagonalizing matrix.)

Help for this:

from mth309 import *
from numpy import *

A = Matrix([[15,-66,-44, ...

vals = linalg.eigvals(array(A,dtype=float))
vals


If the eigevalues happen to be integers, you can use the function nullbasis() in mth309.py to find a basis for the eigenspace corresponding to each eigenvalue (i.e. a basis for the nullspace of A − λI):

If 7 were an eigenvalue of A (it isn't!), then do

I = Matrix(eye(4))

N7 = nullbasis( A - 7*I )


You can then stack all your nullspace bases together using hstack:

P = Matrix(hstack([N7,...]))
P


You should check that

dot(Pinv,dot(A,P))


is diagonal.

## 5.5 Complex eigenvalues

4. and 6. (Eigenvalues and eigenvectors of a 2x2 matrix.)

8. (2x2 matrices that already are just rotation and scaling: what's the angle and the scaling.)

## 5.6 Discrete dynamical systems

2. (Solution and asymptotics of 3D linear dynamical system.)

6. (Owls and rats. See the note above Ex. 3.)

10, 12, 14. (Attractor, repellor, saddle?) You are welcome to use Python or any other tool to find the eigendata.

## 6.1 Inner product, length, and orthogonality

2, 4, 6, 8. (Compute some dot products, length, etc.)

20. (True or False.)

28. (If y orthogonal to u and v, show it's orthogonal to all vectors in span(u,v).)