\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{enumerate}
\usepackage{ifthen}
\usepackage{ulem} % for strikethrough \sout{...} command
\usepackage{color}
\setlength{\oddsidemargin}{-0.5in}
\setlength{\evensidemargin}{-0.5in}
\setlength{\topmargin}{-0.5in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\topskip}{0.0in}
\setlength{\textheight}{9.75in}
\setlength{\textwidth}{7.5in}


\usepackage{tikz,pgfplots}
\usepgfplotslibrary{fillbetween}


\newcommand{\bdot}{\, {\scriptstyle{\bullet}} \,}
\newcommand{\B}[1]{{\bf {#1}}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}

\newcommand{\myspace}{\parbox[c][0.2in]{0.2in}{\hfill}}
\newcommand{\varspace}[2]{\mbox{\parbox[c][#1]{#2}{\hfill}}}
\newcommand{\force}{{$\mbox{\,\!}$}}

\begin{document}

\pagestyle{empty}

\noindent
\parbox{2in}{\bf Math 2240}
\hfill {\Large \bf Homework \#2} \hfill
\parbox{2in}{\bf \hfill Due: Tues., July $21^\mathrm{st}$\!,\  2020}

%\vspace{0.2in}

\force \hfill {\bf Be sure to show your work!} \hfill \force

\vspace{0.05in}

\noindent
{\it Notes:} 
\begin{itemize}
\item This first homework was shorter. These later homeworks are longer. I don't plan on weighting each homework equally.   
\item You can copy/paste my {\color{red}sample code} into Maple. However, if you would prefer to do computations using different software, that is ok. Make sure you turn in {\it all} of your work (including computer code).
\item If you end up doing the entire assignment in Maple, feel free to turn in a Maple worksheet (.mw file) instead of a pdf. 
\item {\bf While some calculations can be done by hand}, some are better done using technology. A calculator is a poor choice since I want {\it exact} answers not decimal approximations.
\end{itemize}

\vspace{0.15in}

\noindent {\bf\large 1.} Consider $W=\mathrm{span}\{{\bf a},{\bf b}, {\bf c}, {\bf u}, {\bf v}, {\bf w}\}$ (a subspace of $\mathbb{R}^{6 \times 1}$) where ${\bf a},{\bf b}, {\bf c}, {\bf u}, {\bf v}, {\bf w}$ are the vectors defined in Maple as follows:

\vspace{0.05in}

\noindent {\color{red}
\verb# restart; #\\
\verb# with(LinearAlgebra): #\\
\verb# a := <<1,2,1,3,1,2>>:#\\
\verb# b := <<2,-1,-2,0,1,-1>>:#\\
\verb# c := <<-2,-4,-2,-6,-2,-4>>:#\\
\verb# u := <<-4,7,8,6,-1,7>>:#\\
\verb# v := <<1,1,-1,3,2,1>>:#\\
\verb# w := <<2,-3,0,-6,-3,-3>>:#\\
\verb# "[ a | b | c | u | v | w ]" = <a|b|c|u|v|w>;#\\
}

\begin{enumerate}[(a)]
\item Choose vectors from the list: ${\bf a},{\bf b}, {\bf c}, {\bf u}, {\bf v}, {\bf w}$ that give us a basis $\beta$ for $W$.
\item  Take your basis $\beta$ from part (a) and extend it to a basis for all of $\mathbb{R}^{6 \times 1}$ (i.e., find a basis for $\mathbb{R}^{6 \times 1}$ that includes the vectors in $\beta$).
\item Given the following vectors ${\bf x}$, ${\bf y}$, and ${\bf z}$ (defined below), which vectors belong to $W$?

\vspace{0.05in}

\noindent {\color{red}
\verb# x := <<6,5,4,3,2,1>>:#\\
\verb# y := <<1,-13,-11,-15,-2,-13>>:#\\
\verb# z := <<13,-3,-3,-9,2,-11>>:#\\
\verb# "[ x | y | z ]" = <x|y|z>;#\\
}
  
\end{enumerate}

\noindent {\bf\large 2.} Let $W = \mathrm{Span}(S) \subseteq \mathbb{P}_3$ where $S=\left\{ t^3+2t-1, -2t^3-4t+2, t^3+2t^2+3t+1, t^3-4t^2-5 \right\}$.

\begin{enumerate}[(a)]
\item Find a basis $\alpha$ for $W$.
\item Decide if any of $f(t) = t^3+t$, $g(t)=t^3-2t^2+t-3$, or $h(t)=2t^2+3$ belong to $W$.\\ \force\hfill For those that belong to $W$, find their $\alpha$-coordinate vectors.
\item Extend $\alpha$ to a basis $\beta$ for $\mathbb{P}_3$.
\item Suppose that $[p(t)]_\beta = \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix}$. What is $p(t)$?
\end{enumerate}

\vspace{0.1in}

\noindent {\bf\large 3.} Let $\alpha = \left\{ \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0  \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} \right\}$ and $\beta = \left\{ \begin{bmatrix} 1 & 1 \\ 2 & 2 \end{bmatrix}, \begin{bmatrix} -1 & 1 \\ 0 & 1  \end{bmatrix}, \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} -1 & 0 \\ 1 & 1 \end{bmatrix} \right\}$.

\begin{enumerate}[(a)]
\item Show that both $\alpha$ and $\beta$ are bases for $\mathbb{R}^{2 \times 2} = M_{2 \times 2}$. 
\item Find the change of coordinate matrix $P = \mathcal{P}_{\beta \leftarrow \alpha} = [I]_\alpha^\beta$ (changing from $\alpha$- to $\beta$-coordinates).
\item Let $A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$. Find $[A]_\alpha$. Then use part (b) to compute $[A]_\beta$.
\end{enumerate}


\end{document}

