% This is lecture no. 2 of MH1201/: Linear Algebra II.

\chapter{Subspaces}%
\label{cha:subspaces}

\section{Basic definition}%
\label{sec:basic_definition}

Abstractly, a subspace is a subset that possesses the same structure as its superset.

\begin{definition}
	Subspace of a vector space.
	If $\mathsf{V}$ is a vector space, and $\mathsf{W}$ is a subset of $\mathsf{V}$, then $\mathsf{W}$ is a subspace of $\mathsf{V}$, if it is a vector space with respect to addition and scalar multiplication that is defined on $\mathsf{V}$.
\end{definition}

In any vector space $\mathsf{V}$, $\mathsf{V}$ is also considered a subspace, and $\{0\}$ is also a subspace, called the \textbf{zero subspace}.

It is \underline{not necessary} to verify all 10 conditions of a vector space to prove that a subset of a vector space is a subspace.

\begin{thrm}
	Three condition test for subspaces.
	Let $\mathsf{V}$ be an arbitrary vector space, and let $\mathsf{W}$ denote a subset of $\mathsf{V}$.
	Then $\mathsf{W}$ is a subspace iff the following three conditions hold for operations defined in $\mathsf{V}$:
	\begin{enumerate}
		\item $0\in \mathsf{W}$ (Non-Empty).
		\item $u+v\in \mathsf{W},\ \forall u,v\in \mathsf{W}$ (Closed under vector addition).
		\item $\lambda u\in \mathsf{W}$, $\forall\lambda\in F$, $u\in \mathsf{W}$ (Closed under scalar multiplication).
	\end{enumerate}
\end{thrm}

\section{Examples}%
\label{sec:examples}

\begin{exmp}
	Verify if $P_n(\mathbb{R})$, the set of all polynomials in $P(\mathbb{R})$ having degree less than or equal to $n$ $(n\geqslant 0, n\in \mathbb{N})$ is a subspace of $P(\mathbb{R})$.
	\bigbreak
	\noindent
	\underline{Axiom 1.} $P_n(\mathbb{R})$ is non-empty:

	The zero vector in $P_n(\mathbb{R})$ is the zero polynomial, a constant polynomial whose coefficients are all equal to 0.
	The degree of this polynomial is undefined, but by convention it is set to $-1$ or $-\infty$.
	The zero polynomial belongs to $P_n(\mathbb{R})$.
	\bigbreak
	\noindent
	\underline{Axiom 2.} $P_n(\mathbb{R})$ is closed under vector addition:

	\noindent
	Consider two arbitrary polynomials from $P_n(\mathbb{R})$:
	\begin{align*}
		A(x)&=a_nx^{n}+a_{n-1}x^{n-1}+\dotsb+a_1x+a_0\\
		B(x)&=b_nx^{n}+b_{n-1}x^{n-1}+\dotsb+b_1x+b_0
	\end{align*}
	Their sum is a polynomial of the following form:
	\[
		A(x)+B(x)=(a_n+b_n)x^{n}+(a_{n-1}+b_{n-1})x^{n-1}+\dotsb+(a_1+b_1)x+(a_0+b_0)
	.\]
	obviously belongs to $P_n(\mathbb{R})$ 
	\bigbreak
	\noindent
	\underline{Axiom 3.} $P_n(\mathbb{R})$ is closed under scalar multiplication:
	\begin{align*}
		\lambda A(x)&=\lambda(a_nx^{n}+a_{n-1}x^{n-1}+\dotsb+a_1x+a_0)\\
			    &=\lambda a_nx^{n}+\lambda a_{n-1}x^{n-1}+\dotsb+\lambda a_1x+\lambda a_0
	\end{align*}
	Which also belongs to $P_n(\mathbb{R})$, making it a subspace of $P(\mathbb{R})$.
\end{exmp}

\bigbreak
\begin{exmp}
	Verify if $\mathbf{C}(\mathbb{R})$, the set of all \textbf{continuous} real-valued functions defined on $\mathbb{R}$ is a subspace of $\mathcal{F}(\mathbb{R},\mathbb{R})$.
	\bigbreak
	\noindent
	\underline{Axiom 1.} $\mathbf{C}(\mathbb{R})$ is non-empty:

	\noindent
	The zero vector in $\mathbf{C}(\mathbb{R})$ is the zero function:
	 \[
		 f_0(x)=0,\ \forall x\in\mathbb{R}
	.\]
	We write $f_0\equiv 0$. This function is obviously continuous on $\mathbb{R}$, and therefore $f_0\in\mathbf{C}(\mathbb{R})$.
	\bigbreak
	\noindent
	\underline{Axiom 2.} $\mathbf{C}(\mathbb{R})$ is closed under vector addition:

	\noindent
	Consider any two functions $f(x),g(x)\in\mathbf{C}(\mathbb{R})$.
	Their sum is a function of the following form:
	\[
		h(x)=f(x)+g(x)
	.\]
	and it is a real-valued function which is continuous on $\mathbb{R}$, $\therefore h(x)\in\mathbf{C}(\mathbb{R})$.
	\bigbreak
	\noindent
	\underline{Axiom 3.} $\mathbf{C}(\mathbb{R})$ is closed under scalar multiplication:
	\[
		\lambda f(x), \forall \lambda\in\mathbb{R}, f(x)\in\mathbf{C}(\mathbb{R})
	.\]
	Which is obviously in $\mathbf{C}(\mathbb{R})$, making it a subspace of $\mathcal{F}(\mathbb{R},\mathbb{R})$.
\end{exmp}

\section{Forming New Subspaces}%
\label{sec:forming_new_subspaces}

The following theorems show how to form a new subspace from other subspaces.

\begin{thrm}
	Any \textbf{intersection} of subspaces of a vector space $\mathsf{V}$ is a subspace of $\mathsf{V}$.
\end{thrm}
\begin{proof}
	Intersections of subspaces.
	Note that the intersection of subspaces is \textit{not} necessarily finite.
	Let $\mathcal{S}$ be a collection of subspaces of $\mathsf{V}$, and let $\mathsf{W}$ denote the intersection of the subspaces in $\mathcal{S}$.
	\bigbreak
	\noindent
	\underline{Axiom 1.} $\mathsf{W}$ is non-empty:

	\noindent
	Since every subspace $\in\mathcal{S}$ contains the zero vector, $0\in \mathsf{W}$.
	\bigbreak
	\noindent
	\underline{Axiom 2.} $\mathsf{W}$ is closed under vector addition:

	\noindent
	Let $u,v\in \mathsf{W}$.
	Then $u,v$ are contained in each subspace in $\mathcal{S}$.
	Since each subspace in $\mathcal{S}$ is closed under vector addition, it follows that $u+v$ is contained in each subspace in $\mathcal{S}$.
	\[
	\therefore  u,v\in \mathsf{W} \implies u+v \in \mathsf{W}
	.\]
	\bigbreak
	\noindent
	\underline{Axiom 3.} $\mathsf{W}$ is closed under scalar multiplication:

	\noindent
	Let $u\in \mathsf{W}$.
	Then $u$ is in every subspace in $\mathcal{S}$.
	Since each subspace in $\mathcal{S}$ is closed under scalar multiplication, it follows that $\lambda u$ is contained in each subspace in $\mathcal{S}$.
	\[
	\therefore u\in \mathsf{W} \implies \lambda u\in \mathsf{W}
	.\]
	So the intersection of subspaces of a vector space is also a subspace.
\end{proof}
\begin{thrm}
	The union of two subspaces of a vector space $\mathsf{V}$ is  \textbf{not necessarily} a subspace of $\mathsf{V}$.
	The union contains the zero vector, and is closed under scalar multiplication, but in general the \textit{union} of subspaces need not be closed under vector addition.
\end{thrm}
\begin{proof}
	Consider a vector space $\mathsf{V}=\mathbb{R}^{2}$, the Cartesian plane, and two subspaces:
	\begin{align*}
		\mathsf{W}_1=\{(x,y):y=0\}\\
		\mathsf{W}_2=\{(x,y):x=0\}
	\end{align*}
	This is the $x$-axis and $y$-axis, whose union $\mathsf{W}_1\cup \mathsf{W}_2$ is not a subspace of $\mathbb{R}^2$.
\end{proof}
