%=========================================================================%
% initialize TeX
%=========================================================================%

\magnification=\magstep1
\baselineskip=14pt
\hsize = 6.5truein
\hoffset = 0.0truein
\vsize = 9.1truein
\voffset = -0.25truein
\emergencystretch = 0.05\hsize

\newif\ifblackboardbold

% comment out the following line if AMS msbm fonts aren't available
\blackboardboldtrue

%=========================================================================%
% select fonts
%=========================================================================%

\font\titlefont=cmbx12 scaled\magstephalf
\font\sectionfont=cmbx12
\font\netfont=cmtt9

% Establish AMS blackboard bold fonts without using amssym.def, amssym.tex

\newfam\bboldfam
\ifblackboardbold
\font\tenbbold=msbm10
\font\sevenbbold=msbm7
\font\fivebbold=msbm5
\textfont\bboldfam=\tenbbold
\scriptfont\bboldfam=\sevenbbold
\scriptscriptfont\bboldfam=\fivebbold
\def\bbold{\fam\bboldfam\tenbbold}
\else
\def\bbold{\bf}
\fi

%=========================================================================%
% widow control
%=========================================================================%

% usage:
% \widow{.2} % start new page if <.2 page left

\def\widow#1{\vskip 0pt plus#1\vsize\goodbreak\vskip 0pt plus-#1\vsize}

%=========================================================================%
% exam macros (use \practice or \exam to initialize)
%=========================================================================%

\newcount\probcount

\def\practice{
\probcount=0
\def\prob##1\par
{\medskip\global\advance\probcount by 1\noindent
{\bf[\number\probcount]}~##1}}

\def\exam{
\probcount=0
\def\prob##1\par
{\global\advance\probcount by 1\noindent {\bf[\number\probcount]}~##1
\vfill\eject
\noindent{\bf Problem: \hbox to 30pt{\hrulefill}}
\vfill\eject
}
\footline={\tenbf Page \folio\hfil Continued on page: \hbox to
30pt{\hrulefill}}
% set up name, id, school fields for exam
\vskip 0.1in 
{\bf \noindent Name: \hrulefill \hbox{}}
\vskip 0.1in 
{\bf \noindent ID: \hrulefill ~ School: \hrulefill \hbox{}}
\vskip 0.2in
}

% set up those boxes to put the scores in

\def\boxAsub#1{\vbox{\hbox{#1}}}
\def\boxA#1#2{[{\bf #1}] (#2 pts)}
\def\boxT{\bf TOTAL}
\def\boxB{\vbox to 25pt{\hbox{\kern 56pt}}}

\def\fiveboxes#1{
\centerline{
\vbox{\offinterlineskip\halign{
 \strut\vrule\hfil##\hfil\vrule
 &&\hfil##\hfil\vrule\cr
 \noalign{\hrule}
 \boxA 1{#1} &
 \boxA 2{#1} &
 \boxA 3{#1} &
 \boxA 4{#1} &
 \boxA 5{#1} &
 \boxT \cr
 \noalign{\hrule}
 \boxB & \boxB & \boxB & \boxB & \boxB & \boxB  \cr
 \noalign{\hrule}
}}}}

\def\eightboxes#1{
\centerline{
\vbox{\offinterlineskip\halign{
 \strut\vrule\hfil##\hfil\vrule
 &&\hfil##\hfil\vrule\cr
 \multispan4{\hrulefill}\cr
 \boxA 1{#1} &
 \boxA 2{#1} &
 \boxA 3{#1} &
 \boxA 4{#1} \cr
 \multispan4{\hrulefill}\cr
 \boxB & \boxB & \boxB & \boxB \cr
 \noalign{\hrule}
 \boxA 5{#1} &
 \boxA 6{#1} &
 \boxA 7{#1} &
 \boxA 8{#1} &
 \boxT \cr
 \noalign{\hrule}
 \boxB & \boxB & \boxB & \boxB & \boxB\cr
 \noalign{\hrule}
}}}}

\def\tenboxes#1{
\centerline{
\vbox{\offinterlineskip\halign{
 \strut\vrule\hfil##\hfil\vrule
 &&\hfil##\hfil\vrule\cr
 \multispan5{\hrulefill}\cr
 \boxA 1{#1} &
 \boxA 2{#1} &
 \boxA 3{#1} &
 \boxA 4{#1} &
 \boxA 5{#1} \cr
 \multispan5{\hrulefill}\cr
 \boxB & \boxB & \boxB & \boxB & \boxB \cr
 \noalign{\hrule}
 \boxA 6{#1} &
 \boxA 7{#1} &
 \boxA 8{#1} &
 \boxA 9{#1} &
 \boxA{10}{#1} &
 \boxT \cr
 \noalign{\hrule}
 \boxB & \boxB & \boxB & \boxB & \boxB & \boxB\cr
 \noalign{\hrule}
}}}}

%==========================================================================
% macros
%==========================================================================

\def\bmatrix#1{{\left[\vcenter{\halign
  {&\kern 4pt\hfil$##\mathstrut$\kern 4pt\cr#1}}\right]}}

% surround with $ $ if not already in math mode
\def\enma#1{{\ifmmode#1\else$#1$\fi}}

\def\mathbb#1{{\bbold #1}}
\def\mathbf#1{{\bf #1}}

% blackboard bold symbols
\def\FF{\enma{\mathbb{F}}}
\def\NN{\enma{\mathbb{N}}}
\def\RR{\enma{\mathbb{R}}}
\def\CC{\enma{\mathbb{C}}}
\def\QQ{\enma{\mathbb{Q}}}
\def\ZZ{\enma{\mathbb{Z}}}
\def\bbPP{\enma{\mathbb{P}}}

% caligraphic symbols
\def\cAA{\enma{\cal A}}
\def\cBB{\enma{\cal B}}

% bold symbols
\def\aa{\enma{\mathbf{a}}}
\def\bb{\enma{\mathbf{b}}}
\def\cc{\enma{\mathbf{c}}}
\def\ee{\enma{\mathbf{e}}}
\def\mm{\enma{\mathbf{m}}}
\def\pp{\enma{\mathbf{p}}}
\def\vv{\enma{\mathbf{v}}}
\def\ww{\enma{\mathbf{w}}}
\def\uu{\enma{\mathbf{u}}}
\def\vv{\enma{\mathbf{v}}}
\def\xx{\enma{\mathbf{x}}}
\def\yy{\enma{\mathbf{y}}}
\def\XX{\enma{\mathbf{X}}}
\def\KK{\enma{\mathbf{K}}}
\def\PP{\enma{\mathbf{P}}}
\def\LL{\enma{\mathbf{L}}}
\def\II{\enma{\mathbf{I}}}
\def\zero{\enma{\mathbf{0}}}
\def\blambda{\enma{\mathbf{\lambda}}}

% misc

\def\abs#1{\enma{\left| #1 \right|}}
\def\set#1{\enma{\{#1\}}}
\def\setdef#1#2{\enma{\{\;#1\;\,|\allowbreak
  \;\,#2\;\}}}
\def\idealdef#1#2{\enma{\langle\;#1\;\,
  |\;\,#2\;\rangle}}

%=========================================================================%
% exam
%=========================================================================%

\centerline{\titlefont Practice Exam 1}
\practice

\prob
Solve the following system of equations:
$$
\bmatrix
{2 & -1 & 0 & 0 \cr
-1 & 2 & -1 & 0 \cr
0 & -1 & 2 & -1 \cr
0 & 0 & -1 & 2 \cr}
\bmatrix{w \cr x \cr y \cr z \cr}
=
\bmatrix{1 \cr 0 \cr 0 \cr 6 \cr}
$$

\prob
Compute a matrix giving the number of walks of length 4
between pairs of vertices of the following graph:
\input epsf
$$\epsfbox{graph.eps}$$

\prob
Express the following matrix as a product of elementary matrices:
$$\bmatrix{
0 & 1 & 3 & 0 \cr
0 & 0 & 1 & 4 \cr
0 & 0 & 0 & 1 \cr
2 & 0 & 0 & 0 \cr
}$$


\prob
Compute the determinant of the following $4\times 4$ matrix:
$$\bmatrix{
\lambda & 1 & 0 & 0 \cr
1 & \lambda & 1 & 0 \cr
0 & 1 & \lambda & 1 \cr
0 & 0 & 1 & \lambda \cr
}$$
What can you say about the determinant of the $n\times n$ matrix with the same
pattern?


\prob
Use Cramer's rule to give a formula for $w$ in the solution to the following
system of equations:
$$
\bmatrix
{2 & -1 & 0 & 0 \cr
-1 & 2 & -1 & 0 \cr
0 & -1 & 2 & -1 \cr
0 & 0 & -1 & 2 \cr}
\bmatrix{w \cr x \cr y \cr z \cr}
=
\bmatrix{a \cr b \cr c \cr d \cr}
$$

\vfill\eject

\centerline{\titlefont Exam 1}
\practice

\prob
Solve the following system of equations:
$$
\bmatrix
{0 & 1 & 1 \cr
1 & 0 & 1 \cr
1 & 1 & 0 \cr}
\bmatrix{x \cr y \cr z \cr}
=
\bmatrix{2 \cr 0 \cr 0 \cr}
$$

\prob
Compute matrices giving the number of walks of lengths 1, 2, and 3
between pairs of vertices of the following graph:
\input epsf
$$\epsfbox{graph2.eps}$$

\prob
Express the following matrix as a product of elementary matrices:
$$\bmatrix{
0 & 1 & 1 \cr
1 & 0 & 1 \cr
1 & 1 & 0 \cr
}$$


\prob
Compute the determinant of the following $4\times 4$ matrix:
$$\bmatrix{
1 & 1 & 1 & 0 \cr
2 & 2 & 0 & 2 \cr
3 & 0 & 3 & 3 \cr
0 & 4 & 4 & 4 \cr
}$$
What can you say about the determinant of the $n\times n$ matrix with the same
pattern?


\prob
Use Cramer's rule to give a formula for the solution to the following
system of equations:
$$
\bmatrix
{0 & 1 & 1 \cr
1 & 0 & 1 \cr
1 & 1 & 0 \cr}
\bmatrix{x \cr y \cr z \cr}
=
\bmatrix{2a \cr 2b \cr 2c\cr}
$$

\vfill\eject

\centerline{\titlefont Practice Exam 2}
\practice

\prob
Let $P$ be the set of all polynomials $f(x)$, and let $Q$ be the subset of $P$
consisting of all polynomials $f(x)$ so $f(0) = f(1) = 0$. Show that $Q$ is a
subspace of $P$.

\prob
Let $A$ be the matrix
$$A \;=\;
\bmatrix{1 & -1 & 1\cr 2 & -2 & 2 \cr 1 & -1 & 0 \cr}.$$
Compute the row space and column space of $A$.

\prob
The four vectors
$$
\vv_1 \;=\; \bmatrix{1 \cr 0 \cr 2 \cr}, \quad
\vv_2 \;=\; \bmatrix{-1 \cr 0 \cr -2 \cr}, \quad
\vv_3 \;=\; \bmatrix{1 \cr 2 \cr 6 \cr}, \quad
\vv_4 \;=\; \bmatrix{0 \cr 1 \cr 2 \cr}$$
span a subspace $V$ of $\RR^3$, but are not a basis for $V$.
Choose a subset of $\set{\vv_1,\; \vv_2,\; \vv_3,\; \vv_4}$ which forms a basis
for $V$. Extend this basis for $V$ to a basis for $\RR^3$.


\prob
Let $L$ be the linear transformation from $\RR^3$ to $\RR^3$ which rotates one
half turn around the axis given by the vector $(1,1,1)$. Find a matrix $A$
representing $L$ with respect to the standard basis
$$
\ee_1 \;=\; \bmatrix{1 \cr 0 \cr 0 \cr}, \quad
\ee_2 \;=\; \bmatrix{0 \cr 1 \cr 0 \cr}, \quad
\ee_3 \;=\; \bmatrix{0 \cr 0 \cr 1 \cr}.$$
Choose a new basis $\set{\vv_1,\; \vv_2, \vv_3}$ for $\RR^3$ which makes $L$
easier to describe, and find a matrix $B$
representing $L$ with respect to this new basis.

\prob
Let $\set{\ee_1,\; \ee_2}$ and $\set{\vv_1,\; \vv_2}$ be ordered bases for
$\RR^2$, and let $L$ be the linear transformation represented by the matrix $A$
with respect to $\set{\ee_1,\; \ee_2}$, where
$$
\ee_1 \;=\; \bmatrix{1 \cr 0 \cr}, \quad
\ee_2 \;=\; \bmatrix{0 \cr 1 \cr}, \quad
\vv_1 \;=\; \bmatrix{2 \cr 1 \cr}, \quad
\vv_2 \;=\; \bmatrix{1 \cr -2 \cr}, \quad
A \;=\; \bmatrix{6 & -2 \cr -2 & 9\cr}.$$
Find the transition matrix $S$
corresponding to the change of basis from
$\set{\ee_1,\; \ee_2}$ to $\set{\vv_1,\; \vv_2}$.
Find a matrix $B$ representing $L$ with respect to $\set{\vv_1,\;
\vv_2}$.

\vfill\eject

\centerline{\titlefont Exam 2}
\practice

\prob
Let $P$ be the set of all degree $\le 4$ polynomials in one variable $x$ with
real coefficients. Let
$Q$ be the subset of
$P$ consisting of all odd polynomials, i.e. all polynomials $f(x)$ so $f(-x) =
-f(x)$. Show that $Q$ is a subspace of $P$.
Choose a basis
for $Q$. Extend this basis for $Q$ to a basis for $P$.

\prob
Let $A$ be the matrix
$$A \;=\;
\bmatrix{0 & 1 & 1 & 1\cr 1 & 1 & 1 & 1\cr 1 & 1 & 1 & 2\cr }.$$
Compute the row space and column space of $A$.

\prob
Let $L$ be the linear transformation from $\RR^3$ to $\RR^3$ which reflects
through the plane $P$ defined by $x+y+z=0$. In other words, if $\uu$ is a vector
lying in the plane $P$, and $\vv$ is a vector perpendicular to the plane
$P$, then $L(\uu+\vv)=\uu-\vv$.
Choose a basis $\set{\vv_1, \vv_2, \vv_3}$ for $\RR^3$, and find a matrix $A$
representing $L$ with respect to this basis.

\prob
Let $\set{\ee_1,\; \ee_2}$ and $\set{\vv_1,\; \vv_2}$ be ordered bases for
$\RR^2$, and let $L$ be the linear transformation represented by the matrix $A$
with respect to $\set{\ee_1,\; \ee_2}$, where
$$
\ee_1 \;=\; \bmatrix{1 \cr 0 \cr}, \quad
\ee_2 \;=\; \bmatrix{0 \cr 1 \cr}, \quad
\vv_1 \;=\; \bmatrix{1 \cr 1 \cr}, \quad
\vv_2 \;=\; \bmatrix{1 \cr 2 \cr}, \quad
A \;=\; \bmatrix{-1 & 2 \cr -4 & 5\cr}.$$
Find the transition matrix $S$
corresponding to the change of basis from
$\set{\ee_1,\; \ee_2}$ to $\set{\vv_1,\; \vv_2}$.
Find a matrix $B$ representing $L$ with respect to $\set{\vv_1,\;
\vv_2}$.

\prob
Let $\set{\uu_1,\; \uu_2}$, $\set{\vv_1,\; \vv_2}$, and $\set{\ww_1,\;
\ww_2}$ be ordered bases for $\RR^2$. If $$A \;=\; \bmatrix{1 & 2 \cr 0 &
1\cr}$$ is the transition matrix corresponding to the change of basis from
$\set{\uu_1,\; \uu_2}$ to
$\set{\vv_1,\; \vv_2}$, and $$B \;=\; \bmatrix{1 & 0 \cr 3 & 1\cr}$$ is the
transition matrix corresponding to the change of basis from $\set{\uu_1,\;
\uu_2}$ to
$\set{\ww_1,\; \ww_2}$,
express $\vv_1$ and $\vv_2$ in terms of $\ww_1$ and $\ww_2$.

\vfill\eject

\centerline{\titlefont Additional Practice Problems for Final}
\practice

\prob
By least squares, find the equation of the form $y=ax+b$ which best fits the
data  $(x_1,y_1)=(0,1)$, $(x_2,y_2)=(1,1)$, $(x_3,y_3)=(2,-1)$.

\prob
Find $(s,t)$ so $\bmatrix{1 & 0\cr -1 & 1\cr 0 & -1\cr }
\bmatrix{s\cr t\cr}$ is as close as possible to $\bmatrix{1\cr 0\cr 0\cr}$.

\prob
Find an orthogonal basis for the subspace $w+x+y+z=0$ of $\RR^4$.


\prob
Let $A$ be the matrix
$$A \;=\;
\bmatrix{-3 & -4\cr -4 & 3\cr }.$$
Find a basis of eigenvectors and eigenvalues for $A$.
Find the matrix exponential $e^A$.

\prob
Find a matrix $A$ in standard coordinates having eigenvectors
$\vv_1=(1,1)$,
$\vv_2=(1,2)$ with corresponding eigenvalues  $\lambda_1=2$, $\lambda_2=-1$.



\prob
Let $A$ be the matrix
$$A \;=\;
\bmatrix{2 & 1 & 1\cr 1 & 2 & 1\cr 1 & 1 & 2\cr }.$$
Find an orthogonal basis in which $A$ is diagonal.

\bye