\documentclass[11pt]{article}

\usepackage{systeme}

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
%\usepackage{palatino}
\usepackage{setdeck}

\usepackage{xcolor}

%\usepackage[textheight=8.5in, margin=1.6in]{geometry}
\usepackage[total={6in,8in}]{geometry}

\usepackage{tikz}
%\usepackage{pgfplots}
%\tikzstyle{ball} = [circle,shading=ball, ball color=black,
%    minimum size=1mm,inner sep=1.3pt]
%\usetikzlibrary{arrows.meta}
%\tikzset{>={Latex[length=2mm,width=1.5mm]}}

%\usepackage{graphicx}

\usepackage{needspace}  % <-- to prevent bad pagebreak over environment titles
% Use:  \Needspace{3\baselineskip} before opening an environment

\usepackage{enumitem}
\setlist[enumerate]{leftmargin=*,label=(\alph*)}

%\usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\sn}{\mathfrak{S}}
\newcommand{\ve}{\varepsilon}
\newcommand{\ips}[2]{\langle{#1}, {#2}\rangle}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\Span}{\mathrm{Span}}
\DeclareMathOperator{\rk}{\mathrm{rank}}
\DeclareMathOperator{\rspace}{\mathrm{rowspace}}
\DeclareMathOperator{\cspace}{\mathrm{colspace}}
\DeclareMathOperator{\trace}{\mathrm{tr}}
\DeclareMathOperator{\im}{\mathrm{im}}
\DeclareMathOperator{\Sym}{\mathrm{Sym}}
\DeclareMathOperator{\Hom}{\mathrm{Hom}}
\DeclareMathOperator{\diag}{\mathrm{diag}}
\DeclareMathOperator{\glb}{\mathrm{glb}}
\DeclareMathOperator{\lub}{\mathrm{lub}}

\parskip = 0.05in
\parindent = 0.0in

%\pagestyle{empty}

\begin{document}
\centerline{Math 201 lecture for Friday, Week 4}
\bigskip

\centerline{\bf Row and column spaces}
\medskip


\textbf{Row rank and column rank.}  
\medskip

{\bf Definition.} Let~$A$ be an~$m\times n$ matrix over~$F$.  The {\em row space}
of~$A$ is the subspace of~$F^n$ spanned by its rows, and the {\em column space}
of~$A$ is the subspace of~$F^m$ spanned by its columns.  The {\em row rank}
of~$A$ is the dimension of its row space, and the {\em column rank}
of~$A$ is the dimension of its column space.
\medskip

Since row operations are reversible, any matrix obtained from a
matrix~$A$ by performing row operations has the same row space.  In particular,
the row space of~$A$ is the same as the row space of its reduced echelon form.
From the structure of the reduced echelon form, it's clear that its nonzero rows
form a basis for its row space.  To summarize:
\begin{quote}
  {\bf The nonzero rows of the reduced echelon form of~$A$ form a basis for the
    row space of~$A$.}
\end{quote}

This gives an algorithm for computing a basis for the row space of a matrix.
\medskip

{\sc Algorithm for computing a basis for the row space and the row rank.}  Given
an~$m\times n$ matrix~$A$, compute its reduced echelon form~$E$.  Then the rows
of~$E$ are a basis for the row space of~$A$.  The number of nonzero rows
in~$E$ is the row rank of~$A$.
\medskip

{\bf Example.} Let
\[
A = 
\left(\begin{array}{rrrr}
1 & 2 & 0 & 4 \\
3 & 3 & 1 & 0 \\
7 & 8 & 2 & 4
\end{array}\right).
\]
To compute a basis for the row space of~$A$, compute its reduced echelon form:
\[
A = 
\left(\begin{array}{rrrr}
1 & 2 & 0 & 4 \\
3 & 3 & 1 & 0 \\
7 & 8 & 2 & 4
\end{array}\right)
\longrightarrow
E=
\left(\begin{array}{rrrr}
    1 & 0 & \frac{2}{3} & -4 \\[5pt]
    0 & 1 & -\frac{1}{3} & 4 \\[5pt]
    0 & 0 & 0 & 0
\end{array}\right).
\]
So a basis for the row space of~$A$ is:
\[
  \textstyle
  \left\{ \left( 1,0,\frac{2}{3},-4 \right), \left( 0,1,-\frac{1}{3},4 \right)
  \right\}.
\]
\newpage

{\bf Proposition.}  Let~$A$ be an~$m\times n$ matrix with
columns~$A_1,\dots,A_n\in F^m$.  Let~$\tilde{A}$ be any matrix
formed from~$A$ by performing row operations, and
let~$\tilde{A}_1,\dots,\tilde{A}_n\in F^m$ be its columns.
Let~$x_1,\dots,x_n\in F$ be any scalars.  Then
\[
x_1A_1+\cdots+x_nA_n=0
\quad
\text{ if and only if }
\quad
x_1\tilde{A}_1+\cdots+x_n\tilde{A}_n=0.
\]
{\bf Proof.} Write out the relation $x_1A_1+\cdots+x_nA_n=0$
longhand:
\[
x_1
\left(\begin{array}{c}
    a_{11}\\
    a_{21}\\
    \vdots\\
    a_{m1}
\end{array} \right)
+
\dots
+
x_n
\left(\begin{array}{c}
    a_{1n}\\
    a_{2n}\\
    \vdots\\
    a_{mn}
\end{array} \right)
=0.
\]
Adding up the left-hand side, we see the relation is equivalent to a
solution~$(x_1,\dots,x_n)$ to the linear system
\begin{align*}
  a_{11}x_1+\dots+a_{1n}x_n&=0\\
  \vdots\qquad\vdots\qquad\vdots\qquad&\\
  a_{m1}x_1+\dots+a_{mn}x_n&=0.
\end{align*}
Or result follows since row operations do not change the set of solutions to a
system of equations.
\hfill$\Box$
\medskip

{\bf Corollary.} Let~$E$ be the reduced row echelon form of a matrix~$A$, and
suppose the basic (pivot) columns have indices~$j_1,\dots,j_r$.  Then the columns
of~$A$ indexed by~$j_1,\dots,j_r$ form a basis for the column space
of~$A$.
\smallskip

{\bf Proof.} For ease of notation, assume~$j_1=1, j_2=2, \dots, j_r =r$, i.e.,
the first~$r$ columns of~$E$ are the pivot columns.  For instance, in the
case~$m=5$, $n=7$, and $r=3$, the matrix~$E$ would have the form
\[
  \left(\begin{array}{ccccccc}
      1&0&0&*&*&*&*\\
      0&1&0&*&*&*&*\\
      0&0&1&*&*&*&*\\
      0&0&0&0&0&0&0\\
      0&0&0&0&0&0&0
  \end{array} \right)
\]
where the~$*$s are arbitrary scalars.  

Let~$E_1,\dots,E_n$ denote the columns of~$E$, and let~$A_1,\dots,A_n$ denote
the columns of~$A$.  It is clear that~$E_1,\dots,E_r$ form a basis for the
columns space of~$E$.  We need to show that~$A_1,\dots,A_r$ form a basis for the
columns space of~$A$.  So we need to show~$A_1,\dots,A_r$ are linearly
independent and span the column space of~$A$.  For linear independence, suppose
that
\[
  x_1A_1+\cdots+ x_rA_r=0.
\]
for some~$x_i\in F$.
Then, by the Proposition,
\[
  x_1E_1+\cdots+ x_rE_r=0.
\]
Since~$E_1,\dots,E_r$ are linearly independent, it follows
that~$x_1=\cdots=x_r=0$,
as desired.  Next, to show~$A_1,\dots,A_r$ span the column space of~$A$, it
suffices to show that every other column of~$A$ is in the span.  So
consider a column~$A_j$ with~$j>r$.  Since~$E_1,\dots,E_r$ form a basis for the
column space of~$E$, we can find scalars~$c_1,\dots,c_r$ such that
\[
  E_j = c_1E_1+\cdots+c_r E_r.
\]
Rewriting this equation, we get
\[
  c_1E_1+\cdots+c_r E_r-E_j=0.
\]
It then follows from the Proposition that
\[
  c_1A_1+\cdots+c_r A_r-A_j=0,
\]
which implies
\[
  A_j=c_1A_1+\cdots+c_r A_r-A_j.
\]
So~$A_j$ is in the span of~$A_1,\dots, A_r$.
\hfill$\Box$
\medskip

We turn the Corollary into an algorithm:
\medskip

{\sc Algorithm for computing a basis for the column space and the column rank.}
Given a matrix~$A$, compute its reduced echelon from~$E$.  Say that
columns~$j_1,\dots,j_r$ are the basic columns of~$E$ (those corresponding to the
  non-free variables---the one that have a single non-zero entry and that entry
  is equal to~$1$.  Then columns~$j_1,\dots,j_r$ are a basis for the columns
  space of~$A$.  The column rank of~$A$ is~$r$, the number of basic columns of
  its reduced echelon form.  
  \smallskip

  \textcolor{red}{\bf WARNING:}  Be sure to take columns~$j_1,\dots,j_k$ of the
  orginal matrix,~$A$, not of the echelon form,~$E$.  (So computing a basis for
  the row space is little easier, since it does not require this last step.)
\bigskip

{\bf Example:} In the previous example, we computed the reduced echelon form of
a matrix:
\[
A = 
\left(\begin{array}{rrrr}
1 & 2 & 0 & 4 \\
3 & 3 & 1 & 0 \\
7 & 8 & 2 & 4
\end{array}\right)
\longrightarrow
E=
\left(\begin{array}{rrrr}
    1 & 0 & \frac{2}{3} & -4 \\[5pt]
    0 & 1 & -\frac{1}{3} & 4 \\[5pt]
    0 & 0 & 0 & 0
\end{array}\right).
\]
The first two columns of~$E$ are its basic columns.  Therefore, the first two
columns of~$A$ form a basis for its column space:
\[
  \left(\begin{array}{c}
      1\\3\\7
  \end{array} \right),
  \left(\begin{array}{c}
      2\\3\\8
  \end{array} \right).
\]
NOTE:  The first two columns of~$E$ in this case are the first two standard
basis vectors, which clearly don't have the same span as the above two vectors.
\medskip

A consequence of our discussion above is the following, rather surprising, result:
\smallskip

{\bf Theorem.}  The row rank of a matrix~$A$ is equal to its column rank.
\smallskip

{\bf Proof.} Let~$E$ be the reduced echelon form of~$A$.  Then the number of its
nonzero rows is equal to the number of its basic columns.
\hfill$\Box$
\medskip

{\bf Definition.}  The {\em rank} of a matrix~$A$, denoted~$\rk(A)$ is the
dimension of its row space or column space.
\medskip

Suppose we have a homogeneous system of linear equations
\begin{align*}
  a_{11} x_{11}+\dots+a_{1n}x_n&=0\\
  \vdots\qquad\vdots\qquad\vdots\qquad&\\
  a_{m1}x_m+\dots+a_{mn}x_n&=0.
\end{align*}
Let~$A=(a_{ij})$ be the matrix of coefficients.  To solve the system, we
compute the reduced echelon form of the matrix~$A$.  The number of free
parameters for the solution space is then the number of non-basic columns,
i.e.,~$n-\rk(A)$.  There is a unique solution~$\vec{0}$ exactly when the reduced
echelon form is the matrix with~$1$s along its diagonal and 0s, otherwise, i.e.,
exactly when there are no non-basic columns.  Hence, there is only the trivial
solution if and only if~$\rk(A)=n$.

For a non-homogeneous system
\begin{align}\label{ali:04fri}
  a_{11} x_{11}+\dots+a_{1n}x_n&=b_1\\\nonumber
  \vdots\qquad\vdots\qquad\vdots\qquad&\\\nonumber
  a_{m1}x_m+\dots+a_{mn}x_n&=b_n.
\end{align}
we would compute the echelon of the augmented matrix~$[A|b]$
where~$b$ is the column with entries~$b_1,\dots,b_n$.  If the system is
consistent, we have seen that the set of solutions consists of any particular
solution plus any vector in the span of~$n-\rk(A)$ vectors that are solutions to
the corresponding homogeneous system.  So if the system is consistent, there is
a unique solution if and only if~$\rk(A)=n$.
\medskip

\textbf{Summary.} The system~(\ref{ali:04fri}), above, has a unique solution if and only if
it is consistent and $\rk(A)=n$.  In the case~$b_1=\cdots=b_n=0$, the system is
homogeneous and, thus, consistent ($x_1=\cdots=x_n=0$ is a solution).  So in
the homogeneous case, there is a unique solution if and only if~$\rk(A)=n$.
\end{document}


\end{document}
