\documentclass[11pt]{amsart}
\usepackage{amsmath,amsthm,amsfonts,latexsym,amssymb,amscd,xcolor}
\pagestyle{headings}
\setlength{\textwidth}{468true pt}
\setlength{\headheight}{0true pt} % needed for 12pt documents
\setlength{\oddsidemargin}{0 truept}
\setlength{\evensidemargin}{0 truept}
\setlength{\textheight}{580true pt}
\newtheorem{thm}{Theorem} %[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lm}[thm]{Lemma}
\newtheorem{prp}[thm]{Proposition}
\newtheorem{clm}[thm]{Claim}
%
\theoremstyle{definition}
\newtheorem{df}[thm]{Definition}

\begin{document}


\noindent
{\bf Solutions to HW 3.}

\bigskip
  
\begin{enumerate}
\item[1.] Exercise 2.16, parts (b), (c), (d).
\end{enumerate}

\bigskip

\color{blue}
{\bf Solutions.}
\begin{enumerate}
\item[(b)]
  Find the angle between the diagonal of the unit cube in
  $\mathbb R^3$ and one of the
  axes.
 \bigskip

 The vector ${\bf e}_1$ points along
 the first coordinate axis, while the vector
 ${\bf d}={\bf e}_1+{\bf e}_2+{\bf e}_3$ points along the diagonal.
 The cosine of the angle between them is
 \[
 \cos(\theta)=
 \frac{{\bf d}\boldsymbol{\cdot} {\bf e}_1}{\|{\bf d}\|\cdot \|{\bf e}_1\|}
 =\frac{1}{\sqrt{3}}.
 \]
 Hence $\theta = \cos^{-1}(1/\sqrt{3})$. 
 \bigskip
 
\item[(c)]
  Find the angle between the diagonal of the unit cube in
  $\mathbb R^n$ and one of the
axes.
 \bigskip
 
 If we repeat the same argument as in part (b),
 but use ${\bf d}={\bf e}_1+{\bf e}_2+\cdots+{\bf e}_n$, we get
 \[
 \cos(\theta)=\frac{{\bf d}\boldsymbol{\cdot} {\bf e}_1}{\|{\bf d}\|\cdot \|{\bf e}_1\|}
 =\frac{1}{\sqrt{n}}.
 \]
 Hence $\theta = \cos^{-1}(1/\sqrt{n})$.
 \bigskip
 
\item[(d)]
What is the limit, as $n$ goes to $\infty$,
of the angle between the diagonal of the
unit cube in $\mathbb R^n$ and any one of the axes?
 \bigskip


 If $\theta_n = \cos^{-1}(1/\sqrt{n})$, then
 $\lim_{n\to\infty} \theta_n = \lim_{n\to\infty} \cos^{-1}(1/\sqrt{n})
 = \cos^{-1}(\lim_{n\to\infty} 1/\sqrt{n}) = \cos^{-1}(0)=\pi/2$.
 \bigskip
 
\end{enumerate}
\color{black}

\bigskip
\bigskip

\begin{enumerate}
\item[2.] Let ${\bf e}_i$
be the vector of length $n$ whose $i$th entry is $1$
and whose other entries are $0$. The set
$\{{\bf e}_1, {\bf e}_2,\ldots,{\bf e}_n\}$
is called the standard basis for ${\bf R}^n$.
Show that the standard basis is independent.
\end{enumerate}
\bigskip

\color{blue}
{\bf Solution.}
If $c_1\cdot {\bf e}_1 + \cdots + c_n\cdot {\bf e}_n = {\bf 0}$, then
\[
\begin{bmatrix} c_1\\c_2\\ \vdots \\c_n\end{bmatrix} =
\begin{bmatrix} 0\\0\\ \vdots \\0\end{bmatrix}.  
\]
Equating entries, we get $c_1=c_2=\cdots=c_n=0$.  
\color{black}

\bigskip
\bigskip

\begin{enumerate}
\item[3.]
Let $A$ be an $m\times n$ matrix and let ${\bf e}_i$
be a standard basis vector of length $n$.
Explain why the product $A\cdot {\bf e}_i$
equals the $i$th column of $A$.
\end{enumerate}
\bigskip

\color{blue}
{\bf Solution.}
Write $A$ as $[a_{rs}]$ and ${\bf e}_i$ as $[u_{r1}]$.
Here $u_{r1}=0$ if $r\neq i$ and $u_{i1}=1$.
      
Since $A$ is $m\times n$ and ${\bf e}_i$ is $n\times 1$,
the product $A\cdot {\bf e}_i$ is defined and is
of shape $m\times 1$.
That is, it is a column vector of length $m$.
The $r$-entry of this vector is its $r,1$-entry
when considered as a matrix,
and this is $\sum_{k=1}^n a_{rk}u_{k1}$ according to the definition
of matrix multiplication. But $u_{k1}=0$ if $k\neq i$,
and $u_{i1}=1$, so the sum
$\sum_{k=1}^n a_{rk}u_{k1}$ reduces to $a_{ri}$.
This shows that $A\cdot {\bf e}_i$ is a column vector
of length $m$ whose $r$-entry is $a_{ri}$.
The same statement is true for the $i$th column of $A$,
so $A\cdot {\bf e}_i$ equals the $i$th column of $A$.
\color{black}

\bigskip
\bigskip

\begin{enumerate}
\item[(X)]  {\bf Optional Fun Challenge! (0 points!)}
An ant starts at a point in the plane and walks in a
straight line for 1 unit. He then turns left at a
right angle and walks in a straight line for 1/2 unit.
He then turns left again at a right angle and walks 1/3 unit.
He continues to turn left at right angles and walk 1/4 unit,
1/5 unit, 1/6 unit, ETC. As time progresses,
this ant spirals closer and closer to a limiting location.
At the limit, how far will the ant be from where he started?
\end{enumerate}

\bigskip

\color{blue}
{\bf Solution.}
Assume that the ant starts at the origin.      
The location of the ant approaches the limiting location
\[
\begin{bmatrix} 1\\0\end{bmatrix} +
\begin{bmatrix} 0\\ \frac{1}{2}\end{bmatrix} +
\begin{bmatrix} -\frac{1}{3}\\0\end{bmatrix} +
\begin{bmatrix} 0\\ -\frac{1}{4}\end{bmatrix} +
\begin{bmatrix} \frac{1}{5}\\0\end{bmatrix} + \cdots = 
  \begin{bmatrix} 1-\frac{1}{3}+\frac{1}{5}-\cdots\\
\frac{1}{2}-\frac{1}{4}+\frac{1}{6}- \cdots \end{bmatrix}.
  \]
  You may remember (from Calculus) that
  $1-\frac{1}{3}+\frac{1}{5}-\cdots$ converges to $\frac{\pi}{4}$,
  and that
  $1-\frac{1}{2}+\frac{1}{3}-\cdots$ converges to $\ln(2)$.
  The first of these is derived from
  $\frac{1}{1+x^2}=1-x^2+x^4-x^6+\cdots$ through integration
  over $[0,1]$, and
  the second is derived from
$\frac{1}{1+x}=1-x+x^2-x^3+\cdots$
  through integration over $[0,1]$.

  From the second series, we derive that
  $\frac{1}{2}-\frac{1}{4}+\frac{1}{6}- \cdots =
  \frac{1}{2}(1-\frac{1}{2}+\frac{1}{3}-\cdots) =
  \frac{1}{2}(\ln(2))$. Hence the limiting location is
  \[
\begin{bmatrix} \frac{\pi}{4}\\
\frac{\ln(2)}{2})\end{bmatrix}.
  \]
  At the limit, the ant will be
  \[
\sqrt{\left(\frac{\pi}{4}\right)^2+\left(\frac{\ln(2)}{2}\right)^2}
\]
units from where it started. (This is about .8585 units.)
\color{black}

\bigskip
\bigskip

\end{document}
