---
tags: Linear Algebra, NCTU OCW, 莊重
---
# Lecture 4
## Linear Combinations and Systems of Linear Equations
Goal:
Let $V$ be a vector space and $S\subset V$, $S\neq\phi$, find *smallest* subspace $S^{'}$ of $V$ s.t. $S\subset S^{'}$
1. Introduction of $\textit{l.c.}$
2. $\text{Span}\left(S\right)$
3. Given a vector $v$, check if $v$ is $\textit{l.c.}$ of some other set of vectors $S$
$\rightarrow$ solving systems of linear equations
### Linear Combinations
Let $V$ be a vector space and $S\subset V$, $S\neq\phi$, $v\in V$
If $\exists u_i\in S,~ a_i\in F,~ i\in\{1,2,\cdots,n\},~ \text{s.t. }v=\sum\limits_{i=1}^{n}{\left(a_iu_i\right)}$,
then $v$ is a $\textit{l.c.}$ of vectors $\{u_i|i\in\{1,2,\cdots,n\}\}$, and $\{a_i|i\in\{1,2,\cdots,n\}\}$ are called coefficients of such $\textit{l.c.}$.
Alternatively, we say that $v$ is a $\textit{l.c.}$ of vectors of $S$.
#### Examples
- $V=\mathbb{R}^2,~ F=\mathbb{R},~ S=\{\left(1,0\right),\left(0,1\right)\}$
notice $S$ is not a subspace.
the problem is, is there exists a subspace $S^{'}$ that contains $S$, and $S^{'}$ is the *smallest* one satisfying this property?
### Span
「用某個集合$S$張出去的空間」
#### Definition
Let $V$ be a vector space and $S\subset V$, $S\neq\phi$, $v\in V$
$\text{Span}\left(S\right)\overset{\Delta}{=}\\
\Big\{\sum\limits_{i=1}^{n}{\left( a_iu_i \right)} \vert a_i\in F,~ u_i\in S,~ n\in\mathbb{N}\Big\}=\\
\big\{\text{the set of vectors that are linear combination of vectors of }S\big\}$
Let $V$ be a vector space and $S\subset V$, $S=\phi$, $v\in V$
$\text{Span}\left(S\right)\overset{\Delta}{=}\{\vec{0}\}$
#### Example
- $\text{Span}\left(\big\{(1,0),(0,1)\big\}\right) = \mathbb{R}^2$
- $\text{Span}\left(\big\{(1,0),(0,1),(\pi,e),(-e,\phi)\big\}\right) = \mathbb{R}^2$
#### Theorem 1.5
Let $V$ be a vector space and $S\subset V$, $S\neq\phi$, $v\in V$
then we have the following:
1. $\text{Span}\left(S\right)$ is a *subspace* of $V$
2. $\text{Span}\left(S\right)$ is the __*smallest*__ subspace containing $S$
That is, if $S\subset W$, $W$ subspace of $V$, then $\text{Span}\left(S\right)\subset W$
__proof__: (1)
suppose $x,y\in\text{Span}\left(S\right)$
$\implies \exists a_i,~ u_i,~ b_j,~ v_j,~ \text{where } i\in\{1,2,\cdots, n\},~ j\in\{1,2,\cdots, m\}\\
\text{s.t. }x=\sum\limits_{i=1}^n{(a_iu_i)},~ y=\sum\limits_{j=1}^m{(b_jv_j)}\\
\text{obviously we hence have }\big\{(x+y),\alpha x\big\}\subset\text{Span}\left(S\right)\\
\text{Q.E.D.}$
__proof__: (2)
objective: $x\in\text{Span}\left(S\right)\implies x\in W$
suppose $x\in\text{Span}\left(S\right)$
$\implies \exists a_i\in F,~ u_i\in S,~ \text{where } i\in\{1,2,\cdots, n\}\\
\text{s.t. }x=\sum\limits_{i=1}^n{(a_iu_i)}$
notice $u_i\in S\implies u_i\in W$
and subspaces are closed under operator $\cdot$ and $+$, $\text{Q.E.D.}$
##### Example
$u_1=(1,2,1)\\
u_2=(-2,-4,-2)\\
u_3=(0,2,3)\\
u_4=(2,0,-3)\\
u_5=(-3,8,16)\\
v=(2,6,8)$, is there some finite subset $A=\{a_i ~\vert~ i\leq 5, i\in\mathbb{N}\} \subseteq F$ such that $\sum\limits_{1}^{5} {a_i\times u_i} ~=~ v$, that is, $v \in \text{Span}\left(S\right)$?
$$\begin{cases}
(1\times a_1)+(-2\times a_2)+(0\times a_3)+(2\times a_4)+(-3\times a_5)&=2 \\
(2\times a_1)+(-4\times a_2)+(2\times a_3)+(0\times a_4)+(8\times a_5)&=6 \\
\vdots &=\vdots
\end{cases}\\
\underset{\text{elide some symbols}}{\implies}\left[\begin{array}{ccccc|c}
1 & -2 & 0 & 2 & -3 & 2 \\
2 & -4 & 2 & 0 & 8 & 6 \\
1 & -2 & 3 & -3 & 16 & 8 \\
\end{array}\right]$$
__remark__:
notice how now we have $\left[\begin{array}{c}
2 \\
6 \\
8
\end{array}\right]$ as a natural result of $\text{l.c}$ of $\{u_1,u_2,\cdots,u_5\}$
##### Gassian Elimination
$$\left[\begin{array}{ccccc|c}
1 & -2 & 0 & 0 & 1 & -4 \\
0 & 0 & 1 & 0 & 3 & 7 \\
0 & 0 & 0 & 1 & -2 & 3 \\
\end{array}\right]$$
$u_1=x^3-2x^2-5x-3\\
u_2=3x^3-5x^2-4x-9\\
v_1=2x^3-2x^2+12x-6\\
v_2=3x^3-2x^2+7x+8$, is $v_1$ or $v_2$ in $\text{Span}\left(S\right)$?
$$\left[\begin{array}{cc|cc}
1 & 3 & 2 & 3 \\
-2 & -5 & -2 & -2 \\
-5 & -4 & 12 & 7 \\
-3 & -9 & -6 & 8
\end{array}\right]$$
$$\left[\begin{array}{cc|cc}
1 & 3 & 2 & 3 \\
0 & 1 & 2 & 4 \\
0 & 0 & 0 & -22 \\
0 & 0 & 0 & 17
\end{array}\right]$$
turns out that $v_2$ is not in $\text{Span}\left(\{u_1,u_2\}\right)$, while $v_1$ is.
$S_1=\Bigg\{
\left(\begin{array}{cc} 1&1\\0&1 \end{array}\right),
\left(\begin{array}{cc} 1&1\\1&0 \end{array}\right),
\left(\begin{array}{cc} 1&0\\1&1 \end{array}\right),
\left(\begin{array}{cc} 0&1\\1&1 \end{array}\right)
\Bigg\}$
$S_2=\Bigg\{
\left(\begin{array}{cc} 1&1\\1&0 \end{array}\right),
\left(\begin{array}{cc} 1&1\\0&1 \end{array}\right),
\left(\begin{array}{cc} 1&0\\1&1 \end{array}\right),
\Bigg\}$
$S_3=\Bigg\{
\left(\begin{array}{cc} 1&0\\0&1 \end{array}\right),
\left(\begin{array}{cc} 1&1\\0&1 \end{array}\right),
\left(\begin{array}{cc} 1&0\\1&1 \end{array}\right),
\Bigg\}$
$\text{Span}\left(S_1\right)=\mathbb{R}^{2\times 2}$?
$\text{Span}\left(S_2\right)=\mathbb{R}^{2\times 2}$?
$\text{Span}\left(S_3\right)=\mathbb{R}^{2\times 2}$?
where $\mathbb{R}^{2\times 2}\overset{\Delta}{=}\Big\{\left( \begin{array}{cc} a&b \\ c&d \end{array} \right)\Big\vert~ a,b,c,d\in\mathbb{R}\Big\}$
turns out that $S_1$ is good, $S_2$ and $S_3$ are bad.
__forward__: $\mathbb{R}^{2\times 2}$ is $4\text{ Dimensional}$, notice $S_2$ and $S_3$ have only 3 element, hence $S_2$ and $S_3$ must not span $\mathbb{R}^{2\times 2}$
### Remark
consider $\left(m\times n\right)\times\left(n\times p\right) \in \left(m\times p\right)$
($\text{l.c.}$ of col. vector of left operand view)
*linear combine* $n$ vectors in $\mathbb{R}^m$; $p$ sets to be done.
($\text{l.c.}$ of row. vector of right operand view)
*linear combine* $n$ vectors in $\mathbb{R}^p$; $m$ sets to be done.