% vim: tw=50
% 14/10/2022 11AM

\begin{definition*}
    Let $V$ be a vector space over $F$. Let $V_1,
    \dots, V_l \le V$ (subspaces).
    \begin{enumerate}[(i)]
        \item Notation:
            $\sum_{i = 1}^l V_i = \{x_1 + \cdots
            + v_l, v_j \in V_j, 1 \le j \le
            l\}$
        \item The sum is \emph{direct}, denoted
            by:
            \[ \sum_{i = 1}^l V_i = \bigoplus_{i =
            1}^l V_i \]
            if and only if
            \[ v_1 + \cdots + v_l = v_1' + \cdots
            + v_l' \implies v_1 = v_1', \dots, v_l
            = v_l' \]
            Equivalently:
            \[ V = \bigoplus_{i = 1}^l V_i \iff
            \forall v \in V ~\exists! v_i ~ v =
            \sum_i v_i \]
    \end{enumerate}
\end{definition*}

Exercise: the following are equivalent:
\begin{enumerate}[(i)]
    \item $\sum_{i = 1}^l = \bigoplus_{i = 1}^l V_i$
        (sum is direct)
    \item $\forall i$, $V_i \cap \left( \sum_{j
        \neq i} V_j \right) = \{0\}$.
    \item For \emph{any}  basis of $V_i$,
        \[ \mathcal{B} = \bigcup_{i = 1}^l
        \mathcal{B}_i \]
        is a basis of $\sum_{i = 1}^l V_i$.
\end{enumerate}

\subsection{Linear maps, isomorphism and the
rank-nullity Theorem}

\begin{flashcard}
\begin{definition*}[Linear map]
    Let $V, W$ be vector spaces of $F$. A map
    $\alpha : V \to W$ is \emph{linear} if and
    only if:
    \[ \cloze{ \forall (\lambda_1, \lambda_2) \in F^2,
    \forall (v_1, v_2) \in V \times V } \]
    \[ \cloze{ \alpha(\lambda_1 v_1 + \lambda_2 v_2) =
    \lambda_1 \alpha(v_1) + \lambda_2 \alpha(v_2) } \]
\end{definition*}
\end{flashcard}

\subsubsection*{Examples}

\begin{enumerate}[(i)]
    \item Matrices are linear maps.
    \item $\alpha : \mathcal{C}([0, 1]) \to
        \mathcal{C}([0, 1])$ defined by
        \[ f \mapsto \alpha(f)(x) = \int_0^x f(t)
        \dd t \]
        is a linear map
    \item Fix $x \in [a, b]$. $\mathcal{C}([a, b])
        \to \RR$ defined by $f \mapsto f(\lambda)$
        is a linear map.
\end{enumerate}

\begin{remark*}
    Let $U, V, W$ be $F$ vector spaces.
    \begin{enumerate}[(i)]
        \item $\id_V : V \to V$ defined by $x
            \mapsto x$ is a linear map.
        \item If $\beta : U \to V$ and $\alpha : V
            \to W$ are linear, then $\alpha \circ
            \beta : U \to W$ is linear. (linearity
            is \emph{stable} by composition)
    \end{enumerate}
\end{remark*}

\begin{lemma*}
    Let $V, W$ be $F$ vector spaces, and
    $\mathcal{B}$ a basis of $V$. Let $\alpha_0 :
    \mathcal{B} \to W$ be any map, then there is a
    unique linear map $\alpha : V \to W$ extending
    $\alpha_0$ (a map such that $\forall v \in
    \mathcal{B}$, $\alpha(v) = \alpha_0(v)$).
\end{lemma*}

\begin{proof}
    For all $v \in V$, $v = \sum_{i = 1}^n
    \lambda_i v_i$. Denote $\mathcal{B} = (v_1,
    \dots, v_n)$. By linearity: $\alpha : V \to W$
    linear, so
    \begin{align*}
        \alpha(v)
        &= \alpha \left( \sum_{i = 1}^n \lambda_i
        v_i \right) \\
        &= \sum_{i = 1}^n \lambda_i \alpha(v_i) \\
        &= \sum_{i = 1}^n \lambda_i \alpha_0(v_i)
    \end{align*}
\end{proof}

\begin{remark*}
    This is true in the infinite dimensional case
    as well (and the proof is the same).
\end{remark*}

\begin{itemize}
    \item Often, to define a linear map, we define
        its value on a basis and ``extend by
        linearity''.
    \item If $\alpha_1, \alpha_2 : V \to W$ are
        linear and agree on a basis of $V$, they
        are equal.
\end{itemize}

\begin{definition*}[Isomorphism]
    Let $V, W$ be vector spaces over $F$. A map
    \[ \alpha : V \to W \]
    is called an \emph{isomorphism} if and only
    if:
    \begin{enumerate}[(i)]
        \item $\alpha$ is linear;
        \item and $\alpha$ is bijective.
    \end{enumerate}
    If such an $\alpha$ exists, we write $V \simeq
    W$ ($V$ isomorphic to $W$).
\end{definition*}

\begin{remark*}
    If $\alpha : V \to W$ is an isomorphism then
    $\alpha^{-1} : W \to V$ is linear. Take $w_1 =
    \alpha(v_1)$, $w_2 = \alpha(v_2)$. Then
    \begin{align*}
        \alpha^{-1}(w_1 + w_2)
        &= \alpha^{-1}(\alpha(v_1) + \alpha(v_2))
        \\
        &= \alpha^{-1}(\alpha(v_1 + v_2)) \\
        &= v_1 + v_2 \\
        &= \alpha^{-1}(w_1) + \alpha^{-1}(w_2)
    \end{align*}
    Similarly, $\forall \lambda \in F$, $\forall v
    \in V$,
    \[ \alpha^{-1}(\lambda V) = \lambda
    \alpha^{-1}(v) \]
\end{remark*}

\begin{lemma*}
    $\simeq$ is an equivalence relation on the
    class of all vector spaces of $F$.
    \begin{enumerate}[(i)]
        \item $\id_V : V \to V$ is an isomorphism.
        \item $\alpha : V \to W$ isomorphism then
            $\alpha^{-1} : W \to V$ is an
            isomorphism.
        \item Let $\beta : U \to V$ and $\alpha :
            V \to W$ be isomorphisms. Then $\alpha
            \circ \beta$ is an isomorphism.
    \end{enumerate}
\end{lemma*}

\begin{theorem*}
    If $V$ is a vector space over $F$ of
    dimension $n$, then:
    \[ V \simeq F^n \]
\end{theorem*}

\begin{proof}
    Let $\mathcal{B} = (v_1, \dots, v_n)$ be a
    basis of $V$. Then $\alpha : V \to f^n$
    defined by
    \[ v = \sum_{i = 1}^n \lambda_i v_i \mapsto
    \begin{pmatrix}
        \lambda_1 \\
        \vdots \\
        \lambda_n
    \end{pmatrix}
    \]
    is an isomorphism (exercise).
\end{proof}

\begin{remark*}
    Choosing a basis of $V$ is like choosing an
    isomorphism from $V$ to $F^n$.
\end{remark*}

\begin{theorem*}
    Let $V, W$ be vector spaces over $F$ with
    finite dimension. Then:
    \[ V \simeq W \iff \dim_F V = \dim_F W \]
\end{theorem*}

\begin{proof}
    \begin{enumerate}[(i)]
        \item[$\Leftarrow$] $\dim_F V = \dim_F W
            = n$ implies that $V \simeq F^n$, $W
            \simeq F^n$ so $V \simeq W$.
        \item[$\Rightarrow$] Let $\alpha : V \to
            W$ be an isomorphism. Let
            $\mathcal{B}$ be a basis of $V$. Then
            we claim that $\alpha(\mathcal{B})$ is
            a basis of $W$:
            \begin{itemize}
                \item $\alpha(\mathcal{B})$ spans
                    $V$ follows from surjectivity
                    of $\alpha$.
                \item $\alpha(\mathcal{B})$ free
                    family follows from the
                    injectivity of $\alpha$.
            \end{itemize}
            so $V$ and $W$ have the same size
            basis so $\dim_F V = \dim_F W$.
    \end{enumerate}
\end{proof}

\begin{definition*}[Kernel and Image of a linear
    map]
    Let $V, W$ be vector spaces over $F$. Let
    $\alpha : V \to W$ be a linear map. We define:
    \begin{enumerate}[(i)]
        \item $N(\alpha) = \Ker \alpha = \{v \in V
            : \alpha(v) = 0\}$
        \item $\Image(\alpha) = \{w \in W : \exists v
            \in V, w = \alpha(v)\}$.
    \end{enumerate}
\end{definition*}

\begin{lemma*}
    $\Ker \alpha$ is a vector subspace of $V$, and
    $\Image \alpha$ is a vector subspace of $W$.
\end{lemma*}

\begin{proof}
    \begin{itemize}
        \item $\lambda_1, \lambda_2 \in F$, $v_1,
            v_2 \in \Ker \alpha$ implies
            \[ \alpha(\lambda_1 v_1 + \lambda_2 v_2)
            = \lambda_1 \alpha(v_1) + \lambda_2
            \alpha(v_2) = 0 \]
            hence $\lambda_1 v_1 + \lambda_2 v_2
            \in \Ker \alpha$.
        \item $\lambda_1, \lambda_2 \in F$, $w_1,
            w_2 \in \Image \alpha$. Let $w_1 = \alpha(v_1)$,
            $w_2 = \alpha(v_2)$. Then
            \[ \lambda_1 w_1 + \lambda_2 w_2 =
            \lambda_1 \alpha(v_1) + \lambda_2
            \alpha(v_2) = \alpha(\lambda_1 v_1 +
            \lambda_2 v_2) \]
            hence $\lambda_1 w_1 + \lambda_2 w_2
            \in \Image \alpha$
    \end{itemize}
\end{proof}

\begin{example*}
    $\alpha : \mathcal{C}^\infty(\RR) \to
    \mathcal{C}^\infty(\RR)$, $f \mapsto \alpha(f)
    = f'' - f$. Then
    \begin{itemize}
        \item $\alpha$ is linear
        \item $\Ker \alpha = \{f \in
            \mathcal{C}^\infty(\RR) : f'' - f =
            0\} = \Span_\RR \langle e^t, e^{-t}
            \rangle$
        \item $\Image \alpha$? Exercise.
    \end{itemize}
\end{example*}

\begin{remark*}
    $\alpha : V \to W$ linear map. Then $\alpha$
    injective is equivalent to $\Ker \alpha =
    \{0\}$. $\alpha(v_1) = \alpha(v_2) \iff
    \alpha(v_1 - v_2) = 0$.
\end{remark*}

\begin{theorem*}
    Let $V, W$ be vector spaces over $F$. Let
    $\alpha : V \to W$ be a linear map. Then
    \[ \ol{\alpha} : V / \Ker \alpha \to \Image \alpha \]
    \[ v + \Ker \alpha \mapsto \alpha(v) \]
    is an isomorphism.
\end{theorem*}

\begin{proof}
    This follows from linearity.
    \begin{itemize}
        \item $\ol{\alpha}$ is well defined:
            \begin{align*}
                v + \Ker \alpha = v' + \Ker \alpha
                \\
                \implies v - v'
                &\in \Ker \alpha \\
                \implies \alpha(v - v')
                &= 0 \\
                \implies \alpha(v)
                &= \alpha(v')
            \end{align*}
            so $\ol{\alpha}$ is well-defined.
        \item $\ol{\alpha}$ linear follows from
            the linearity of $\alpha$.
        \item $\ol{\alpha}$ is a bijection:
            \begin{itemize}
                \item injectivity $\ol{\alpha}(v +
                    \Ker \alpha) = 0$ implies that
                    $\alpha(v) = 0$ hence $v \in
                    \Ker \alpha$. So $v + \Ker
                    \alpha = 0 + \Ker \alpha$.
                \item surjectivity: follows form
                    the definition of the image:
                    $w \in \Image \alpha$, $\exists v
                    \in V$ such that $w =
                    \alpha(v) = \ol{\alpha}(v)$.
            \end{itemize}
    \end{itemize}
\end{proof}
