\documentclass[12pt]{amsart}

\setlength{\parsep}{3pc}
\setlength{\itemsep}{0.2in}


\usepackage{fullpage}
\usepackage{epsfig}

\newtheorem{thm}{Theorem}

\newcommand{\Z}{\mathbb Z}
\newcommand{\F}{\mathbb F}
\newcommand{\R}{\mathbb R}
\newcommand{\C}{\mathbb C}
%\newcommand{\to}{\rightarrow}

\title[Problem Set 16 Solutions]{Problem Set 16 Solutions}

\begin{document}

\maketitle

\centerline{\tiny by Michael Allen}

\begin{enumerate}
\item Check that $(1,1,0)$, $(0,1,1)$, and $(1,0,1)$ form a basis for
$\R^3$.  Transform this basis into an orthonormal basis using the
Gram-Schmidt algorithm.  Check that the resulting vectors are
indeed orthogonal!

{\bf Answer:} The three vectors will form a basis for $\R^3$ iff
they are linearly independent. To determine this, we can simply
place them into the columns of a matrix, and reduce it to find
the pivots.

$$\left[\begin{array}{ccc}1&0&1\\1&1&0\\0&1&1\end{array}\right]
  \rightarrow
  \left[\begin{array}{ccc}1&0&1\\0&1&-1\\0&0&2\end{array}\right]$$

Since there are three pivots, the vectors are linearly
independent and form a basis for $\R^3$.

Now, we can use Gram-Schmidt to find an orthogonal basis:

$$w1 = \left[\begin{array}{c}1\\1\\0\end{array}\right]$$

$$w2 = \left[\begin{array}{c}0\\1\\1\end{array}\right]
      - \frac{1}{2}\left[\begin{array}{c}1\\1\\0\end{array}\right]
      = \left[\begin{array}{c}-1\\1\\2\end{array}\right]$$

$$w3 = \left[\begin{array}{c}1\\0\\1\end{array}\right]
      - \frac{1}{2}\left[\begin{array}{c}1\\1\\0\end{array}\right]
      - \frac{3}{6}\left[\begin{array}{c}-1\\1\\2\end{array}\right]
      = \left[\begin{array}{c}1\\-1\\1\end{array}\right]$$

And then normalize:

$$w1 = \left[\begin{array}{c}1\\1\\0\end{array}\right]
       \rightarrow
       \left[\begin{array}{c}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\\0\end{array}\right]$$

$$w2 = \left[\begin{array}{c}-1\\1\\2\end{array}\right]
       \rightarrow
       \left[\begin{array}{c}\frac{-1}{\sqrt{6}}\\\frac{1}{\sqrt{6}}\\\frac{2}{\sqrt{6}}\end{array}\right]$$

$$w3 = \left[\begin{array}{c}1\\-1\\1\end{array}\right]
       \rightarrow
       \left[\begin{array}{c}\frac{1}{\sqrt{3}}\\\frac{-1}{\sqrt{3}}\\\frac{1}{\sqrt{3}}\end{array}\right]$$

\item Check that the vectors $(1,0,0,0)$, $(1,1,0,0)$, $(1,1,1,0)$ and
$(1,1,1,1)$ form a basis of $\R^4$. Use the Gram-Schmidt
algorithm to make this into an orthonormal basis.

{\bf Answer:} As in the last problem, we can determine if the
vectors form a basis by putting the vectors into the columns of a
matrix and counting the pivots.

$$\left[\begin{array}{cccc}1&1&1&1\\0&1&1&1\\0&0&1&1\\0&0&0&1\end{array}\right]
  \rightarrow
  \left[\begin{array}{cccc}1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&1\end{array}\right]$$

There are four pivots, so everything is okay. Now, we use
Gram-Schmidt on them (or just do it by inspection), and we find
that the orthonormal basis is:

$$\begin{array}{cccc}
    \left[\begin{array}{c}1\\0\\0\\0\end{array}\right] &
    \left[\begin{array}{c}0\\1\\0\\0\end{array}\right] &
    \left[\begin{array}{c}0\\0\\1\\0\end{array}\right] &
    \left[\begin{array}{c}0\\0\\0\\1\end{array}\right]
  \end{array}$$

\item Consider the orthonormal vectors
$$
\begin{array}{ccc}
v_1=\left[\begin{array}{c}\frac{1}{\sqrt{3}}\\ \frac{1}{\sqrt{3}}\\
\frac{1}{\sqrt{3}} \end{array}\right] &
\& &
v_2=\left[\begin{array}{c}\frac{-1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \\ 0
\end{array}\right]
\end{array}$$
in $\R^3$.  Find some other vector
$$
b=\left[\begin{array}{c}b_1\\ b_2\\ b_3\end{array}\right]
$$
such that $v_1$, $v_2$, and $b$ are a basis of $\R^3$.  Then use the
Gram-Schmidt algorithm to make your basis into an orthogonal one.

{\bf Answer:} As long as we choose a vector which is linearly
independent of the two given, we will have a valid basis, so
there are many possible answers. So, let us choose $b = (1,0,0)$.

Then, when we perform Gram-Schmidt on the basis, we will get the
following:

$$
\left[\begin{array}{c}1\\0\\0\end{array}\right]
\left[\begin{array}{c}0\\1\\0\end{array}\right]
\left[\begin{array}{c}0\\0\\1\end{array}\right]
$$

\item Check that the matrix
$$Q=\left[\begin{array}{cc}\cos(\theta) & -\sin(\theta)\\\sin(\theta) & \cos(\theta)\end{array}\right]$$
is an orthogonal matrix by checking that $Q\cdot Q^T=I$. Also, check
that $||Q\cdot v||=||v||$ for the vector $v=\left[\begin{array}{c}
2\\1\end{array}\right]$.

{\bf Answer:}

$$
Q\cdot Q^T
= \left[\begin{array}{cc}\cos\theta&-\sin\theta\\\sin\theta & \cos\theta\end{array}\right]
  \left[\begin{array}{cc}\cos\theta&\sin\theta\\-\sin\theta & \cos\theta\end{array}\right]
$$

$$
= \left[\begin{array}{cc}\cos^2\theta+\sin^2\theta&\cos\theta\sin\theta-\cos\theta\sin\theta\\\cos\theta\sin\theta-\cos\theta\sin\theta&\cos^2\theta+\sin^2\theta\end{array}\right]
= \left[\begin{array}{cc}1&0\\0&1\end{array}\right] = I
$$

$$
||Q\cdot v||
= \|\left[\begin{array}{cc}\cos\theta&-\sin\theta\\\sin\theta & \cos\theta\end{array}\right]
  \left[\begin{array}{c}2\\1\end{array}\right]\|
= \|\left[\begin{array}{c}2\cos\theta-\sin\theta\\2\sin\theta+\cos\theta\end{array}\right]\|
$$

$$
= \sqrt{5\sin^2\theta + 5\cos^2\theta} = \sqrt{5} = \sqrt{2^2 + 1^2} = \|v\|
$$

\item We have the following theorem.
\begin{thm} If $\{ v_1,\dots,v_n\}$ is an orthonormal basis for
$\R^n$, then for any $v\in\R^n$, we can write
$$
v=c_1v_1+\cdots c_nv_n,
$$
where $c_i=v\cdot v_i$ $(1\leq i\leq n)$, where $\cdot$ is the dot
product.
\end{thm}
\begin{enumerate}
\item Use this theorem to write the vector $(3,2)$ as
linear combinations of the vectors
$$
\begin{array}{ccc}
\left[\begin{array}{c} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}}
\end{array}\right] &
\& &
\left[\begin{array}{c} -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}}
\end{array}\right]
\end{array}
$$

{\bf Answer:}

$$
\left[\begin{array}{c}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\end{array}\right]\cdot
\left[\begin{array}{c}3\\2\end{array}\right] = \frac{5}{\sqrt{2}}
$$

$$
\left[\begin{array}{c}\frac{-1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\end{array}\right]\cdot
\left[\begin{array}{c}3\\2\end{array}\right] = \frac{-1}{\sqrt{2}}
$$

$$
\frac{5}{\sqrt{2}}\left[\begin{array}{c}\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\end{array}\right]
+ \frac{-1}{\sqrt{2}}\left[\begin{array}{c}\frac{-1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}\end{array}\right]
= \left[\begin{array}{c}3\\2\end{array}\right]
$$

\item Use this theorem to write $(1,2,-1)$ in terms of the basis
$$
\begin{array}{cccc}
\left[\begin{array}{c} 1\\1\\1\end{array}\right], &
\left[\begin{array}{c} 1\\1\\0\end{array}\right] &
\& &
\left[\begin{array}{c} 1\\0\\0\end{array}\right]
\end{array}
$$

{\bf Answer:} Since the basis is not orthonormal, the theorem
does not apply to this problem, and we are stuck.

\end{enumerate}

\item Consider the two bases of $\R^3$,
$$
B=\left\{\begin{array}{cccc}
\left[\begin{array}{c} 1\\0\\0\end{array}\right], &
\left[\begin{array}{c} 0\\1\\0\end{array}\right] &
\& &
\left[\begin{array}{c} 0\\0\\1\end{array}\right]
\end{array}\right\},
$$
and
$$
\hat{B}=\left\{\begin{array}{cccc}
\left[\begin{array}{c} 1\\1\\1\end{array}\right], &
\left[\begin{array}{c} 1\\1\\0\end{array}\right] &
\& &
\left[\begin{array}{c} 1\\0\\0\end{array}\right]
\end{array}\right\}.
$$
The change of basis matrix $M_{\hat{B}}^B$ is
$$
M_{\hat{B}}^B=\left[\begin{array}{ccc}1&1&1\\1&1&0\\1&0&0\end{array}\right].
$$
Compute $M^{\hat{B}}_B$.

{\bf Answer:} $M^{\hat{B}}_B$ is just the inverse of
$M_{\hat{B}}^B$

$$
\left[\begin{array}{ccc}0&0&1\\0&1&-1\\1&-1&0\end{array}\right]
$$

\item Now consider the two bases
$$
\hat{B}=\left\{\begin{array}{cccc}
\left[\begin{array}{c} 1\\1\\1\end{array}\right], &
\left[\begin{array}{c} 1\\1\\0\end{array}\right] &
\& &
\left[\begin{array}{c} 1\\0\\0\end{array}\right]
\end{array}\right\},
$$
and
$$
\tilde{B}=\left\{\begin{array}{cccc}
\left[\begin{array}{r} 2\\-1\\0\end{array}\right], &
\left[\begin{array}{r} -1\\2\\-1\end{array}\right] &
\& &
\left[\begin{array}{r} 0\\-1\\2\end{array}\right]
\end{array}\right\}.
$$
Compute the matrices $M^{\hat{B}}_{\tilde{B}}$ and $M_{\hat{B}}^{\tilde{B}}$.

{\bf Answer:}

$$
M^{\hat{B}}_{\tilde{B}} = \tilde{B}\hat{B}^{-1}
= \left[\begin{array}{ccc}2&-1&0\\-1&2&-1\\0&-1&2\end{array}\right]
  \left[\begin{array}{ccc}0&0&1\\0&1&-1\\1&-1&0\end{array}\right]
= \left[\begin{array}{ccc}0&-1&4\\-1&3&-3\\2&-3&1\end{array}\right]
$$

$$
M_{\hat{B}}^{\tilde{B}} = M^{\hat{B}-1}_{\tilde{B}}
= \frac{1}{4}\left[\begin{array}{ccc}6&8&6\\5&6&3\\3&2&1\end{array}\right]
$$

\end{enumerate}

\end{document}

