\documentclass[12pt]{amsart}
\usepackage{amssymb}
\DeclareMathOperator{\image}{Im}
\newcommand{\set}[1]{\left\{#1\right\}}
\newcommand{\from}{\colon}
\newcommand{\bC}{{\mathbb C}}
\newcommand{\bR}{{\mathbb R}}
\newenvironment{bsmallmatrix}
{\left[\begin{smallmatrix}}
{\end{smallmatrix}\right]}

\title{Math 23a 1st Midterm Solutions}

\begin{document}
\maketitle

\begin{enumerate}
\item (George) There are slicker ways of approaching the problem, but just for your
amusement, I will multiply matrices.

\begin{equation}
\begin{split}
AB &= BA \\
\begin{bsmallmatrix}1&1&0\\0&1&1\\0&0&1\end{bsmallmatrix}
\begin{bsmallmatrix}a&b&c\\d&e&f\\g&h&i\end{bsmallmatrix} &=
\begin{bsmallmatrix}a&b&c\\d&e&f\\g&h&i\end{bsmallmatrix}
\begin{bsmallmatrix}1&1&0\\0&1&1\\0&0&1\end{bsmallmatrix} \\
\begin{bsmallmatrix}a+d&b+e&c+f\\d+g&e+h&f+i\\g&h&i\end{bsmallmatrix} &=
\begin{bsmallmatrix}a&a+b&b+c\\d&d+e&e+f\\g&g+h&h+i\end{bsmallmatrix}
\end{split}
\end{equation}

This clearly implies that $d=g=h=0$, $a=e=i$, and $b=f$.  Furthermore, it
is clear that when these conditions are satisfied $AB=BA$.  Therefore, the
set of such $B$ is the set of matrices of the form
$\begin{bsmallmatrix}a&b&c\\0&a&b\\0&0&a\end{bsmallmatrix}$.

\item (David)
Let $V=\mathbb R ^3 ,\{ e_1,e_2,e_3\}$ be the standard basis of $V,v_1= e_1
+e_2,v_2=e_2 +e_3,v_3=e_3 $. Let $\{ e^1 ,e^2,e^3\},\{ v^1 ,v^2,v^3\}\in
V^\vee$ be the dual bases. Write $v^2$ as a linear combination of $ e^1
,e^2,e^3$.
 
We know that  $\{ e^1 ,e^2,e^3\}$ is a basis of $V^\vee$. Therefore we
can find real numbers $a,b,c$ such that $v^2 =a e^1 +be^2 +ce^3$. By
the definition  the vector   $v^2$ is the unique linear functional on
$V$ such that  $v^2 (v_1 )=v^2 (v_3 )=0$ and  $v^2 (v_2 )=1$. By the
definiton we have  $v^2 (v_1 )=(a e^1 +be^2 +ce^3 )( e_1+e_2)=a+b$,
 $v^2 (v_2 )=(a e^1 +be^2 +ce^3 )( e_2+e_3)=b+c$ and
 $v^2 (v_3 )=(a e^1 +be^2 +ce^3 )(e_3)=c$ . So we have to solve the
following  system  of equations
$$a+b=0$$,$$b+c=1$$ and $$c=0$$. This gives $a=-1 ,b=1,c=0$

So  $v^2 =- e^1 +e^2$.

\item (Li-Chung)
\begin{enumerate}
\item Define addition as $(a+bi)+(c+di) = (a+c)+(b+d)i$, and define
scalar multiplication as $c(a+bi) = ca + (cb)i$, where $c \in \bR$.
We check the eight axioms to show that these two operations define
a vector space structure.
   \begin{enumerate}
   \item
   The additive identity is $0+0i = 0$ because for any $a+bi \in \bC$,
   $(a+bi)+(0+0i) = (a+0)+(b+0)i = a+bi$ and
   $(0+0i)+(a+bi) = (0+a)+(0+b)i = a+bi$.
   \item
   The additive inverse of $a+bi$ is $(-a)+(-b)i$ because
   $(a+bi)+((-a)+(-b)i) = (a+(-a)) + (b+(-b))i = 0+0i
   = ((-a)+a)) + ((-b)+b)i = ((-a)+(-b)i) + (a+bi)$.
   \item
   Addition is commutative because
   $(a+bi)+(c+di) = (a+c)+(b+d)i = (c+a)+(d+b)i = (c+di)+(a+bi)$.
   \item
   Addition is associative because
   $((a+bi)+(c+di))+(e+fi) = ((a+c)+(b+d)i) + (e+fi)
   = (a+c+e)+(b+d+f)i = (a+bi) + ((c+e)+(d+f)i)
   = (a+bi) + ((c+di) + (e+fi))$.
   \item
   The multiplicative identity is $1$:
   $1(a+bi) = (1\cdot a) + (1\cdot b)i = a+bi$.
   \item
   The associative law for multiplication works:
   $c(d(a+bi)) = c(da+(db)i) = (cda)+(cdb)i = (cd)(a+bi)$.
   \item
   Scalar addition distributes:
   $(c+d)(a+bi) = ((c+d)a) + ((c+d)b)i
   = (ca+da) + (cb+db)i = (ca+(cb)i) + (da+(db)i)
   = c(a+bi) + d(a+bi)$.
   \item
   Vector addition distributes:
   $e((a+bi)+(c+di)) = e((a+c)+(b+d)i) = e(a+c) + (e(b+d))i
   = (ea+ec) + (eb+ed)i = (ea+(eb)i) + (ec+(ed)i)
   = e(a+bi) + e(c+di)$.
   \end{enumerate}
   
   \item
   This is true almost by definition of complex numbers, but we should
   be careful anyway.
   Any complex number is expressible as $a+bi$, where
   $a$ and $b$ are real.  But
   $a+bi = (a+0i) + (0+bi)
   = (a(1)+(a\dot 0)i) + ((b\dot 0)+(b\dot 1)i)
   = a(1+0i) + b(0+1i)$, so $a+bi$ is a real linear combination of
   $1 = 1+0i$ and $i = 0+1i$.  Hence $1$ and $i$ span $\bC$.
   
   Now suppose $a$ and $b$ are real and $a\dot 1+b\dot i = 0 = 0+0i$.
   Then $0+0i = a(1+0i)+b(0+1i) = (a + 0i) + (0 + bi) = a + bi$, which
   means that $a = b = 0$ because $a$ and $b$ are real.  (Because
   $0 = a+bi \implies 0 = (a+bi)(a-bi) = a^2+b^2$, and $a^2$ and $b^2$
   are positive unless $a = b = 0$.)
   Hence $1$ and $i$ are linearly independent.
   
   By definition of a basis, $1$ and $i$ form a basis.
   
   \item
   We need to show that for any complex numbers $z, z'$ and real numbers
   $\alpha$ and $\beta$, $A(\alpha z+\beta z') = \alpha A(z) + \beta
   A(z')$.  Suppose $z = c+di$ and $z' = c'+d'i$.  Then
   $A(\alpha z+\beta z') = A((\alpha c+\beta c') + (\alpha d+\beta d')i)
   = (a+bi)((\alpha c+\beta c') + (\alpha d+\beta d')i)
   = (a(\alpha c+\beta c')-b(\alpha d+\beta d'))
   + (a(\alpha d+\beta d')+b(\alpha c+\beta c'))i
   = \bigl((\alpha ac - \alpha bd) + (\alpha ad + \alpha bc)i\bigr) +
   \bigl((\beta ac' - \beta bd') + (\beta ad' + \beta bc')i\bigr)
   = \alpha((ac-bd)+(ad+bc)i) + \beta((ac'-bd')+(ad'+bc')i)
   = \alpha(a+bi)(c+di) + \beta(a+bi)(c'+d'i)
   = \alpha A(z) + \beta A(z')$.
   
   \item $A(1) = a+bi = (a)1+ (b)i$ and $A(i) = (a+bi)i = -b+ai
   = (-b)1 + (a)i$, so with respect to the basis $\set{1,i}$ the matrix is
   $\begin{bmatrix}
   a & -b \\
   b & a
   \end{bmatrix}$.
\end{enumerate}

\item (Matt)
No.  One counterexample is
$A=\begin{bsmallmatrix}1&1\\1&1\end{bsmallmatrix}$ and
$B=\begin{bsmallmatrix}1&1\\-1&-1\end{bsmallmatrix}$.

This problem could have been done just by plugging entries into
$A$ and $B$ to find matrices for which $AB=0$ but $BA \neq 0$. But
we can gain more insight into the meaning of the statement $AB=0$
by examining $\image B$ and $\ker A$, where $A$ and $B$ are considered
as linear transformations from $\bR^2$ to $\bR^2$.
$AB=0$ means that $\forall v \in \bR^2, (AB)v=0$ and thus
$A(Bv)=0$. So $\image B \subset \ker A$.

We have three cases to consider, based on the dimension of $\image B$.

$\dim(\image B) = 2$:  Then $\image B$ = $\bR^2$, so $AB=0
\implies A(Bv)=0$ for all $v \in \bR^2
\implies Aw=0$ for all $w \in \bR^2 \implies
A=0 \implies BA=0$.

$\dim(\image B) = 0$:  The only subspace of dimension 0 is $\set{0}$. So
$Bv=0$ for all $v \in \bR^2 \implies B=0 \implies BA=0$.

$\dim(\image B) = 1$:  This is the interesting case.  Here we can
choose any nonzero vector $v=\begin{bmatrix}v_1\\v_2\end{bmatrix}
\in \bR^2$ to be a basis for Img $B$.  We construct $B$
such that the columns of $B$ are multiplies of $v$:
$B=\begin{bmatrix}av_1&bv_1\\av_2&bv_2\end{bmatrix}$, where $a,b
\in \bR$. Then we can construct our matrix $A$ such that
$AB=0$, or $\image B \subset \ker A$. To do this we need the product
of each row of $A$ and each column of $B$ to be zero. So we can
write $A$ in the following format:

$A=\begin{bmatrix}cv_2&-cv_1\\dv_2&-dv_1\end{bmatrix}$, where $c,d
\in \bR$.

We have found a matrix such that $AB=0$. $BA$, on the other hand,
is $\begin{bmatrix}(ac+bd){v_1}{v_2}&-(ac+bd){v_1}^2\\
(ac+bd){v_2}^2&-(ac+bd){v_1}{v_2}\end{bmatrix}$.  This matrix is
nonzero as long as $ac+bd \neq 0$.

\item (Nils)
\begin{enumerate}
 \item First, recall that if $L\subsetneq M$ are (finite dimensional)
 vector spaces, then $\dim L < \dim M$, since you can pick a basis
 $\set{v_1,\dots,v_l}$ of $L$, and then add in $w\in M\setminus L$, so
 $\set{v_1,\dots,v_l,w} \subset M$ is linearly independent.

 Thus, given
\begin{equation}
\set{0} \subset L_1  \subsetneq L_2 \subsetneq \dots \subsetneq L_r \subset V
\end{equation}
  we obtain
\begin{equation}
0 \leq \dim L_1  < \dim L_2 < \dots < \dim L_r \leq d
\end{equation}
so $r\leq d+1$, otherwise we'd have $\dim L_i =\dim L_{i+1}$ for some $i$.

 \item
  Consider $L_i=\ker A^i$. Since $A(0)=0$, we see that if $v\in \ker
  A^i$, then $v\in \ker A^{i+1}$ (once you get to zero, you stay
  there). Now consider
\begin{equation}
\set{0}=L_0 \subset L_1  \subset L_2 \subset L_5 = V.
\end{equation}
  Since this is a sequence of subspaces of length $4>2+1$, by
  part~(a), one of these containments must be an equality; we wish to
  show that it must be the last. If $L_0=L_1$, then $\ker A=\set{0}$,
  so $A$ is invertible and thus $A^5\neq 0$, so this isn't the case.

  Now suppose $L_1=L_2$; then we claim that $L_i=L_{i+1}$ for
  $i>1$. This is the crux of the problem, and is basically a
  generalization of the case where $A$ is invertible.
  That is, consider $\image A^i$. We claim that $\image A^i \supset \image
  A^{i+1}$; this is because $\image A^{i+1}$ is the image of $\image A$
  under $A^i$, and thus is a subset of the image of $V$ under $A^i$.
  Now by rank-nullity (the dimension theorem), we have that $\dim \image
  A^1=\dim A^2$; thus, $\image A^1=\image A^2$, so if we \emph{restrict} $A$
  to $\image A$, it is fact an isomorphism on $\image A$. Thus, $\image A^1=\image
  A^2=\image A^3=\dotsb$, and thus $L_1=L_2=L_3=\dotsb$.

  Thus, if any of the containments is an equality (and one must be, by
  part~(a)), then all further ones must be, so in particular
  $L_2=L_5=V$, so $A^2=0$.\footnote{I had this problem on my first midterm
  (generalized such that $2\mapsto n, 5 \mapsto m>n$). It was a
  take-home. I got it wrong.}
\end{enumerate}
\end{enumerate}
\end{document}
