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

\chapter{Linear Combinations \& Independence}%
\label{cha:linear_combinations_&_independence}

\section{Linear Combinations \& Span}%
\label{sec:linear_combinations_&_span}

\begin{definition}
	Linear Combination.
	Consider a vector space $\mathsf{V}$ over a field $F$ and a non-empty subset $S\subset \mathsf{V}$.
	Then a vector $v\in \mathsf{V}$ is a linear combination of vectors in $S$ if:
	\[
	\exists u_1,u_2,\dotsc ,u_n \in S,\quad  \lambda_1,\lambda_2,\dotsc,\lambda_n \in F
	.\]
	such that:
	\[
	v=\lambda_1 u_1 + \lambda_2 u_2 + \dotsb + \lambda_n u_n
	.\]
\end{definition}
We can then define span($S$) to be the set containing all linear combinations of the vectors in $S$.
\begin{thrm}
	Smallest subspace.
	The set span($S$) is the smallest subspace of $\mathsf{V}$ that contains $S$.
	This means that span($S$) is a subspace of $\mathsf{V}$ that contains $S$, and that $\forall$ $\mathsf{W}$ subspaces of $\mathsf{V}$:
	\[
		S \subseteq \mathsf{W} \implies \text{span($S$)}\subseteq \mathsf{W}
	.\]
\end{thrm}
\begin{proof}
	This result is clearly true if $S=\varnothing$, because span($\varnothing$)=$\{0\}$.
	Now considering the case where $S\neq\varnothing$, we must first prove that span($S$) is a subspace of $\mathsf{V}$ containing $S$.
	We can easily verify the sufficient conditions since all the linear combinations of the elements in $S$ will be closed under vector addition and scalar multiplication.

	Moreover, $S\subset \text{span($S$)}$, because any vector $u\in S$ can always be written as a linear combination of the vectors in $S$, namely:
	\[
	u=1u,\ u\in S
	.\]
	Next we must prove that $\forall\ \mathsf{W}$ subspaces of $\mathsf{V}$:
	\[
		S\subseteq \mathsf{W}\implies \text{span($S$)}\subseteq \mathsf{W}
	.\]
	Let $v$ be an arbitrary vector in span($S$). This means that:
	\[
	v = \lambda_1 u_1 + \lambda_2 u_2 +\dotsb+\lambda_n u_n
	.\]
	where $u_1,u_2,\dotsc,u_n\in S$ and $\lambda_1,\lambda_2,\dotsc,\lambda_n \in F$.
	Since $u_1,u_2,\dotsc,u_n\in S$, these vectors are in $\mathsf{W}$.
	Taking into account the fact that $\mathsf{W}$ is a subspace of $\mathsf{V}$, we see that:
	\begin{align*}
		\lambda_1 u_1 + \lambda_2 u_2 +\dotsb+\lambda_n u_n \in &\ \mathsf{W}\\
		\therefore v \in &\ \mathsf{W}\\
		\therefore \text{span($S$)}\subseteq &\ \mathsf{W}
	\end{align*}
\end{proof}
As a consequence of the theorem we can say that a subset of a vector space is a subspace if and only if the set equals its span.
\section{Linear Dependence \& Independence}%
\label{sec:linear_dependence_&_independence}

\begin{definition}
	Linear Dependence \& Independence.
	Consider a vector space $\mathsf{V}$ over a field $F$, and a set $S\subset \mathsf{V}$.
	The set $S$ is considered to be \textbf{linearly dependent} if:
	\[
	\exists u_1,u_2,\dotsc,u_n \in S,\ \lambda_1,\lambda_2,\dotsc,\lambda_n \in F
	.\]
	Where $u_1\neq u_2\neq \dotsb \neq u_n$ and $\forall n\in \mathbb{Z}, \lambda_n \neq 0$ such that:
	\[
	\lambda_1 u_1 +\lambda_2 u_2 + \dotsb + \lambda_n u_n = 0
	.\]
	Conversely we say that the set $S$ is \textbf{linearly independent} if the \underline{only} solution to the equation:
	\[
	\lambda_1 u_1 +\lambda_2 u_2 + \dotsb + \lambda_n u_n = 0
	.\]
	is where $\lambda_1=\lambda_2=\dotsb=\lambda_n=0$.
\end{definition}
\begin{exmp}
	Determine if the set $\{p_0(x),p_1(x),\dotsc,p_n(x)\}$, where:
	\begin{align*}
		p_0(x) &= 1 + x + x^2 + \dotsb +x^{n}\\
		p_1(x) &= x + x^2 + \dotsb + x^{n}\\
		       &\ \,\vdots\\
		p_n(x) &= x^{n}
	\end{align*}
	is linearly independent in $P_n(\mathbb{R})$.
	Consider the equation:
	\[
		\lambda_0p_0(x) + \lambda_1p_1(x) + \dotsb + \lambda_np_n(x) = 0
	.\]
	which is equivalent to the following system of equations:
	\begin{align*}
		\lambda_0 + \lambda_1 + \dotsb +\lambda_{n-1} +\lambda_n & = 0 && \text{(for $x^{n}$)}\\
		\lambda_0 + \lambda_1 + \dotsb +\lambda_{n-1} & = 0 && \text{(for $x^{n-1}$)}\\
							      &\ \, \vdots &&\ \, \vdots\\
					\lambda_0 +\lambda_1  & = 0 && \text{(for x)}\\
					\lambda_0 & = 0 && \text{(for the constant term)}
	\end{align*}
	By back-substitution we get:
	\[
	\lambda_0 =\lambda_1 =\lambda_2 =\dotsb=\lambda_{n-1}=\lambda_n=0
	.\]
	Which shows that the set is linearly independent in $P_n(\mathbb{R})$.
\end{exmp}
\bigbreak
The following is an important result of the definition of linear dependence and independence.
\begin{thrm}
	Consider a vector space $\mathsf{V}$ over a field $F$, and the following relation between sets:
	\[
	S_1\subset S_2\subset \mathsf{V}
	.\]
	Then if $S_1$ is linearly dependent, $S_2$ is also linearly dependent.
	And if $S_2$ is linearly independent, $S_1$ is also linearly independent.
\end{thrm}
From this theorem, we can have the following statement on linear dependence.
\begin{thrm}
	Suppose the $S$ is any linearly dependent set such that:
	\[
	|S| \geqslant 2
	.\]
	Then $\exists v \in S$ which can be written as a linear combination of the other vectors in $S$, and therefore the subset obtained by removing $v$ from $S$ has the same span as $S$.
\end{thrm}
\begin{proof}
	Since $S$ is linearly dependent, $\exists u_1,u_2,\dotsc,u_n\in S$ and $\exists \lambda_1,\lambda_2,\dotsc,\lambda_n \in F$ where $\forall n\in \mathbb{Z},\ \lambda_n\neq 0$ such that:
	\[
	\lambda_1u_1+\lambda_2u_2+\dotsb+\lambda_nu_n=0
	.\]
	This gives the following:
	\[
	u_1=-\frac{\lambda_2}{\lambda_1}u_2-\dotsb-\frac{\lambda_n}{\lambda_1}u_n
	.\]
	which means that $u_1$ can be expressed as a linear combination of vectors $u_2,\dotsc,u_{n}$, and therefore there will be some $v\in S$ as in the theorem stated.
\end{proof}
