\documentclass[12pt]{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 7.}

\medskip
  
\begin{enumerate}
\item[1.]
Let $\mathbb V$ be the real vector space
  of $n\times n$ matrices. Let $U\leq \mathbb V$
  be the subspace of upper triangular matrices and
  let $L\leq \mathbb V$
  be the subspace of lower triangular matrices.
  By computing the necessary dimensions, verify that
  $\dim(U+L)=\dim(U)+\dim(L)-\dim(U\cap L)$.
  (Note: a matrix is upper triangular if all entries strictly
  below the main diagonal are zero, and is lower triangular
  if all entries strictly above the main diagonal are zero.)
\end{enumerate}

\medskip

\color{blue}
{\bf Solution.}
A typical $n\times n$ upper triangular matrix has the form
\[
\begin{bmatrix}
a_{11} &  a_{11} &  \cdots &  a_{1n} \\
0 &  a_{21} &  \cdots &  a_{2n} \\
\vdots & \vdots  &  \ddots &  \vdots \\
0 &  0 &  \cdots &  a_{nn} \\
\end{bmatrix}.
\]
To specify such a matrix, one must specify one entry from
the first column, two from the second, $i$ from the $i$th,
until $n$ from the $n$th column, so intuitively we guess
that the dimension of the space of these matrices is
$1+2+\cdots+n = \frac{n(n+1)}{2}$. This intuition can be made rigorous
by exhibiting a basis for the space which has this size, namely
\[
(\underline{E_{11}},
\underline{E_{12},E_{22}},
\underline{E_{13},E_{23},E_{33}},\ldots,
\underline{E_{1n},E_{2n},\ldots,E_{nn}}).
\]
This yields $\dim(U)=\frac{n(n+1)}{2}$. A similar calculation
shows that $\dim(L)=\frac{n(n+1)}{2}$.
Since $U\cap L$ is the space of diagonal matrices,
and each diagonal matrix has $n$ independent entries,
it is not hard to see that $\dim(U\cap L)=n$.
It is also not hard to see that $U+L=\mathbb V$,
since $U+L$ contains all matrices $E_{ij}$,
and the set of these is a basis for $\mathbb V$.
In particular, $\dim(U+L)=\dim(\mathbb V)=n^2$.
\color{purple}
(These dimension counts can be worded in a more precise way
by establishing that $\{E_{ij}\;|\;i\leq j\}$ is a basis for
$U$, 
$\{E_{ij}\;|\;i\geq j\}$ is a basis for
$L$, 
$\{E_{ii}\;|\;1\leq i\leq n\}$ is a basis for
$U\cap L$,  and 
$\{E_{ij}\;|\;\textrm{all $i, j$}\}$ is a basis for
$U+L=\mathbb V$.) 

\color{blue}
To verify that  $\dim(U+L)=\dim(U)+\dim(L)-\dim(U\cap L)$
we calculate
\[
\dim(U)+\dim(L)-\dim(U\cap L) =
\frac{n(n+1)}{2} + \frac{n(n+1)}{2} - n=
n^2 = \dim(U+L).
\]
\color{black}

\medskip

\begin{enumerate}
\item[2.]
Let $P_3$ be the $4$-dimensional real vector space of all
  polynomials in $\mathbb R[x]$ that have degree at most $3$.
  Let $S\leq P_3$ be the $2$-dimensional subspace of those polynomials
  $p(x)$ satisfying $p(1)=p(2)=0$. Find bases for $P_3$ and $S$,
  and a basis for a complement $S^{\perp}$ to $S$.
\end{enumerate}
\medskip

\color{blue}
{\bf Solution.} 
The most obvious basis for $P_3$ is ${\mathcal B}=(1,x,x^2,x^3)$.

Next we seek a basis for $S$.
A polynomial $p(x)$ belongs to $S$ if it has degree at most
$3$ and has factors $x-1$ and $x-2$, which means that it
can written as $p(x) = (x-1)(x-2)q(x)$ where
$q(x)$ has degree at most $1$. This degree restriction
on $q$ means that $q(x)=ax+b$
for some $a$ and $b$. Hence
\[
p(x) = (x-1)(x-2)(ax+b) = a\underline{x(x-1)(x-2)} + b\underline{(x-1)(x-2)},
\]
which shows that any $p\in S$ is a linear
combination of $f(x)=(x-1)(x-2)$
and $g(x)=x(x-1)(x-2)$. Both $f$ and $g$
belong to $S$, and neither is a scalar multiple of the other,
so ${\mathcal C}=(f,g)$ must be a basis for $S$.

Next we apply the algorithm to thin out a spanning
set $({\mathcal C}|{\mathcal B})=(f,g,1,x,x^2,x^3)$
to a basis. (When written in coordinates, this
is called the ``column space algorithm''.)
It has the effect of locating a new basis for $P_3$
which includes $f$ and $g$.

Since the first four vectors in
$({\mathcal C}|{\mathcal B})=(f,g,1,x,x^2,x^3)$
are independent,\footnote{To see this, suppose that
  $c_1\cdot f + c_2\cdot g+c_3\cdot 1+c_4\cdot x=0$.
  Then $c_3+c_4x = -c_1 f - c_2 g$ is a linear
  polynomial with roots at $x=1$ and $x=2$, so
  $c_3+c_4x = 0 = -c_1 f - c_2 g$. From this
  and the independence of both $\{1,x\}$ and $\{f,g\}$ we derive
  that $c_1=c_2=c_3=c_4=0$.}
and $P_3$ is $4$-dimensional,
it must be that $(f,g,1,x)$ is a basis for $P_3$.
The first two are a basis for $S$, so the second two
must span a complement to $S$.

\color{purple}
This shows that one possible answer to the question is
$(1,x)$. You might have obtained a different
answer, since $S$ has many complements and each one
has many bases. The most likely alternative answers
for bases for a complement to $S$ are
of the form $(x^i,x^j)$, $i\neq j$.
Any such pair is a basis for a complement, and these
alternatives might
arise if you used the vectors in $\mathcal B$
in a different order.
In general, a correct answer will consist of an
independent sequence $(u(x),v(x))$ of length $2$,
with both  $u, v\in P_3$, such that there is
no nonzero combination $au(x) + bv(x)$
that has roots at both $x=1$ and $x=2$.
\color{black}
  \medskip

\begin{enumerate}
\item[3.]
Use a determinant to find the area of the triangle
in $\mathbb R^2$ whose vertices
are $(1,1)$, $(3,61)$, $(101,3)$. (Hint: a triangle is half a parallelogram.)
\end{enumerate}
\medskip

\color{blue}
{\bf Solution.}
Rigidly translate the triangle so that one vertex is at the origin.
You can do this by subtracting $(1,1)$ from each pair
of coordinates: $(0,0)$, $(2,60)$, $(100,2)$. Now the vectors
$\begin{bmatrix}2\\60\end{bmatrix}$ and
$\begin{bmatrix}100\\2\end{bmatrix}$ lie along
two sides of a parallelogram whose area
is twice the desired value. This means the answer is
\[
\frac{1}{2}\cdot \det\begin{bmatrix}100&2\\2&60\end{bmatrix} = 
\frac{1}{2}\cdot (6000-4) = 3000-2 = 2998.
\]
\color{black}

\end{document}
