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

\section{Vector spaces and subspaces}

Let $F$ be an arbitrary field (eg $\RR$ or $\CC$).

\begin{flashcard}
    \begin{definition*}[$F$ vector space]
        An $F$ vector space (a vector space over $F$)
        is an abelian group $(V, +)$ equipped with a
        function
        \[ F \times V \to V \]
        \[ (\lambda, v) \mapsto \lambda v \]
        such that:
        \begin{itemize}
            \item \cloze{$\lambda(v_1 + v_2) =
                \lambda v_1 + \lambda v_2$}
            \item \cloze{$(\lambda_1 + \lambda_2)v
                = \lambda_1 v + \lambda_2 v$}
            \item \cloze{$\lambda(\mu v) =
                (\lambda \mu) v$}
            \item \cloze{$1v = v$}
        \end{itemize}
    \end{definition*}
\end{flashcard}

\noindent
We know how to
\begin{itemize}
    \item sum two vectors
    \item multiply a vector $v \in V$ by a scalar
        $\lambda \in F$.
\end{itemize}

\subsubsection*{Examples}

\begin{enumerate}[(i)]
    \item $n \in \NN$, $F^n$: column vectors of
        length $n$ with entries in $F$:
        \[ v \in F^n, v = \left|
        \begin{matrix}
            x_1 \\
            \vdots \\
            x_n
        \end{matrix}
        \right. , \qquad x_i \in F, 1 \le i \le n \]
        \[ v + w = \left|
        \begin{matrix}
            v_1 \\
            \vdots \\
            v_n
        \end{matrix}
        \right. + \left|
        \begin{matrix}
            w_1 \\
            \vdots \\
            w_n
        \end{matrix}
        \right. = \left|
        \begin{matrix}
            v_1 + w_1 \\
            \vdots \\
            v_n + w_n
        \end{matrix}
        \right. \]
        \[ \lambda v = \left|
        \begin{matrix}
            \lambda v_1 \\
            \vdots \\
            \lambda v_n
        \end{matrix}
        \right. \qquad \lambda \in F \]
        check: $F^n$ is an $F$ vector space.
    \item Any set $X$,
        \[ \RR^X = \{f : X \to \RR\} \]
        (set of real valued functions on $X$)
        Then $\RR^X$ is an $\RR$ vector space
        \[ (f_1 + f_2)(x) = f_1(x) + f_2(x) \]
        \[ (\lambda f)(x) = \lambda f(x), \qquad
        \lambda \in \RR \]
    \item $\mathcal{M}_{n, m}(F) \equiv n \times
        m$ $F$ valued matrices. Sum is sum of
        entries, $\lambda M = (\lambda m_{ij})$.
\end{enumerate}

\begin{remark*}
    The axiom of scalar multiplication imply that:
    \[ \forall \,\, v \in V, \quad 0_F v = 0_V \]
\end{remark*}

\begin{definition*}[Subspace]
    Let $V$ be a vector space over $F$. A subset
    $U$ of $V$ is a vector subspace of $V$
    (denoted $U \le V$) if:
    \begin{itemize}
        \item $0_V \in U$
        \item $(u_1, u_2) \in U \times U \implies
            u_1 + u_2 \in U$
        \item $\forall \,\, (\lambda, u) \in F
            \times U, \lambda u \in U$.
    \end{itemize}
    The last two properties can be combined into
    a single property:
    \begin{itemize}
        \item $\forall (\lambda_1, \lambda_2, u_1,
            u_2) \in F \times F \times U \times U,
            \quad \lambda_1 u_1 + \lambda_2 u_2 \in U$
            ($*$)
    \end{itemize}
\end{definition*}

\hiddenfc{
\begin{definition*}[Subspace]
    Let $V$ be a vector space over $F$. A
    \cloze{\fcemph{non-empty}} subset
    $U$ of $V$ is a vector subspace of $V$
    (denoted $U \le V$) if:
    \[ \cloze{\forall \,\, (\lambda_1, \lambda_2, u_1,
    u_2) \in F \times F \times U \times U, \quad
    \lambda_1 u_1 + \lambda_2 u_2 \in U
    \qquad \text{and} \qquad 0_V \in U} \]
\end{definition*}
}

\begin{hiddenflashcard}[how-to-check-subspace]
How to check if $U \subset V$ is a subspace? \\
\cloze{
Check $0_V \in U$ and check
\[ \forall \lambda_1, \lambda_2 \in F, \forall
u_1, u_2 \in U, \qquad \lambda_1 u_1 + \lambda_2
u_2 \in U \]
}
\end{hiddenflashcard}

\noindent
Property ($*$) means that $U$ is stable by
\begin{itemize}
    \item scalar multiplication
    \item vector addition
\end{itemize}

\begin{example*}
    $V$ is an $F$ vector space, and $U \le V$.
    Then $U$ is an $F$ vector space.
\end{example*}

\subsubsection*{Examples}

\begin{enumerate}[(1)]
    \item $V = \RR^\RR$ space of functions $f :
        \RR \to \RR$.
        \begin{itemize}
            \item Let $\mathcal{C}(\RR)$ be the
                space of continuous functions $f :
                \RR \to \RR$. Then
                $\mathcal{C}(\RR) \le V$.
            \item Let $\PP(\RR)$ be the space of
                polynomials of one variable. Then
                $\PP(\RR) \le V$.
        \end{itemize}
    \item Let
        \[ V = \left\{ \left|
        \begin{matrix}
            x_1 \\
            x_2 \\
            x_3
        \end{matrix}
        \right. \in \RR^3 : x_1 + x_2 + x_3 = t \right\} \]
        check: that this is a subspace of $\RR^3$
        for $t = 0$ only.
\end{enumerate}

\begin{warning*}
    The union of two subspaces is generally
    \emph{not} a subspace. (It is typically not
    stable by addition).
\end{warning*}

\begin{example*}
    $V = \RR^2$, with $U_1 = \{(x, 0) : x \in
    \RR\}$, $U_2 = \{(0, y) : y \in \RR\}$. Both
    subspaces, but the union isn't since
    \[ \ub{(1, 0)}_{\in U_1} + \ub{(0, 1)}_{\in
    U_2} = (1, 1) \not\in U \cup V \]
\end{example*}

\begin{proposition*}
    Let $V$ be an $F$ vector space. Let $U, W \le
    V$. Then
    \[ U \cap W \le V \]
\end{proposition*}

\begin{proof}
    \begin{itemize}
        \item $0 \in U, 0 \in W \implies 0 \in U
            \cap W$.
        \item Stability: let $(\lambda_1,
            \lambda_2, v_1, v_2) \in F \times F
            \times (U \cap W) \times (U \cap W)$.
            Then
            \[ \ub{\lambda_1 v_1}_{\in U} +
            \ub{\lambda_2 v_2}_{\in U} \in U \]
            and similarly for $W$, hence
            \[ \lambda_1 v_1 + \lambda_2 v_2 \in U
            \cap W \]
    \end{itemize}
\end{proof}

\begin{definition*}[Sum of subspaces]
    Let $V$ be an $F$ vector space. Let $U \le V$,
    $W \le V$. Then the \emph{sum} of $U$ and $V$
    is the set:
    \[ U + W = \{u + w : (u, w) \in U \times W\} \]
\end{definition*}

\begin{example*}
    Use $V = \RR^2$ and $U_1, U_2$ from the
    previous example. Then $U_1 + U_2 = V$.
\end{example*}

\begin{proposition*}
    Let $V$ be an $F$ vector space, with $U, W \le
    V$. Then
    \[ U + W \le V \]
\end{proposition*}

\begin{proof}
    \begin{itemize}
        \item $0 = \ub{0}_{\in U} + \ub{0}_{\in
            W} \in U + W$
        \item Consider $\lambda_1 f + \lambda_2 g$
            for $\lambda_1, \lambda_2 \in F$ and
            $f, g \in U + W$. Then let:
            \[ f = \ub{f_1}_{\in U} +
            \ub{f_2}_{\in W} \]
            \[ g = \ub{g_1}_{\in U} +
            \ub{g_2}_{\in W} \]
            so
            \begin{align*}
                \lambda_1 f + \lambda_2 g
                &= \lambda_1 (f_1 + f_2) +
                \lambda_2 (g_1 + g_2) \\
                &= \ub{(\lambda_1 \ub{f_1}_{\in U}
                + \lambda_2 \ub{g_1}_{\in U})}_{\in U}
                + \ub{(\lambda_1 \ub{f_2}_{\in W}
                + \lambda_2 \ub{g_2}_{\in
                W})}_{\in W} \\
                &\in U + W
            \end{align*}
    \end{itemize}
\end{proof}

\myskip
Exercise: Show that $U + W$ is the \emph{smallest}
subspace of $V$ which contains both $U$ and $W$.

\subsection{Subspaces and Quotient}

\begin{definition*}[Quotient]
    Let $V$ be an $F$ vector space. Let $U \le V$.
    The quotient space $V / U$ is the abelian
    group $V / u$ equipped with the scalar product
    multiplication:
    \[ F \times V / U \to V / U \]
    \[ (\lambda, v + U) \mapsto \lambda v + U
    \tag{$*$} \]
\end{definition*}

\begin{proposition*}
    $V / U$ is an $F$ vector space.
\end{proposition*}

\begin{remark*}
    The multiplication is well defined:
    \[ v_1 + U = v_2 + U \]
    \[ \implies v_1 - v_2 \in U \]
    \[ \implies \lambda(v_1 - v_2) \in U \]
    \[ \implies \lambda v_1 + U = \lambda v_2 + U
    \in V / U \]
\end{remark*}

\noindent
Exercise: Prove that $V / U$ is an $F$ vector
space.
