Your second Sage assignment consists of the following tasks:
- Watch Project 2 Sage video. Note: In the video I use RR for the field. In what follows you should use QQ instead.
- Create the span of the vectors $\mathbf{u}=(2,3,1,1,7,3)$ and $\mathbf{v}=(4,1,2,3,5,7)$ over the field QQ (rational numbers instead of RR, real numbers).
- Find 2 vectors that are in the span of $\mathbf{u}$ and $\mathbf{v}$. Check your work in Sage.
- Find 2 vectors that are in $\mathbb{R}^6$ but are not in the span of $\mathbf{u}$ and $\mathbf{v}$.
- Use Sage to find 2 vectors whose span is the same as the span of $(2,3,2,4), (3,1,4,8), (4,-1,6,12)$, and $(2,-.5,3,6)$
- Use sage to plot the following planes (given implicitly) on the same axes:
- x+2y-z=3 (in yellow)
- -4x+y+z=0 (in green)
- What is the intersection of these two planes according to the picture?
- Plot the three lines: $x+y=3, x-y=0, x+5y=1$
- Based on the pictures above, do you think there will be a solution to this system of equations? Why?
- Define a procedure called projection(u,v) that returns the projection of $\mathbf{u}$ on to $\mathbf{v}$ (i.e. that computes $\mbox{proj}_\mathbf{v}\mathbf{u}$)
- Use your projection function to find 3 projections of your choosing, each in a different dimension.
- What happens if you evaluate projection(u,0)? Is this a problem?
- Define a procedure called angle(u,v) that will calculate the angle between two vectors (any vectors).
- For the projections you computed above, find the angle between the vectors (so there should be 3).
- Create the following matrix (using QQ for coefficients)
Then, follow the procedures from class (outlined in 1.4) to find the reduced row echelon form for this matrix using only the three elementary row operations described in the video.
(the old post had the following matrix, but the previous one is better to start with, so disregard this matrix:
(2))