Linear Algebra and Probability, Spring 2017

Week 1

 1 Mon, 23 Jan Download the Course Syllabus. Homework: Read pp. 3—11, and do Exercises #1—5, 7. 2 Wed, 25 Jan Homework: Finish reading Section 2.0 (but skip all the trigonometric derivations on pp. 14—16). Do problems #4, 5 (using parametric equations), 9—10, 12—16, and 18.Don't forget Ethan's regular Thursday office hour from 11:50—12:50 in the CS lab on the 5th floor of Harney! 3 Fri, 27 Jan Read Section 2.1. Do p. 25, Exercises #1(a)—(c), 2, 3(a)—(c), 4, 5. There will be a Homework Quiz next Wednesday! Feel free to browse last year's course website for sample quizzes, exams, and much, much more!! Answers to selected homework Exercises (starting on p. 13): 10. $\left(\begin{matrix}-2\\5\end{matrix}\right).$ 12. $\left(\begin{matrix}1\\2\end{matrix}\right).$ 13. $45^\circ.$ 14. $135^\circ.$ 15. $\left(\begin{matrix}-3/10\\-1/10\end{matrix}\right).$ 16. $\left(\begin{matrix}1\\2\end{matrix}\right).$ 18. $\sqrt5.$

Week 2

 4 Mon, 1 Feb Answers to yesterday's homework: 1(a). $x'=x,\quad y'=0.$ 1(b). $x'=0,\quad y'=y.$ 1(c). $x'=\dfrac{x-y}2,\quad y'=\dfrac{y-x}2.$ 2. $a'=\dfrac{4a+10b}{29},\quad b'=\dfrac{10a+25b}{29}.$ 3(a). $x'=x,\quad y'=-y.$ 3(b). $x'=-x,\quad y'=y.$ 3(c). $x'=-y,\quad y'=-x.$ 4. $a'=\dfrac{-21a+20b}{29},\quad b'=\dfrac{20a+21b}{29}.$ 5a. $\left[\begin{matrix}0&1\\-1&0\end{matrix}\right].$ 5b. $\left[\begin{matrix}-1&0\\0&-1\end{matrix}\right].$ 5c. $\left[\begin{matrix}1&0\\0&1\end{matrix}\right].$ Here is a link to today's Sage worksheet on affine transformations. Today's homework: Write the following affine transformation using its linear part and its translation, and describe its effect on a unit square: $f\left(\begin{matrix}x\\ y\end{matrix}\right)=\left(\begin{matrix}-2x-2\\y+1\end{matrix}\right).$ Also, rewrite $f$ using matrix notation. Same instructions as #1: $f\left(\begin{matrix}x\\ y\end{matrix}\right)=\left(\begin{matrix}x+1\\-y\end{matrix}\right).$ This is an example of a glide reflection. Google it! Suppose that $A$ is the linear transformation which rotates $90^\circ$ counterclockwise, and that $B$ is the linear transformation which reflects across the $y$-axis. Now start with a unit square (with arrows appropriately drawn). On one figure, first do $A,$ and then do $B$ to this result. On a second figure, first do $B,$ and then do $A$ to this result. You should have obtained different figures. This means that, in general, performing linear transformations is not a commutative operation. A common illustration of this fact is having $A$ be the process of putting on your socks, and $B$ be the process of putting on your shoes. Order matters! However, in some cases, the order doesn't matter. Can you find two linear transformations for which order does not matter? Let $f\left(\begin{matrix}x\\ y\end{matrix}\right)=\left(\begin{matrix}x/2+1/2\\ y/2\end{matrix}\right)$ and $g\left(\begin{matrix}x\\ y\end{matrix}\right)=\left(\begin{matrix}-y/2+1\\ x/2\end{matrix}\right).$ Describe the effect of each of these transformations. You should have found that they both transform the unit square to the same position, that the square is oriented differently (the arrows are in different places). This is a significant difference, as we will see later. Let $f\left(\begin{matrix}x\\ y\end{matrix}\right)=\left(\begin{matrix}-x\\y\end{matrix}\right)$ and $g\left(\begin{matrix}x\\ y\end{matrix}\right)=\left(\begin{matrix}y\\x\end{matrix}\right).$ Look up the concept of function composition, which you likely learned sometime before, but maybe forgot. Evaluate $f\circ g\left(\begin{matrix}x\\ y\end{matrix}\right)$ and $g\circ f\left(\begin{matrix}x\\ y\end{matrix}\right).$ 5 Wed, 1 Feb Answers to yesterday's HW (questions involving formulas): 1. $f\left(\begin{matrix}x\\ y\end{matrix}\right)=\left[\begin{matrix}-2&0\\0&1\end{matrix}\right]\left(\begin{matrix}x\\ y\end{matrix}\right)+\left(\begin{matrix}-2\\ 1\end{matrix}\right).$ 2. $f\left(\begin{matrix}x\\ y\end{matrix}\right)=\left[\begin{matrix}1&0\\0&-1\end{matrix}\right]\left(\begin{matrix}x\\ y\end{matrix}\right)+\left(\begin{matrix}1\\ 0\end{matrix}\right).$ 6. $f\circ g\left(\begin{matrix}x\\ y\end{matrix}\right)=\left(\begin{matrix}-y\\ x\end{matrix}\right)$ and $g\circ f\left(\begin{matrix}x\\ y\end{matrix}\right)=\left(\begin{matrix}y\\ -x\end{matrix}\right).$ Today's homework: Write the affine transformation which first rotates by $180^\circ,$ and then moves to the right $3$ units and down $2$ units. Write the linear transformation which first scales the $x$ by a factor of $2,$ then scales the $y$ by a factor of $3,$ and then rotates $90^\circ$ clockwise. Order matters! (Hint: Use function composition, which is really the same thing as matrix multiplication.) (Trickier!) Write the affine transformation which moves to the right $2$ units, then reflects about the $y$-axis, and then moves to the right $1$ unit. Look at this fractal of the P-pentomino, one of my favorite fractal images. What affine transformations would you use to create this fractal? Thinking about this will greatly help you with the writing project! Visit the Sage page with fractals generated by affine transformations. Note: To change any of these fractals, you will need to sign up for a free account and copy the page to a new project of your own. To execute a function, put your cursor somewhere in the middle of it and then hit Shift+Enter (in other words, hit Enter while you are already holding down the Shift key). Here is a helpful summary of affine transformations. 6 Fri, 3 Feb Answers to yesterday's homework: 1. $f\left(\begin{matrix}x\\ y\end{matrix}\right)=\left[\begin{matrix}-1&0\\0&-1\end{matrix}\right]\left(\begin{matrix}x\\ y\end{matrix}\right)+\left(\begin{matrix}3\\ -2\end{matrix}\right).$ 2. $\left[\begin{matrix}0&3\\-2&0\end{matrix}\right].$ 3. $f\left(\begin{matrix}x\\ y\end{matrix}\right)=\left[\begin{matrix}-1&0\\0&1\end{matrix}\right]\left(\begin{matrix}x\\ y\end{matrix}\right)+\left(\begin{matrix}-1\\ 0\end{matrix}\right).$ Download the prompt for your fractal project. To help with this project, you may download the $\LaTeX$ code (and the fractal image in the document) which produced the template. Then download $\LaTeX$ on your computer, go to www.sharelatex.com, or simply create a $\LaTeX$ document in the Sage environment. Also, there are some resources at Art of Problem Solving under the Resources menu. This is not a long assignment in terms of the number of pages, but there's a lot to learn to complete the assignment (which is why you have until the 17th). Feel free to use and adapt the code on my Sage worksheet — but you should know that you cannot earn an A just by changing the numbers in my code. In order to earn an A, I must see you either use some significant features of Sage in a way not illustrated in the worksheet, or include significantly different Python code within your worksheet. Homework: Section 2.3: Read up to p. 44; #3, 4, 8, 9; Section 2.5: Read all; #1, 2(i)-(ii).

Week 3

 7 Mon, 6 Feb Partial solutions to HW: Section 2.3. #3. $PR=\left[\begin{matrix}0&-1\\0&0\end{matrix}\right].$ $RP=\left[\begin{matrix}0&0\\1&0\end{matrix}\right].$ #4(a). $\left[\begin{matrix}1&0\\0&0\end{matrix}\right].$ (b). $\left[\begin{matrix}0&0\\0&0\end{matrix}\right].$ (c). $\left[\begin{matrix}19&22\\43&50\end{matrix}\right].$ #8. See 4(b). Partial solutions to HW: Section 2.5. #1. $\left[\begin{matrix}-1&11\\-3&23\end{matrix}\right].$ Homework problems (assume the cube has as vertices all combinations of $(\pm1,\pm1,\pm1)$ as in class today): You are holding the cube by the opposite corners $(1,1,1)$ and $(-1,-1,-1)$. You spin it one-third the way around, then one-third again, and the third time you're back to where you started. What $3\times3$ matrices describe these rotations? You are holding the cube by the midpoint of the edge with endpoints $(1,1,1)$ and $(1,-1,1)$, and by the midpoint of the opposite edge. You spin the cube $180^\circ$ around the axis through these two midpoints. What matrix describes this rotation? Imagine the cube as drawn in class. Let $A$ be the matrix describing the rotation bringing the top toward you $90^\circ$ (the axis of rotation is the $y$-axis here). Let $B$ be the matrix describing the rotation which turns the cube $90^\circ$ to your right (the axis of rotation is the $x$-axis). By sheer force of imagination, write the matrix describing what happens when the rotation $B$ is done first, and then the rotation $A$ is performed. Then, compute the matrix product $AB$ to see that your answer is correct. What rotation corresponds to the matrix $\left[\begin{matrix}0&-1&0\cr 0&0&1\cr -1&0&0\end{matrix}\right]$? Hey, wait minute! You've been writing out tons of matrices, and they all seem to have two zeroes in each row and column — and the other element is either $1$ or $-1.$ Surely this is no concidence? Explain why this is so by giving a geometrical interpretation of the effect of these matrices on the cube. How many direct symmetries of the cube are there? How many opposite symmetries? Why? How many direct symmetries of the hypercube are there? Opposite symmetries? Don't forget the HW quiz Wednesday! 8 Wed, 8 Feb Write out all 24 matrices describing the direct symmetries of the cube. Annotate each one with an appropriate picture of a die! Partial homework answers: 1. $\left[\begin{matrix}0&1&0\cr 0&0&1\cr 1&0&0\end{matrix}\right],$ $\left[\begin{matrix}0&0&1\cr 1&0&0\cr 0&1&0\end{matrix}\right],$ and $\left[\begin{matrix}1&0&0\cr 0&1&0\cr 0&0&1\end{matrix}\right].$ 2. $\left[\begin{matrix}0&0&1\cr 0&-1&0\cr 1&0&0\end{matrix}\right].$ 9 Fri, 10 Feb Download solutions to Homework Quiz 1. Download a blank copy of Homework Quiz 1. Download a helpful list of rotation matrices in three dimensions. WORK ON YOUR PROJECT!!!! There will be NO EXTENSIONS GIVEN.

Week 4

 10 Wed, 17 Feb Homework: Read Chapter 3.0 (up to p. 106). Find the angle between $\left(\begin{matrix}1\\ -1\\0 \end{matrix}\right)$ and $\left(\begin{matrix}2\\ 1\\-1\end{matrix}\right).$ Find the projection of $\left(\begin{matrix}-3\\ 1\\4\end{matrix}\right)$ onto the vector $\left(\begin{matrix}1\\ 2\\-2\end{matrix}\right).$ Find the projection of $\left(\begin{matrix}-3\\ 1\\4\end{matrix}\right)$ onto the plane $-2x+y-4z=0.$ Find the distance from the point $\left(\begin{matrix}2\\ 0\\3\end{matrix}\right)$ to the plane $-2x+y-4z=0.$ Find the distance from the point $\left(\begin{matrix}-2\\ 4\\3\end{matrix}\right)$ to the line through the origin parallel to $\left(\begin{matrix}4\\ 0\\-3 \end{matrix}\right).$ Change in Tuesday Office Hours (due to a department meeting): 10:30—11:30. This will only happen once a month. And don't forget that your projects are due Friday!!!!! In light of this fact, I have decided that there is no homework quiz this week! 11 Fri, 19 Feb Homework answers: No answer needed.... To two decimal places, the angle is $73.22^\circ.$ $\left(\begin{matrix}-1\\ -2\\2 \end{matrix}\right).$ $\left(\begin{matrix}-27/7\\ 10/7\\16/7 \end{matrix}\right).$ $16/\sqrt{21}.$ $2\sqrt{109}/5.$ Here are the Homework problems on the cross product due Friday. Your assignment is #9, 11, 29, 31, 35, 44, 46, and 47. Don't forget Ethan's office hour tomorrow in the 5th floor lab at 11:40 if you need help with your project due Friday! Additional note for your projects: each choice of random number should have exactly one transformation associated with it. Otherwise, you are not using the correct algorithm! Also, please upload the link to your Sage document on Canvas. I just created an assignment for this! Remember, if you need to email me, DO NOT send a Canvas email, as I do not read it! 12 Fri, 17 Feb Download solutions to the Homework Quiz 2. Answers to cross product questions: #9(a). $\left(\begin{matrix}17\\ -33\\-10 \end{matrix}\right)$ (b). $\left(\begin{matrix}-17\\ 33\\10 \end{matrix}\right)$ (c). $\left(\begin{matrix}0\\ 0\\0 \end{matrix}\right)$ #11. $\left(\begin{matrix}-1\\ -1\\-1 \end{matrix}\right)$ #29. $6\sqrt5$ #31. $2\sqrt{83}$ #35. $\dfrac{\sqrt{16742}}2$ #44. $0$ #46. $-72$ #47. $75$ The only homework is to start studying for your exam next Friday! Bring questions to the in-class review on Wednesday, and visit Ethan on Thursday at 11:40 in the 5th floor computer lab. Remember: Upload a link to your Sage worksheet on Canvas! You must do this even if you have already emailed me your link! You have until midnight tonight if you have not already done so. Additional practice problems for the Midterm: Find both parametric and symmetric equations for the line through the points $\left(\begin{matrix}0\\ 3\\-1 \end{matrix}\right)$ and $\left(\begin{matrix}2\\ 4\\3 \end{matrix}\right).$ Find symmetric equations for the line through the points $\left(\begin{matrix}0\\ 3\\-1 \end{matrix}\right)$ and $\left(\begin{matrix}2\\ 3\\3 \end{matrix}\right).$ Find an equation of the plane with normal $\left(\begin{matrix}-6\\ 3\\1 \end{matrix}\right)$ which passes through the point $\left(\begin{matrix}2\\ 0\\3 \end{matrix}\right).$ Find an equation for the plane passing through $\left(\begin{matrix}4\\ 1\\0 \end{matrix}\right),$ $\left(\begin{matrix}3\\ 0\\1 \end{matrix}\right),$ and $\left(\begin{matrix}-1\\ -5\\3 \end{matrix}\right).$ Answers: Parametric equations — there are several correct answers, here is one: $x=2t,$ $y=3+t,$ $z=-1+4t.$ Symmetric equations: $\dfrac x2=y-3=\dfrac{z+1}4.$ $\dfrac x2=\dfrac{z+1}4, \quad y=3.$ $-6x+3y+z=-9.$ $3x-2y+z=10.$

Week 5

 13 Wed, 22 Feb Just study for your Midterm on Friday! Remember, no notes or calculator are allowed, but you may bring your die with you. Remember also that Ethan is available Thursday at 11:40 in the 5th floor lab to answer questions! 14 Fri, 24 Feb First Exam

Week 6

 15 Mon, 27 Feb Homework: Chapter 2.4, #1—3 and 7—11. Download a blank copy of the first Midterm. Download solutions to the first Midterm. 16 Wed, 1 Mar Homework answers: 1) $R_{-3\pi/4},$ or equivalently, $R_{5\pi/4}.$ 2) $\left[\begin{matrix}1/2 & 0\\0& 1/5\end{matrix}\right]$ 3) $\left[\begin{matrix}1/2 & -1/10\\0& 1/5\end{matrix}\right]$ 7a) The only solution is $(x,y)=(0,0).$ 7b) $\{(x,-2x)\,|\,x\in{\mathbb R}\}.$ 8a) $(x,y)=(2/5,1/5).$ 8b) No solution — $\{\}$ or $\emptyset.$ 9) $\{(x,1-2x)\,|\,x\in{\mathbb R}\}.$ 10) $\{(x,10-x)\,|\,x\in\mathbb R\}.$ 11) The system has a solution (in fact, infinitely many solutions) only when $v=5u.$ Homework: #2 on p. 76. Take out your die and find all eigenvalues and eigenvectors for the four matrices listed on Day 8 (8 Feb). You should be able to do this geometrically with your knowledge of three-dimensional coordinates! Find all eigenvalues and eigenvectors of $\left[\begin{matrix}1&2\\5&4\end{matrix}\right].$ 17 Fri, 3 Mar HW answers: 2a) $\lambda=-1,$ all nonzero vectors are eigenvectors. 2b) $\lambda=1,$ all nonzero vectors are eigenvectors. 2c) $\lambda=0,$ all nonzero vectors are eigenvectors. First matrix: $\lambda=1,$ eigenvectors lie on the line along $\left(\begin{matrix}1\\ 1\\1 \end{matrix}\right).$ Second matrix: $\lambda=1,$ eigenvectors lie on the line along $\left(\begin{matrix}1\\ 1\\1 \end{matrix}\right).$ Third matrix: $\lambda=1,$ all nonzero vectors are eigenvectors. Fourth matrix: $\lambda=1,$ eigenvectors lie on the line along $\left(\begin{matrix}1\\ 0\\1 \end{matrix}\right).$ Eigenvalues and eigenvectors of $\left[\begin{matrix}1&2\\5&4\end{matrix}\right]:$ Eigenvalue $\lambda=6$ with eigenvector $\left(\begin{matrix}2\\5\end{matrix}\right);$ eigenvalue $\lambda=-1$ with eigenvector $\left(\begin{matrix}1\\-1\end{matrix}\right).$ Download the demo movie we discussed in class today. You will be making a similar movie for your project. The prompt is essentially like the prompt for the first project: create a movie morphing one fractal into another. You can add more transformations, change background colors, represent different transformations with different colors, etc. If all you do is change the numbers in my code, you will NOT earn a passing grade! I need to see that you've put some thought into the project! This project is due Monday, April 10. This is the Monday after the second Midterm, so plan ahead! It's not a good idea to wait until the last minute (like with the last project). You should be able to find ample time around your CS projects to get this done. Download the complete prompt ($\LaTeX$ code). Homework from Chapter 2.6: #3(a)(c)(d), #8(c)(d), #9, #10.

Week 7

 18 Mon, 6 Mar HW answers: #3(a). $(\lambda-r)^2=0$ #3(c). $\lambda^2-1=0$ #3(d). $\lambda^2-1=0$ #8(c). Eigenvalue $\lambda=p$ with eigenvector $\left(\begin{matrix}1\\0\end{matrix}\right);$ eigenvalue $\lambda=q$ with eigenvector $\left(\begin{matrix}0\\1\end{matrix}\right).$ #8(d). Eigenvalue $\lambda=0$ with eigenvector $\left(\begin{matrix}1\\0\end{matrix}\right).$ Eigenvalues and eigenvectors of $\left[\begin{matrix}1&2\\5&4\end{matrix}\right]:$ Eigenvalue $\lambda=6$ with eigenvector $\left(\begin{matrix}2\\5\end{matrix}\right);$ eigenvalue $\lambda=-1$ with eigenvector $\left(\begin{matrix}1\\-1\end{matrix}\right).$ Homework: Chapter 3.6 (p. 170), #8 (assume here that $b\ne0$). Also, find the eigenvalues and eigenvectors of the matrices $\left[\begin{matrix}2&0&0\\0&3&4\\0&4&9\end{matrix}\right]$ (thanks, Wikipedia!) and $\left[\begin{matrix}1&2&-2\\2&1&-2\\2&2&-3\end{matrix}\right]$. Homework Quiz moved to Friday!!! 19 Wed, 8 Mar Partial answers to the homework: 8(iii): The plane is $z=0.$ First matrix problem: The three eigenvalues are $2,$ $1,$ and $11.$ Corresponding eigenvectors are $\left(\begin{matrix}1\\0\\0\end{matrix}\right),$ $\left(\begin{matrix}0\\2\\-1\end{matrix}\right),$ and $\left(\begin{matrix}0\\1\\2\end{matrix}\right).$ Second matrix problem: $\lambda=-1,$ with corresponding eigenvectors $\left(\begin{matrix}0\\1\\1\end{matrix}\right)$ and $\left(\begin{matrix}1\\0\\1\end{matrix}\right).$ $\lambda=1,$ with corresponding eigenvector $\left(\begin{matrix}1\\1\\1\end{matrix}\right).$ No homework except to study for Friday's quiz. 20 Fri, 10 Mar Have a great Spring Break!

Week 8

 21 Mon, 20 Mar Homework: Page 89, Exercises #2, 4, 5, 6. REMINDER: Office Hours ONLY from 10:40—11:40 tomorrow due to a department meeting! 22 Wed, 22 Mar Download solutions to Homework Quiz 3. Homework answers: #2. $D=\left[\begin{matrix}-\sqrt{10}&0\\0&\sqrt{10}\end{matrix}\right],$ $P=\left[\begin{matrix}\dfrac{1-\sqrt{10}}3&\dfrac{1+\sqrt{10}}3\\1&1\end{matrix}\right]$ #4. $\left[\begin{matrix}128&128\\128&128\end{matrix}\right]$ #5. $\left[\begin{matrix}729&0\\2660&64\end{matrix}\right]$ Homework: p. 131, #19 (note typo: last matrix in (a) should have 1's along the diagonal); p. 143, #20—22. Also, solve the following recurrence relation like we did Monday in class: $a_{n+2}=5a_{n+1}-6a_n,$ $a_0=0,$ $a_1=1.$ Homework answers: #19(a): $\left[\begin{matrix}4&0&0\\4s&5&0\\0&6t&6\end{matrix}\right]$ #19(b): $\left[\begin{matrix}0&0&2\\0&0&0\\0&-2&0\end{matrix}\right]$ Recurrence relation: $a_n=3^n-2^n.$ 23 Fri, 24 Mar #1. Solve the system of equations by finding the LDU decomposition, and then $A^{-1}:$ $7x+y=-2,$ $y-3x=8.$ #2. Solve the system of equations by finding the LDU decomposition, and then $A^{-1}:$ $8x-6y=16,$ $3x+2y=23.$ Don't forget the HW quiz next Wednesday! Additional practice with recurrence relations: $a_{n+2}=4a_{n+1}-3a_{n}$, $a_0=1,$ $a_1=5.$

Week 9

 24 Mon, 27 Mar Homework answers: #1. $L,$ $D,$ $U,$ and $A^{-1}$ are: $\left[\begin{matrix}1&0\\-3/7&1\end{matrix}\right],$ $\left[\begin{matrix}7&0\\0&10/7\end{matrix}\right],$ $\left[\begin{matrix}1&1/7\\0&1\end{matrix}\right],$ and $\left[\begin{matrix}1/10&-1/10\\3/10&7/10\end{matrix}\right].$ $(x,y)=(-1,5).$ #2. $L,$ $D,$ $U,$ and $A^{-1}$ are: $\left[\begin{matrix}1&0\\3/8&1\end{matrix}\right],$ $\left[\begin{matrix}8&0\\0&17/4\end{matrix}\right],$ $\left[\begin{matrix}1&-3/4\\0&1\end{matrix}\right],$ and $\left[\begin{matrix}1/17&3/17\\-3/34&4/17\end{matrix}\right].$ $(x,y)=(5,4).$ Homework: #1. Show that the eigenvectors of $\left[\begin{matrix}1&4\\4&7\end{matrix}\right]$ are orthogonal. #2. Show that the eigenvectors of $\left[\begin{matrix}-3&12\\12&7\end{matrix}\right]$ are orthogonal. REMINDER: The Final Exam for the 9:15 section is on Wednesday, May 17 from 10:00—1:00 in CO 313. The Final Exam for the 10:30 section is on Monday, May 15 from 10:00—1:00 in CO 313. You must take the exam in the time slot for your assigned section. Written permission from the Dean is required to change the time of your Final Exam.